On this page
You roll a die until a six turns up. How many rolls will it take? The geometric distribution tells you exactly how likely each answer is, and it is the model behind many JEE probability questions about "the first success" or two players throwing in turn.
What is the geometric distribution?
The geometric distribution gives the probability that the k-th trial is the first success, P(X = k) = (1−p)^(k−1)p for k = 1, 2, 3, ... (Wikipedia: Geometric distribution).
It needs three conditions: the trials are independent, each one succeeds with the same probability p, and you stop at the first success. For the first success to land on trial k, the first k−1 trials must fail (probability q = 1−p each) and trial k must succeed (probability p). Independence lets you multiply: q^(k−1)p.
The probabilities p, qp, q²p, ... form a geometric series, which is where the name comes from. They add up to 1, because a + ar + ar² + ... = a/(1−r) when |r| < 1 (Wikipedia: Geometric series), so p/(1−q) = p/p = 1.
Why is the mean of the geometric distribution 1/p?
The expected number of trials until the first success is 1/p, and the variance is (1−p)/p² (Wikipedia: Geometric distribution). Here are two ways to see the mean.
The first way is to sum the series. E[X] = 1·p + 2·qp + 3·q²p + ... = p·S, where S = 1 + 2q + 3q² + 4q³ + ...
Multiply S by q and subtract: S − qS = 1 + q + q² + q³ + ... = 1/(1−q). So S = 1/(1−q)² = 1/p², and E[X] = p · 1/p² = 1/p.
The second way is to condition on the first trial. Call the mean m. With probability p the first trial succeeds and you are done after 1 trial. With probability q it fails: you have used 1 trial, and because the trials are independent, the wait from here is a fresh copy of the original, with mean m. So:
m = p·1 + q·(1 + m)
This gives m = 1 + qm, so m(1−q) = 1 and m = 1/p.
Worked example: how many rolls until a six?
For a fair die, p = 1/6 and q = 5/6. The geometric distribution page uses a die rolled until a 1 appears, which has the same p = 1/6, and gives an average of 6 rolls. The formula also gives:
First six on roll 1: 1/6 ≈ 0.167. On roll 2: (5/6)(1/6) = 5/36 ≈ 0.139. On roll 3: 25/216 ≈ 0.116. Roll 1 is always the single most likely value.
Mean: 1/p = 6 rolls.
No six in the first six rolls: (5/6)^6 = 15625/46656 ≈ 0.335. About one time in three, six rolls are not enough, even though six is the average.
Median: (5/6)^3 ≈ 0.579 and (5/6)^4 ≈ 0.482, so just over half the time (about 0.518) you are done within 4 rolls.
Spread: variance = (5/6)/(1/36) = 30, so the standard deviation is about 5.5 rolls. More than 10 rolls happens with probability (5/6)^10 ≈ 0.16.
The long right tail pulls the mean (6) above the median (4). If a question asks for "the expected number of rolls", it wants 6; if it asks how many rolls give at least an even chance of a six, the answer is 4.
What does memoryless mean?
The chance of needing more than n trials is P(X > n) = q^n, since the first n trials must all fail. Then:
P(X > m + n | X > n) = q^(m+n) / q^n = q^m = P(X > m)
In words, the number of failed trials so far does not change the probabilities for how many more trials you need, and the geometric distribution is the only memoryless discrete distribution (Wikipedia: Geometric distribution).
After five rolls with no six, you still expect 6 more rolls, not 1.
Trials or failures: which convention is your book using?
Textbooks define the geometric distribution in two ways, and they differ by exactly one.
Trials until the first success, X = 1, 2, 3, ...: P(X = k) = (1−p)^(k−1)p, mean 1/p.
Failures before the first success, Y = 0, 1, 2, ...: P(Y = k) = (1−p)^k p, mean (1−p)/p.
Y = X − 1, so the means differ by 1 and the variance (1−p)/p² is the same in both (Wikipedia: Geometric distribution). Wolfram MathWorld uses the failures version, defined for n = 0, 1, 2, ..., with mean (1−p)/p. For the die, that is 6 rolls or 5 failed rolls: the same experiment counted two ways.
Before using a formula, check three things:
Does k start at 0 or at 1?
Is the exponent k or k−1?
Is the mean 1/p or (1−p)/p?
If your answer comes out one too high or one too low, a mismatched convention is the usual cause. The Fermi Problem Library has a step-by-step solver that explains the reasoning, so you can see where the count started. To revisit independence, expectation or series first, the Fermi Concept Library covers every concept in mathematics alongside physics, chemistry, biology and computing.
Next time a problem says "until the first", write down p, decide whether you are counting trials or failures, and the rest follows.



