← 🔔 Standard Distributions
Subtopic 3 of 6

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

  1. P(X = k) = (1 − p)^(k−1) p for k = 1, 2, 3, …
  2. Mean = 1/p; variance = (1 − p)/p².
  3. P(X > k) = (1 − p)ᵏ.
  4. Memoryless: P(X > m + n | X > m) = P(X > n).
  5. 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).
1234567891011121314150.33

Dashed line = mean. Shaded/green part = the range below.

mean E[X]3.3333
variance7.7778
standard deviation2.7889
P(2 ≤ X ≤ 5)0.5319

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?

Remember: Geometric: P(k) = (1 − p)^(k−1)p, mean 1/p, memoryless.
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.