Geometric Distribution Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter the probability of success on each trial and a trial number k to get the chance that the first success happens exactly on, by or after trial k.
Result
P(first success on trial k)
P(first success by trial k)
- P(no success in the first k trials)
- Mean number of trials (1 ÷ p)
- Variance ((1 − p) ÷ p²)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Probability of success per trial (0 to 1): enter a number from 0 to 1.
- Trial number k (1, 2, 3, …): enter 1 or more.
- Read the result: P(first success on trial k); the panel also shows P(first success by trial k), P(no success in the first k trials), Mean number of trials (1 ÷ p) and Variance ((1 − p) ÷ p²).
How this calculator works
Geometric distribution, counting the trial X on which the first success occurs, with independent trials and the same probability p each time: P(X = k) = (1 − p)^(k − 1) × p for k = 1, 2, 3, …
P(X ≤ k) = 1 − (1 − p)^k, P(X > k) = (1 − p)^k, mean = 1 ÷ p, variance = (1 − p) ÷ p².
Some textbooks count the failures before the first success instead (Y = X − 1): then P(Y = j) = (1 − p)^j × p and the mean is (1 − p) ÷ p.
The formula
| Symbol | Meaning |
|---|---|
| Probability of success per trial (0 to 1) | |
| Trial number k (1, 2, 3, …) | |
| P(first success on trial k) |
Worked example
| Probability of success per trial (0 to 1) | 0.2 |
|---|---|
| Trial number k (1, 2, 3, …) | 3 |
| P(first success by trial k) | 0.488 |
|---|---|
| P(no success in the first k trials) | 0.512 |
| Mean number of trials (1 ÷ p) | 5 |
| Variance ((1 − p) ÷ p²) | 20 |
P(first success on trial k) 0.128
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
With a 20% chance per try, what is the chance the first success is on the third try?
0.8 × 0.8 × 0.2 = 0.128, and the chance of at least one success within three tries is 1 − 0.8³ = 0.488.
How many trials should I expect before the first success?
On average 1 ÷ p trials, including the successful one: 5 trials when p = 0.2.