4.3Geometric distribution
The idea
The geometric distribution counts how many trials you need until the first success.
Think of it like this: Rolling a die until you get a six: sometimes the first roll, sometimes the tenth.
Why it exists
It models waiting for a first success, and its mean 1/p is used all over the analysis of randomised algorithms.
How it works
- P(X = k) = (1 − p)^(k−1) p for k = 1, 2, 3, …
- Mean = 1/p; variance = (1 − p)/p².
- P(X > k) = (1 − p)ᵏ.
- Memoryless: P(X > m + n | X > m) = P(X > n).
- First-step analysis: E = 1 + (1 − p)E gives E = 1/p.
Worked example: Waiting for a six
p = 1/6, so the expected number of rolls is 6, and P(first six on roll 3) = (5/6)² × (1/6) ≈ 0.116. In the lab pick p = 0.3: mean 3.33, with a long right tail.
Now play with it
- →Slide p from 0.05 to 0.9 and watch the mean 1/p shrink.
- →Switch to the CDF view and read P(X ≤ 3).
Dashed line = mean. Shaded/green part = the range below.
P(X = k) = (1 − p)^(k−1) p. Memoryless: the wait does not depend on how long you have already waited.
Check yourself
A fair coin is tossed until the first head. What is the expected number of tosses?
Exam notes (the dense version)
Number of trials until the first success: P(X = k) = (1 − p)ᵏ⁻¹ p, k = 1, 2, ...; mean 1/p, variance (1 − p)/p². It is memoryless: P(X > m + n | X > m) = P(X > n). Expected number of rolls for a six: 6.
Previous year questions: Standard Distributions (8)
PYQs are grouped by topic, so this is the full set for Standard Distributions; try the ones that match this subtopic. Open all 8 on the topic page.