Achievable logoAchievable logo
AP Statistics
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Resources
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. One variable data
2. Two variable data
3. Data collection
4. Probability and random variables
4.1 Law of large numbers
4.2 Introduction to probability
4.3 Expected value, variance, and standard deviation
4.4 Binomial distribution
4.5 Geometric distribution
4.6 Cumulative probability distribution
5. Sampling distributions
6. Categorical data
7. Quantitative data
8. Chi-square
9. Linear regression
Wrapping up
Achievable logoAchievable logo
4.3 Expected value, variance, and standard deviation
Achievable AP Statistics
4. Probability and random variables
Our AP Statistics course is currently in development and is a work-in-progress.

Expected value, variance, and standard deviation

6 min read
Font
Discuss
Share
Feedback

Geometric distribution

The geometric distribution is used when you’re waiting for a first success in a series of independent trials. Unlike the binomial distribution, which counts successes in a fixed number of trials, the geometric distribution counts how many trials it takes to get that first success. The key formulas are defined below.

Definitions
Geometric distribution
A probability distribution for a sequence of independent trials with two possible outcomes: success and failure. The probability of success on each trial is p, and the probability of failure is 1−p. This distribution is used to find the probability that the first success happens on a particular trial:

P(X=k)=(1−p)k−1⋅p

where X is the number of trials until the first success, p is the probability of success on each trial, and k is the trial on which the first success occurs, k=1,2,3,… Expected value for the geometric distribution : The average number of trials needed to achieve the first success:

E(X)=p1​

Variance for the geometric distribution
A measure of how spread out the number of trials is around the mean:

Var(X)=p21−p​

Standard deviation for the geometric distribution
The typical deviation from the expected number of trials:

σ=p21−p​​

Calculator Commands

You can also use software to calculate geometric probabilities. geometpdf (p,x) gives the probability that the first success occurs on the xth trial, where p is the probability of success on a single trial. geometcdf (p,x) gives the cumulative probability that the first success occurs on or before the xth trial, where p is the probability of success on a single trial.

Conditions for Using the Geometric Distribution

Sidenote
Important to know!

In order to use the geometric distribution, all of the “BITS” conditions must be met:

  • Binary: The outcome of each trial can be classified into exactly two categories: “success” or “failure.”
  • Independent: The trials must be independent. (If sampling without replacement, the sample size should be less than 10% of the population.)
  • Trials: The trials are not fixed; we are counting the number of trials until the first success.
  • Same probability: The probability of success (p) must be the same for every trial.

Practice problem

Example 1:

Suppose that only 2% of Americans voted third party in the last election. Liam is randomly selecting Americans until he finds one who voted third party in the last election.

Part a.

Define the random variable of interest for Liam and state how the random variable is distributed and with what parameter(s).

Since Liam is counting the number of people needed until the first third party voter is found, this is a geometric setting. The parameter p=0.02 represents the probability that any one selected American voted third party.

Solution:

(spoiler)

Let X be the number of randomly selected Americans needed until Liam finds the first person who voted third party. Then X is geometrically distributed with parameter p=0.02, where p is the probability that a randomly selected American voted third party on any one trial.

Part b.

What is the expected number of people that Liam will have to randomly select in order to find one who voted third party?

Use the expected value formula for a geometric distribution:

E(X)=p1​=0.021​=50

Solution:

(spoiler)

The expected number of people Liam will need to select is 50.

Part c.

What is the standard deviation for the number of people that Liam will have to select in order to find one who voted third party?

Use the standard deviation formula for a geometric distribution:

σ=p21−p​​=0.0221−0.02​​=2450​=49.4975

Solution:

(spoiler)

The standard deviation is 49.4975. Interpreting this in context: the number of people Liam needs to select typically differs from the mean of 50 by about 49.5 people.

Part d.

What is the probability that the first third party voter that Liam finds is the tenth person selected?

There are two approaches to this problem.

Solution 1 (without technology): Use the geometric probability formula with p=0.02 and k=10:

P(X=10)=(1−0.02)10−1⋅0.02=0.016675

Solution 2 (with technology): geometpdf (p,x) gives the probability that the first success occurs on the xth trial. With p=0.02 and x=10:

geometpdf(0.02,10)=0.016675

Solution:

(spoiler)

The probability that the first third party voter is the 10th person selected is about 1.6675%.

Part e.

What is the probability that the first third party voter that Liam finds is one of the first five people selected?

We want P(X≤5), meaning the first success happens on trial 1, 2, 3, 4, or 5. You could compute and add

P(X=1)+P(X=2)+P(X=3)+P(X=4)+P(X=5)

but it’s more efficient to use cumulative probability. geometcdf (p,x) gives the cumulative probability that the first success occurs on or before the xth trial:

geometcdf(0.02,5)=0.0961

Solution:

(spoiler)

The probability that the first third party voter is among the first five people selected is about 9.61%.

Part f.

What is the probability that the first third party voter that Liam finds is either the 15th person selected or someone selected sometime after the 15th person is selected?

We want P(X≥15). Use the complement: the opposite of “first success on trial 15 or later” is “first success on or before trial 14.”

First, compute P(X≤14) using the cumulative distribution:

geometcdf(0.02,14)=0.246

Now subtract from 1:

P(X≥15)=1−P(X≤14)=1−0.246=0.754

Solution:

(spoiler)

The probability that the first third party voter is found on the 15th selection or later is about 75.4%.

Part g.

What is the probability that the first non-third party voter that Liam finds is the third one who is selected?

For this part, the definition of “success” has changed. Now “success” is selecting a person who did not vote third party, so p=1−0.02=0.98. We want the first success on the third trial (x=3):

geometpdf(0.98,3)=0.000392

Solution:

(spoiler)

The probability is 0.000392. This probability is small because it requires the first two selected people to be third party voters — a rare outcome when only 2% voted third party.

Expected Value

  • Theoretical long-run average outcome
  • Calculated: E(x)=Σxp(x)
    • x = outcome value, p(x) = probability of outcome
  • Represents weighted average, not most likely single outcome

Variance and Standard Deviation

  • Variance: measures spread around the mean
    • Formula: Var(X)=E(X2)−[E(X)]2
  • Standard deviation: square root of variance
    • Formula: SD=Var(X)​

Addition and Subtraction Rules for Random Variables

  • E(X+Y)=E(X)+E(Y)
  • E(X−Y)=E(X)−E(Y)
  • If X and Y are independent:
    • σX±Y​=σX2​+σY2​​

Worked Examples

  • Use probabilities and values to compute E(x), E(x2), variance, and standard deviation
  • For totals of independent variables:
    • Add expected values
    • Add variances, then take square root for standard deviation

Sign up for free to take 8 quiz questions on this topic

Previous
Next  | 4.4 Binomial distribution
All rights reserved ©2016 - 2026 Achievable, Inc.

Expected value, variance, and standard deviation

Geometric distribution

The geometric distribution is used when you’re waiting for a first success in a series of independent trials. Unlike the binomial distribution, which counts successes in a fixed number of trials, the geometric distribution counts how many trials it takes to get that first success. The key formulas are defined below.

Definitions
Geometric distribution
A probability distribution for a sequence of independent trials with two possible outcomes: success and failure. The probability of success on each trial is p, and the probability of failure is 1−p. This distribution is used to find the probability that the first success happens on a particular trial:

P(X=k)=(1−p)k−1⋅p

where X is the number of trials until the first success, p is the probability of success on each trial, and k is the trial on which the first success occurs, k=1,2,3,… Expected value for the geometric distribution : The average number of trials needed to achieve the first success:

E(X)=p1​

Variance for the geometric distribution
A measure of how spread out the number of trials is around the mean:

Var(X)=p21−p​

Standard deviation for the geometric distribution
The typical deviation from the expected number of trials:

σ=p21−p​​

Calculator Commands

You can also use software to calculate geometric probabilities. geometpdf (p,x) gives the probability that the first success occurs on the xth trial, where p is the probability of success on a single trial. geometcdf (p,x) gives the cumulative probability that the first success occurs on or before the xth trial, where p is the probability of success on a single trial.

Conditions for Using the Geometric Distribution

Sidenote
Important to know!

In order to use the geometric distribution, all of the “BITS” conditions must be met:

  • Binary: The outcome of each trial can be classified into exactly two categories: “success” or “failure.”
  • Independent: The trials must be independent. (If sampling without replacement, the sample size should be less than 10% of the population.)
  • Trials: The trials are not fixed; we are counting the number of trials until the first success.
  • Same probability: The probability of success (p) must be the same for every trial.

Practice problem

Example 1:

Suppose that only 2% of Americans voted third party in the last election. Liam is randomly selecting Americans until he finds one who voted third party in the last election.

Part a.

Define the random variable of interest for Liam and state how the random variable is distributed and with what parameter(s).

Since Liam is counting the number of people needed until the first third party voter is found, this is a geometric setting. The parameter p=0.02 represents the probability that any one selected American voted third party.

Solution:

(spoiler)

Let X be the number of randomly selected Americans needed until Liam finds the first person who voted third party. Then X is geometrically distributed with parameter p=0.02, where p is the probability that a randomly selected American voted third party on any one trial.

Part b.

What is the expected number of people that Liam will have to randomly select in order to find one who voted third party?

Use the expected value formula for a geometric distribution:

E(X)=p1​=0.021​=50

Solution:

(spoiler)

The expected number of people Liam will need to select is 50.

Part c.

What is the standard deviation for the number of people that Liam will have to select in order to find one who voted third party?

Use the standard deviation formula for a geometric distribution:

σ=p21−p​​=0.0221−0.02​​=2450​=49.4975

Solution:

(spoiler)

The standard deviation is 49.4975. Interpreting this in context: the number of people Liam needs to select typically differs from the mean of 50 by about 49.5 people.

Part d.

What is the probability that the first third party voter that Liam finds is the tenth person selected?

There are two approaches to this problem.

Solution 1 (without technology): Use the geometric probability formula with p=0.02 and k=10:

P(X=10)=(1−0.02)10−1⋅0.02=0.016675

Solution 2 (with technology): geometpdf (p,x) gives the probability that the first success occurs on the xth trial. With p=0.02 and x=10:

geometpdf(0.02,10)=0.016675

Solution:

(spoiler)

The probability that the first third party voter is the 10th person selected is about 1.6675%.

Part e.

What is the probability that the first third party voter that Liam finds is one of the first five people selected?

We want P(X≤5), meaning the first success happens on trial 1, 2, 3, 4, or 5. You could compute and add

P(X=1)+P(X=2)+P(X=3)+P(X=4)+P(X=5)

but it’s more efficient to use cumulative probability. geometcdf (p,x) gives the cumulative probability that the first success occurs on or before the xth trial:

geometcdf(0.02,5)=0.0961

Solution:

(spoiler)

The probability that the first third party voter is among the first five people selected is about 9.61%.

Part f.

What is the probability that the first third party voter that Liam finds is either the 15th person selected or someone selected sometime after the 15th person is selected?

We want P(X≥15). Use the complement: the opposite of “first success on trial 15 or later” is “first success on or before trial 14.”

First, compute P(X≤14) using the cumulative distribution:

geometcdf(0.02,14)=0.246

Now subtract from 1:

P(X≥15)=1−P(X≤14)=1−0.246=0.754

Solution:

(spoiler)

The probability that the first third party voter is found on the 15th selection or later is about 75.4%.

Part g.

What is the probability that the first non-third party voter that Liam finds is the third one who is selected?

For this part, the definition of “success” has changed. Now “success” is selecting a person who did not vote third party, so p=1−0.02=0.98. We want the first success on the third trial (x=3):

geometpdf(0.98,3)=0.000392

Solution:

(spoiler)

The probability is 0.000392. This probability is small because it requires the first two selected people to be third party voters — a rare outcome when only 2% voted third party.

Key points

Expected Value

  • Theoretical long-run average outcome
  • Calculated: E(x)=Σxp(x)
    • x = outcome value, p(x) = probability of outcome
  • Represents weighted average, not most likely single outcome

Variance and Standard Deviation

  • Variance: measures spread around the mean
    • Formula: Var(X)=E(X2)−[E(X)]2
  • Standard deviation: square root of variance
    • Formula: SD=Var(X)​

Addition and Subtraction Rules for Random Variables

  • E(X+Y)=E(X)+E(Y)
  • E(X−Y)=E(X)−E(Y)
  • If X and Y are independent:
    • σX±Y​=σX2​+σY2​​

Worked Examples

  • Use probabilities and values to compute E(x), E(x2), variance, and standard deviation
  • For totals of independent variables:
    • Add expected values
    • Add variances, then take square root for standard deviation

More from Probability and random variables

  • Law of large numbers
  • Introduction to probability
  • Binomial distribution
  • Geometric distribution
  • Cumulative probability distribution