Find how many attempts it takes to reach a target number of successes: the chance the r-th success lands on a given trial, comes within it, or needs longer.
P(X = x) = C(x − 1, r − 1) pʳ (1 − p)ˣ⁻ʳ
x counts every attempt, successes and failures, up to and including the r-th success. With r = 1 this is the geometric distribution.
The negative binomial distribution counts how many attempts it takes to reach a set number of successes. The binomial fixes the attempts and counts successes; this fixes the successes and counts attempts.
Sales calls until three deals close, free throws until the third basket, or wells drilled until two strike oil all fit, as long as each attempt is independent with the same chance of success.
With a target of a single success it becomes the geometric distribution. It's also widely used for counts that vary more than a Poisson model allows, such as hospital visits or insurance claims.
Trials-until-r-successes form, as in Blitzstein and Hwang, section 4.3. See Sources.
Getting all three by the 5th throw is far more likely, at 83.7%. On average the player needs 3 ÷ 0.7 ≈ 4.3 throws.
r = 1 (the geometric case), p = 0.2: for example, a sales call that closes one time in five.
| Attempt | First success on it | By then |
|---|---|---|
| 1 | 20% | 20% |
| 2 | 16% | 36% |
| 3 | 12.8% | 48.8% |
| 5 | 8.19% | 67.23% |
| 10 | 2.68% | 89.26% |
| 15 | 0.88% | 96.48% |
| 20 | 0.29% | 98.85% |
Its probabilities are the terms of a binomial series with a negative exponent. The name is historical rather than descriptive.
The special case r = 1: the number of attempts until the first success. Its mean is 1 ÷ p.
=NEGBINOM.DIST(x − r, r, p, FALSE), where x − r is the number of failures. Use TRUE for the cumulative chance.
Reaching r successes within x trials is the same event as getting at least r successes in x trials, so the two calculators agree.
Its variance exceeds its mean, so it fits counts that bunch together, like hospital visits, better than a Poisson model.
Zero, as long as p is above 0. The chance of needing more than x trials always shrinks towards zero as x grows.
Yes. Then the r-th success comes on trial r with certainty.
Increase x until “within x trials” reaches 95%. For the free-throw example, three baskets are 95% likely within 7 throws.
Related Tools
Gaussian probabilities.
Z-score from probability.
Binary outcome probabilities.
Rare event frequency.
Time between events.
Equal probability distribution.