The geometric distribution
The geometric distribution models how many trials it takes to get the first success, when each trial is independent and has the same probability of success, p. If X is the number of the trial on which the first success happens, then P(X = x) = (1 − p)ˣ⁻¹p for x = 1, 2, 3, ..., and the mean number of trials is 1/p.
What is a geometric distribution?
Keep repeating a yes-or-no trial until you get a success: rolling a dice until a six, testing items until you find a faulty one, taking driving tests until you pass. The number of trials this takes is random, and it follows a geometric distribution when:
- Each trial has two outcomes, success or failure.
- The trials are independent.
- The probability of success, p, is the same every time.
- You count the trials up to and including the first success.
Unlike the binomial distribution, there is no fixed number of trials. X can be 1, 2, 3 and so on with no upper limit. We write X ~ Geo(p).
The bar chart shows X ~ Geo(0.3). The most likely value is always 1, and each bar is (1 − p) times the one before, so the probabilities fall away steadily. That shrinking by the same factor each time is a geometric sequence, which is where the name comes from.
The geometric distribution formula
For the first success to be on trial x, the first x − 1 trials must all be failures, each with probability 1 − p, and then trial x must be a success, with probability p. The trials are independent, so multiply.
Example 1: the first faulty item
4% of the items from a machine are faulty, independently. An inspector tests items one at a time until a faulty one turns up. Find the probability that the first faulty item is the 10th tested.
X ~ Geo(0.04), so P(X = 10) = 0.96⁹ × 0.04 = 0.0277.
Cumulative geometric probabilities
"More than x trials" means the first x trials were all failures, which gives two neat results:
Example 2: more than and at most
For the inspector in Example 1:
- P(more than 20 items are needed) = P(X > 20) = 0.96²⁰ = 0.442.
- P(a faulty item within the first 5) = P(X ≤ 5) = 1 − 0.96⁵ = 0.185.
Example 3: finding p
For X ~ Geo(p), P(X > 3) = 0.343. Find p. P(X > 3) = (1 − p)³ = 0.343, so 1 − p = ∛0.343 = 0.7 and p = 0.3.
Check your understanding.
Mean and variance of a geometric distribution
The mean makes sense: if 4% of items are faulty, you expect to test 1 ÷ 0.04 = 25 items to find the first. The variance is 0.96 ÷ 0.04² = 600, so the standard deviation is √600 ≈ 24.5. The spread is large, because sometimes you find one straight away and sometimes it takes a very long time.
Example 4: a dice
For rolling a fair dice until the first six, p = 1/6, so the mean number of rolls is 6 and the variance is (5/6) ÷ (1/36) = 30. The probability of needing more than 6 rolls is (5/6)⁶ = 0.335, so about a third of the time it takes longer than the mean.
The memoryless property
The geometric distribution "forgets" the past. If you have already had m failures, the chance of needing more than n further trials is the same as it was at the start:
For example, with p = 0.2, P(X > 3) = 0.8³ = 0.512. If the first 10 trials have all failed, the chance that it takes more than 3 more is still 0.512. A long run of failures doesn't make a success "due", because the trials are independent.
Geometric vs binomial distribution
| Binomial, B(n, p) | Geometric, Geo(p) | |
|---|---|---|
| What X counts | Successes in a fixed number of trials | Trials up to and including the first success |
| Number of trials | Fixed, n | Not fixed |
| Possible values | 0, 1, ..., n | 1, 2, 3, ... (no upper limit) |
| Formula | ⁿCₓ pˣ(1 − p)ⁿ⁻ˣ | (1 − p)ˣ⁻¹ p |
| Mean | np | 1/p |
| Variance | np(1 − p) | (1 − p)/p² |
Both need independent trials with a constant probability of success. The binomial distribution guide covers the fixed-trials case.
Common mistakes
- Using the wrong power. For the first success on trial x there are x − 1 failures, not x.
- Using a binomial. If the number of trials isn't fixed and you stop at the first success, it is geometric.
- Writing the mean as p. It is 1/p: a small p means a long wait.
- Forgetting the complement. P(X ≤ x) = 1 − (1 − p)ˣ is much quicker than adding terms.
- Thinking a success becomes more likely after many failures. Independent trials have no memory.
Practice questions
X ~ Geo(0.2).
- Find P(X = 3).
- Find P(X > 4).
- Find the mean and variance of X.
- Seeds from one packet each germinate with probability 0.7, independently. They are planted one at a time. What is the probability that the first seed to fail is the 3rd one planted?
Answers: 1) 0.8² × 0.2 = 0.128. 2) 0.8⁴ = 0.4096. 3) Mean 5, variance 0.8 ÷ 0.04 = 20. 4) A failure has probability 0.3: 0.7² × 0.3 = 0.147.
Practise with a short timed paper
The geometric distribution builds on the binomial and normal distributions from A-level Maths statistics. The daily A-level Maths: Statistics paper is a short timed paper of 8 questions on those topics, with a new one every day.
Common questions
What is a geometric distribution?
What is the formula for the geometric distribution?
What is the mean of a geometric distribution?
What is the difference between geometric and binomial distributions?
What is P(X > x) for a geometric distribution?
Is the geometric distribution memoryless?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Learn it
Probability
Distributions, expected values and the maths behind uncertainty
Start the course - Test it
A-level Maths: Statistics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper