The geometric distribution, explained with examples
A geometric random variable counts how many trials it takes to get the first success. How many rolls until a six? How many free throws until the first miss? The geometric distribution answers questions like these.
On this page
- When a situation is geometric
- The probability formula
- Cumulative probabilities
- Mean and standard deviation
- Worked examples
- The shape of a geometric distribution
- The “memoryless” property
- Simulating a geometric setting
- Geometric versus binomial
- Using a calculator
- Common mistakes
- Practice questions
- Frequently asked questions
- Key takeaways
- Related guides
When a situation is geometric
A random variable X is geometric when:
- each trial has two outcomes, success or failure;
- the trials are independent;
- the probability of success p is the same on every trial;
- X counts the number of trials up to and including the first success.
The difference from the binomial setting is the last point. A binomial variable counts successes in a fixed number of trials. A geometric variable has no fixed number of trials: you keep going until the first success. Its possible values are 1, 2, 3, … with no upper limit.
The probability formula
P(X = k) = (1 − p)k − 1 × p
The reasoning is simple: to get the first success on trial k, you need k − 1 failures in a row, each with probability 1 − p, followed by one success with probability p. Multiply them because the trials are independent.
Cumulative probabilities
Two shortcuts save a lot of work:
- P(X > k) = (1 − p)k: the first success comes after trial k only if the first k trials are all failures.
- P(X ≤ k) = 1 − (1 − p)k, the complement.
Mean and standard deviation
μ = 1/p and σ = √(1 − p)/p.
The mean makes intuitive sense: if a success happens with probability 1/6, you expect to wait 6 trials on average. Interpreting the mean in context, AP style: “If we repeated this process many times, it would take about 6 rolls on average to get the first six.”
Worked examples
Example 1: first six on the third roll
A fair dice is rolled until a six appears. Find the probability that the first six is on the third roll.
- Two non-sixes then a six: P(X = 3) = (5/6)² × (1/6) = 25/216.
- ≈ 0.116.
Example 2: within three rolls
Find the probability that the first six happens within the first three rolls.
- P(X ≤ 3) = 1 − (5/6)³ = 1 − 125/216.
- ≈ 0.421.
Example 3: more than three rolls
Find the probability that it takes more than three rolls to get a six.
- P(X > 3) = (5/6)³ = 125/216 ≈ 0.579.
- Check: 0.421 + 0.579 = 1.
Example 4: mean and standard deviation
Find the mean and standard deviation of the number of rolls needed.
- μ = 1/(1/6) = 6 rolls.
- σ = √(5/6)/(1/6) ≈ 5.48 rolls. The large spread shows how much the waiting time varies.
Example 5: a basketball player
A player makes 70% of free throws. Find the probability that her first miss is on her fourth attempt, and her expected number of attempts until the first miss.
- Here a “success” is a miss, so p = 0.3. P(X = 4) = 0.7³ × 0.3 = 0.1029.
- ≈ 0.103. Expected attempts = 1/0.3 ≈ 3.33. Defining success carefully is the key step, and it is where most marks are lost.
Example 6: quality control
10% of items from a machine are faulty. An inspector checks items until she finds a faulty one. Find the probability she checks more than 4 items.
- P(X > 4) = 0.94 = 0.6561.
The shape of a geometric distribution
A geometric distribution is always skewed right. The most likely value is always 1, the first trial, because P(X = 1) = p is larger than every later probability. Each later probability is (1 − p) times the one before, so the bars on a probability histogram shrink steadily but never quite reach zero.
The “memoryless” property
Because the trials are independent, past failures do not make a success more likely. If you have rolled five times without a six, the probability that the next roll is a six is still 1/6, and the expected number of further rolls is still 6. Believing that a success is “due” after a run of failures is called the gambler's fallacy. Mathematically, P(X > a + b | X > a) = P(X > b): having waited a trials tells you nothing about how much longer you will wait.
Simulating a geometric setting
AP questions sometimes ask you to describe a simulation. For a success probability of 0.3, use random digits 0 to 9, let 0, 1 and 2 represent success and 3 to 9 represent failure, and read digits until the first success, recording how many digits were needed. Repeating this many times and averaging the counts should give a value close to the theoretical mean of 1/0.3 ≈ 3.33.
Geometric versus binomial
- Binomial: a fixed number of trials n; counts the number of successes; values 0 to n.
- Geometric: no fixed number of trials; counts the trials up to the first success; values 1, 2, 3, …
Ask: “Is the number of trials fixed in advance?” If yes, binomial. If you stop at the first success, geometric.
Using a calculator
On a TI-84, geometpdf(p, k) gives P(X = k), and geometcdf(p, k) gives P(X ≤ k). For P(X > k), use 1 − geometcdf(p, k), or simply (1 − p)k. On the AP exam, define the variable and distribution in words, such as “Let X = the number of rolls until the first six; X is geometric with p = 1/6”, before giving calculator results.
Common mistakes
- Using the binomial formula when trials continue until the first success.
- Writing (1 − p)k × p instead of (1 − p)k − 1 × p.
- Defining “success” inconsistently, for example when the event of interest is a miss.
- Forgetting that P(X > k) means the first k trials are all failures.
Practice questions
Try each one before opening the answer.
Q1. A coin is flipped until it lands heads. Find P(X = 4).
Show answer
Q2. p = 0.2. Find the mean number of trials to the first success.
Show answer
Q3. p = 0.4. Find P(X > 2).
Show answer
Q4. Is “the number of heads in 10 flips” geometric or binomial?
Show answer
Frequently asked questions
Is the geometric distribution on the AP Statistics exam?
Yes. It is part of Unit 4, probability, random variables and probability distributions, alongside the binomial distribution.
Is the geometric distribution in A level Maths?
Not in A level Maths, where the binomial and normal distributions are studied. It appears in some A level Further Maths options.
Key takeaways
- Geometric: count trials until the first success.
- P(X = k) = (1 − p)k−1p.
- P(X > k) = (1 − p)k.
- Mean 1/p; standard deviation √(1 − p)/p.
- Fixed number of trials means binomial; stop at first success means geometric.