← SciSim / Statistics
Geometric Distribution
Tier: Standard Undergraduate
§1 Interactive Simulation
Parameter 1
Parameter 2
Mean
Variance
Samples
0
Query prob
Success prob p
Parameter 2 (unused)
Query trial k
Speed 20/s
§2 The Idea, Step by Step

From "how many tries until it finally works?" to the geometric distribution

Start — an everyday picture. You're rolling a die, waiting for your first $6$. Maybe it turns up on the very first roll; maybe you miss five times before it does. Each roll is its own fresh chance — the die has no memory of your earlier misses. The question "how many rolls until the first $6$?" is exactly what the geometric distribution answers.

Build — put numbers on it. Call the chance of success on any single try $p$ (for one die, $p = 1/6 \approx 0.17$). Let $X$ be the trial on which the first success lands. To succeed exactly on trial $k$, you need $k-1$ misses in a row and then a hit, so $P(X=k) = (1-p)^{k-1}\,p$. For the die, the chance the first $6$ comes on the third roll is $(5/6)^2\cdot(1/6) \approx 0.116$. And on average you wait $E[X] = 1/p = 6$ rolls — the smaller $p$ is, the longer the typical wait.

Deepen — the precise statement. Those probabilities $(1-p)^{k-1}p$ form a geometric series that sums to $1$ — which is where the name comes from. The mean is $E[X]=1/p$ and the spread is $\text{Var}(X)=(1-p)/p^2$. The defining feature is memorylessness: $P(X>s+t \mid X>s) = P(X>t)$. After any streak of failures the count effectively restarts, because the trials are independent — past misses never make the next success "due." The geometric is the only discrete distribution with this property (the exponential is its continuous cousin). In the sim, the Success prob p slider is $p$, and Query trial k marks the bar whose probability $P(X=k)$ is reported.

TRY THIS IN THE SIM ABOVE

Slide $p$ down to $0.05$ and watch the bars stretch into a long right tail, with the mean $E[X]=1/p$ climbing toward $20$. Then push $p$ up to $0.9$ and see the distribution collapse almost entirely onto $k=1$ — success on the very first try. Finally set Query trial k $=1$ and read $P(X=1)$: it equals $p$ exactly, because "first success on trial $1$" simply means "succeed immediately."

§3 Mathematical Derivation

Geometric Distribution — Number of trials until first success

$$P(X=k) = (1-p)^{k-1}p,\quad k=1,2,\ldots$$

$E[X]=1/p,\quad\text{Var}(X)=(1-p)/p^2$

KEY PROPERTIES

This distribution has important theoretical and applied properties. See the simulation tabs to explore how shape changes with parameters.

APPLICATIONS

Number of tries until first success: coin flips until heads, attempts until making a sale, shots until scoring a goal. The geometric distribution is the discrete analog of the exponential — both are memoryless. Used in reliability (number of tests until failure), queuing theory, and cryptography (number of hash attempts).

Key Results

Use the interactive simulation above to explore how the PDF shape responds to parameter changes. The Live Sampling tab demonstrates convergence of empirical frequencies to theoretical probabilities.

Ross — A First Course in Probability, 10th ed. 2019
Hogg, McKean & Craig — Introduction to Mathematical Statistics, 8th ed. 2018
DeGroot & Schervish — Probability and Statistics, 4th ed. 2012
§4 FAQ
StatQuest — youtube.com/@statquestSeeing Theory — seeing-theory.brown.edu
§5 Misconceptions & Common Errors
Key Error

Always verify parameter definitions before computing probabilities.
Different textbooks and software packages use different parameterizations. Always check which convention is being used (e.g., rate vs scale for exponential/gamma; shape vs rate for beta). Plug in extreme values and check that the PDF shape matches your expectation.
See the simulation to visualize how parameters affect the distribution shape.

Casella & Berger — Statistical Inference, 2nd ed. 2002
DeGroot & Schervish — Probability and Statistics, 4th ed. 2012