The geometric distribution answers the question “how long until the first success?” when you repeat independent trials that each succeed with the same probability p. How many times do you roll a die before the first six? How many sales calls until the first yes? How many packets are sent before one is corrupted?
There are two common conventions, and the calculator supports both. The first counts the failures before the first success (k = 0, 1, 2, …) and has mean (1 − p)/p. The second counts the trial on which the first success happens (k = 1, 2, 3, …) and has mean 1/p. The two differ only by a shift of one, so the variance (1 − p)/p² is the same.
Like the exponential distribution, the geometric distribution is memoryless: having already failed ten times does not change the chance of succeeding on the next trial. The calculator gives the exact, cumulative and tail probabilities, highlights them on the chart and lists the mean, variance, standard deviation, median, mode, skewness and kurtosis.
How to use the Geometric Distribution Calculator
- Probability of success on each trial (p)
- Number of failures k (or trial number)
- Count
- Probability of
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
The probability of k failures followed by a success is (1 − p)ᵏ·p. Cumulative probabilities use the closed form P(X ≤ k) = 1 − (1 − p)^(k + 1), and “at least” probabilities are the complements.
Worked example
Each trial succeeds with p = 20%. The probability of exactly 3 failures before the first success is 0.8³ × 0.2 = 10.24%. The probability of at most 3 failures is 1 − 0.8⁴ = 59.04%, so at least 4 failures has probability 40.96%. On average there are (1 − 0.2)/0.2 = 4 failures before the first success (5 trials), with variance 0.8/0.04 = 20 and standard deviation 4.472.
Two conventions compared
| Measure | Failures before success (0, 1, 2, …) | Trial of success (1, 2, 3, …) |
|---|---|---|
| P(X = k) | (1 − p)ᵏ p | (1 − p)^(k−1) p |
| P(X ≤ k) | 1 − (1 − p)^(k+1) | 1 − (1 − p)ᵏ |
| Mean | (1 − p)/p | 1/p |
| Variance | (1 − p)/p² | (1 − p)/p² |
| Mode | 0 | 1 |
Formula
Failures before the first success: P(X = k) = (1 − p)ᵏ p, k = 0, 1, 2, … · mean = (1 − p)/p · Trials until the first success: P(Y = k) = (1 − p)^(k−1) p, mean = 1/p · variance = (1 − p)/p² in both cases
Worked example
Inputs — Probability of success on each trial (p): 20 %; Number of failures k (or trial number): 3; Count: Failures before the first success (k = 0, 1, 2, …); Probability of: Exactly k – P(X = k).
Results — Requested probability = 10.24 %; P(X = k) = 10.24 %; P(X ≤ k) = 59.04 %; P(X ≥ k) = 51.2 %; P(X < k) = 48.8 %; P(X > k) = 40.96 %.
Key terms
- Geometric distribution
- The number of failures (or trials) before the first success in independent trials.
- Success probability (p)
- The chance of success on each trial.
- Memoryless property
- The future waiting time does not depend on how many failures have already occurred.
Frequently asked questions
What is the probability that the first six comes on the second roll of a die?
(5/6) × (1/6) = 5/36 = 13.89% – one failure, then a success.
What is the expected number of trials until the first success?
1/p. For a die (p = 1/6) it is 6 rolls; the expected number of failures before it is 5.
What is the chance of a success within 6 rolls?
1 − (5/6)⁶ = 66.51%.
What does memoryless mean here?
P(X ≥ s + t | X ≥ s) = P(X ≥ t): past failures do not make a success "due".
Which definition should I use?
Use "failures before the first success" if your count can be 0, and "trial of the first success" if it starts at 1. The calculator handles both.
How does it relate to the negative binomial distribution?
The geometric distribution is the negative binomial with r = 1 – waiting for the first success instead of the r-th.