Geometric Distribution
Learn the geometric distribution formula for probability of first success on trial k, with mean, variance, and worked examples.
The Formula
Mean: E[X] = 1/p
Variance: Var(X) = (1 − p) / p²
The geometric distribution models the number of independent trials needed to get the first success, where each trial has the same probability of success p. It answers the question: "How many times do I need to try before I succeed?" This makes it the discrete analog of the exponential distribution.
For example, if you roll a fair six-sided die looking for a 6, each roll has a 1/6 probability of success. The geometric distribution tells you the probability that you will first roll a 6 on the 1st roll, the 2nd roll, the 3rd roll, and so on. On average, you would need 6 rolls (since E[X] = 1/p = 1/(1/6) = 6).
The formula has an intuitive structure. To get the first success on trial k, you need exactly k − 1 failures followed by one success. Each failure has probability (1 − p), so k − 1 failures have probability (1 − p)k−1. Multiplying by the probability of success p on the kth trial gives the complete formula.
The geometric distribution has a special property called memorylessness. This means that no matter how many failures have already occurred, the probability of succeeding on the next trial remains the same. Mathematically, P(X > m + n | X > m) = P(X > n). This is the only discrete distribution with this property.
There is an alternative parameterization where X counts the number of failures before the first success (starting from 0 instead of 1). In that version, P(X = k) = (1 − p)k · p and the mean is (1 − p)/p. Be careful to check which version is being used in any given context.
Variables
| Symbol | Meaning |
|---|---|
| k | The trial number on which the first success occurs (k = 1, 2, 3, ...) |
| p | Probability of success on each trial (0 < p ≤ 1) |
| 1 − p | Probability of failure on each trial (often written as q) |
| E[X] | Expected value (mean number of trials to first success) |
| Var(X) | Variance of the distribution |
Example 1
A basketball player makes free throws with 80% accuracy. What is the probability that the first miss occurs on the 4th shot?
Here "success" = missing, so p = 0.20 (probability of missing)
P(X = 4) = (1 − 0.20)3 × 0.20
= (0.80)3 × 0.20 = 0.512 × 0.20
P(X = 4) = 0.1024 or about 10.24%
Example 2
A quality inspector finds defects in 5% of items. On average, how many items must be inspected to find the first defect?
p = 0.05 (probability of finding a defect)
E[X] = 1/p = 1/0.05 = 20
Variance = (1 − 0.05) / 0.05² = 0.95 / 0.0025 = 380
Standard deviation = √380 ≈ 19.5
On average, 20 items must be inspected. The standard deviation of about 19.5 shows high variability.
When to Use It
The geometric distribution applies whenever you are counting trials until the first occurrence of an event.
- Quality control: number of items inspected before finding a defect
- Sales: number of calls or pitches before making the first sale
- Games of chance: number of attempts until winning a prize
- Reliability testing: number of uses before a component first fails
- Network communications: number of packet transmissions until the first successful delivery
- Genetics: number of offspring until a specific trait appears