The story
Keep flipping a coin that lands heads with probability , and stop at the first head. To need exactly flips you must fail times and then succeed, so . The bars always decrease: a first-try success is the single most likely outcome, however small is.
On average you wait trials, with variance . The Geometric is also memoryless: if you have already failed five times, the number of further trials you need has exactly the same distribution as when you started. The coin has no memory of your bad luck.
Formulas
Support
PMF
CDF
Expectation
Variance
Mode
Parameters
| Parameter | What it controls |
|---|---|
| The probability of success on each trial. Smaller means longer waits: the mean is and the tail decays more slowly. |
Where it shows up
- The number of rolls of a die until the first six (, mean 6).
- How many sales calls it takes to land the first sale.
- The number of attempts until a flaky network request finally succeeds.
- How many lottery draws until you first win anything.
Try this
- Set and shade the interval from 1 to 5. The shaded probability is : about two times in three you succeed within five tries, even though the mean wait is 5.
- Drag down to 0.05 and watch the mean marker slide out to 20 while the tallest bar stays at . Mean and mode can be very far apart in a skewed distribution.
- With , press Draw 1000 and compare the sample variance with the theoretical . Then switch to Sample means with and see the long right tail tamed into a near-Normal shape.
Related distributions
- It counts independent trials up to and including the first success.
- It is the discrete cousin of the Exponential: both are memoryless waiting times, and for small the scaled wait is approximately Exponential with rate 1.
- Some textbooks count only the failures before the first success, giving values ; that version is simply , with mean .