The geometric distribution asks how many trials until the first success. The negative binomial distribution generalizes that question to the r-th success — how many trials until a salesperson closes their 3rd deal, or a quality inspector finds their 5th defect. The geometric distribution turns out to be nothing more than the special case of the negative binomial where r=1, in the same way the binomial distribution and the negative binomial distribution both build on the same repeated-trials setup while asking genuinely different questions about it.
- The formula, and how it builds directly on the binomial coefficient
- A full worked example with a free-throw shooter's 3rd made shot
- Mean and variance, and how they scale with r
- How the negative binomial relates to both the geometric and binomial distributions
The Formula
For independent trials each with success probability p, the probability that the r-th success occurs exactly on the k-th trial is:
The logic extends the geometric distribution's directly: the k-th trial itself must be the r-th success (probability p for that specific trial), and among the first k−1 trials, exactly r−1 of them must have already been successes, in any order — which is why C(k−1, r−1), the same combinatorics used in the binomial distribution, counts how many ways those r−1 earlier successes could be arranged among the k−1 trials that came before the final, defining success.
Worked Example: The Third Made Free Throw
Problem: A basketball player makes free throws at a 70% success rate. What's the probability that her 3rd made shot happens exactly on her 5th attempt?
Here p = 0.7, r = 3 (the 3rd success), and k = 5 (on the 5th attempt).
C(4,2) = 6. P(X=5) = 6 × (0.7)³ × (0.3)² = 6 × 0.343 × 0.09 = 0.18522
There's roughly an 18.5% chance her 3rd make falls exactly on her 5th attempt — meaning exactly 2 of her first 4 shots missed, and then shot 5 goes in. Note this requires more than just knowing "2 misses and 3 makes happen among 5 shots" (a plain binomial question) — it specifically requires the last shot to be the 3rd make, which is why C(4,2) counts arrangements only among the first 4 shots, not all 5. A binomial calculation would instead ask something subtly different: the probability of exactly 3 makes somewhere among 5 shots, in any order, including sequences where the 3rd make happens earlier than the 5th shot — a related but genuinely distinct question from the one the negative binomial distribution answers here.
Mean and Variance
For the free-throw example: μ = 3/0.7 ≈ 4.29 attempts expected on average to reach the 3rd make, and σ² = 3(0.3)/0.7² ≈ 1.84, giving σ ≈ 1.36. Both formulas are simply r times the corresponding geometric-distribution formula (μ=1/p, σ²=(1−p)/p² for r=1) — reaching the r-th success takes, on average, r times as long as reaching the first one, which makes intuitive sense since each additional required success adds roughly the same expected extra wait. This additive structure is a genuinely useful property in practice: it means the negative binomial distribution's mean and variance can always be sanity-checked against the much simpler geometric-distribution formulas, just scaled by r.
A Second Worked Example: Sales Calls
Problem: A salesperson closes 15% of cold calls. What's the probability the 2nd sale happens exactly on the 10th call? What's the expected number of calls needed for 2 sales?
p = 0.15, r = 2, k = 10. C(9,1) = 9.
P(X=10) = 9 × (0.15)² × (0.85)⁸ ≈ 9 × 0.0225 × 0.2725 ≈ 0.0552
μ = 2/0.15 ≈ 13.33 calls expected on average before landing the 2nd sale — exactly double the single-sale expectation of 6.67 calls calculated in the geometric distribution's own sales-call example, confirming the "r times as long" relationship directly.
How the Three Distributions Connect
The negative binomial, geometric, and binomial distributions form a closely related family, each asking a structurally different question about the same kind of repeated, independent trials:
Binomial: fix the number of trials n in advance, and count the number of successes — the number of successes is random.
Geometric: fix the target at exactly 1 success, and count the number of trials needed — the number of trials is random. The special case of negative binomial with r=1.
Negative binomial: fix the target at r successes, and count the number of trials needed — a direct generalization of the geometric distribution to any target number of successes.
Real-World Uses
Clinical trial recruitment: the number of patient screenings needed to enroll a target number of eligible participants, at a known eligibility rate, follows a negative binomial distribution — directly useful for planning realistic trial timelines.
Quality control with a target defect count: inspecting items until finding a predetermined number of defects (rather than stopping after the first one) uses the same logic as the free-throw example, generalized to r > 1.
Overdispersed count data: beyond its "waiting time" interpretation, the negative binomial distribution is also widely used in its alternative parameterization as a flexible model for count data (like the Poisson distribution) when the data shows more variability than a Poisson distribution alone can accommodate — a common situation in real count data across many fields.
Sports analytics: the number of games a team must play to reach a target number of wins, at an estimated win probability per game, follows a negative binomial distribution — used, for example, in modeling how long a playoff series or a season milestone is likely to take under a given team-strength assumption.
Common Mistakes
Using the binomial coefficient C(k,r) instead of C(k−1,r−1). The final trial is fixed as the r-th success — only the arrangement of the r−1 successes among the first k−1 trials is genuinely random, which is exactly why the combinatorics term excludes the final trial from the count.
Forgetting that the mean scales linearly with r. Doubling the target number of successes exactly doubles the expected number of trials needed (all else equal) — a useful sanity check on any negative binomial calculation.
Mixing up which parameter is r and which is k. r is the fixed target — how many successes you're waiting for, decided in advance; k is the random outcome — how many trials it actually took. Swapping their roles produces a calculation that doesn't correspond to the question actually being asked, even if the arithmetic runs without error.
Is the negative binomial distribution discrete or continuous?
Does the negative binomial distribution require independent trials?
What's the "alternative parameterization" mentioned under overdispersed count data?
Can r be a non-integer?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals →