MISSION · Data and probability

The Geometric Distribution

Counting trials until something finally works

Explorer level
Grades 10-12
Quest time
6 minutes
Mission skill
Finding how long you wait for the first success, and what that wait averages

LEVEL 1 · EXPLORE

Make the idea move

Change the controls and watch what happens. Follow your curiosity and see what you notice.

Loading the activity…

LEVEL 2 · LEARN

Unlock the explanation

Open the chapters in any order. Try the examples as you go.

The idea in one sentence

Repeat an independent trial until it finally works, and the number of attempts you needed is a geometric random variable.

The setup and the formula

You need the same conditions as the binomial distribution — trials independent, two outcomes, probability \(p\) fixed throughout — but a different question. Binomial fixes the number of trials and counts successes. Geometric fixes the success and counts trials.

To get the first success on trial \(k\), the first \(k-1\) attempts must all fail and the \(k\)th must work:

\[P(X = k) = (1-p)^{k-1}\,p\]

With \(p = 0.5\), the first success arriving on trial 3 means fail, fail, succeed: \(0.5 \times 0.5 \times 0.5 = 0.125\).

The distribution is always decreasing. \(P(X=1) = p\) is the largest value it ever takes, and every subsequent term is smaller by a factor of \((1-p)\). The single most likely outcome is always “first try”, however unlikely success is — which sounds wrong until you notice that every longer wait has to clear all the earlier hurdles first.

Because the terms form a geometric series with ratio \(1-p\), they sum to \(\frac{p}{1-(1-p)} = 1\), as a probability distribution must.

The expected wait

\[E(X) = \frac{1}{p}\]

A 1-in-4 chance takes 4 attempts on average. A 1-in-1000 chance takes 1000. The reciprocal is worth internalising because it makes rare-event intuition quick: a 2% drop rate means about 50 tries, and a 1-in-6 die face takes about 6 rolls.

It is an average over many repetitions, not a guarantee. You might get it first go, or take thirty. The variance is \(\frac{1-p}{p^2}\), which is large when \(p\) is small — long waits are not just long, they are erratic.

Memorylessness

This is the property that makes the distribution strange and useful.

\[P(X > m + n \mid X > m) = P(X > n)\]

You have flipped nine tails in a row. What is the expected wait for a head now? Two more flips — exactly what it was before you started.

The coin has no record of the nine. Each trial is independent, so the past cannot change the future, and the distribution “restarts” after every failure. Geometric is the only discrete distribution with this property.

It is also the precise statement of why the gambler’s fallacy is a fallacy. “I’m due a win” treats past failures as accumulating credit, and they do not. Nothing about the coin has changed.

The continuous counterpart is the exponential distribution, which is why a component with a constant failure rate is no more likely to fail tomorrow after ten years of service than it was on day one.

Where it shows up

  • Quality control. How many items until the first defective?
  • Games and loot drops, where a 2% chance means an average 50 attempts and a fair chance of taking 150.
  • Genetics. How many offspring until one shows a recessive trait.
  • Networking. Retransmissions until a packet gets through.
  • Search and screening, where each candidate has a fixed chance of being suitable.

Common mix-ups

  • Using \((1-p)^k p\). The exponent is \(k-1\): there are \(k-1\) failures before the \(k\)th trial, not \(k\).
  • Confusing it with the binomial. Fixed trials, count successes → binomial. Fixed success, count trials → geometric.
  • Reading \(E(X) = \frac1p\) as the most likely value. The most likely value is always 1; \(\frac1p\) is the average, pulled up by the long tail.
  • Believing a run of failures makes success overdue. Memorylessness says otherwise.
  • Forgetting that \(X\) starts at 1. Some texts instead count only the failures, which starts at 0 and shifts the mean to \(\frac{1-p}{p}\). Check which convention is in use.

Check yourself

With \(p = 0.25\), how many trials until the first success on average? With \(p = 0.5\), what is \(P(X = 3)\)? And what does the distribution count?

\(E(X) = \frac{1}{0.25} = 4\). Then \((0.5)^2(0.5) = 0.125\). And it counts trials up to and including the first success.

LEVEL 3 · REFLECT

Add this quest to your trail

When you feel ready, mark this idea as explored. You can always come back and try it again.

EXPLORER STRATEGIES

More ways to see it

Loading shared methods…
Share how you learned it