The Distribution That Flips The Binomial's Question Around
The binomial distribution asks: in a fixed number of trials, how many successes? The negative binomial distribution turns that on its head - it fixes the number of successes and asks how many failures pile up before you get there.
That reframing sounds small, but it changes what the distribution is for. It is the natural model whenever you keep running trials until a target number of successes lands, and you want to know how long that takes.
What Is The Negative Binomial Distribution?
The negative binomial distribution is a discrete probability distribution that counts the number of failures, $X$, occurring in a sequence of independent Bernoulli trials before a specified number of successes, $r$, is achieved. Each trial has the same probability of success, $p$, and probability of failure $1 - p$.
Two setup conditions define it:
The trials are independent and identical, each a success or failure - Bernoulli trials.
You stop when the $r$-th success occurs. The number of trials is not fixed in advance; the number of successes is.
A quick anchor: define rolling a $6$ on a die as a success ($p = \frac{1}{6}$) and stop at the third six. The negative binomial then describes how many non-six rolls (failures) you rack up before that third six. When $r = 1$, the distribution reduces to the geometric distribution - the count of failures before the first success. The successes-versus-failures counting builds directly on the binomial theorem and the combinatorics of a binomial coefficient.
A Note on conventions:
some textbooks count trials rather than failures, and some swap the roles of $p$ and $1-p$. This article uses the common convention: $X$ is the number of failures before the $r$-th success, with $p$ the success probability. Always check which version a source uses before comparing formulas.
What Is The PMF Of The Negative Binomial Distribution?
The probability mass function (PMF) gives the probability of exactly $k$ failures before the $r$-th success:
$$P(X = k) = \binom{k + r - 1}{k}, p^{r} (1 - p)^{k}, \qquad k = 0, 1, 2, \dots$$
Each piece has a plain meaning:
$p^{r}$ is the probability of the $r$ successes.
$(1 - p)^{k}$ is the probability of the $k$ failures.
$\binom{k + r - 1}{k}$ counts the ways to arrange those $k$ failures among the first $k + r - 1$ trials - the $r$-th success must land last, so only the earlier trials are free to shuffle.
That last point is the subtle part. You do not use $\binom{k+r}{k}$, because the final trial is pinned down as the $r$-th success; only the $k + r - 1$ trials before it can be rearranged. The coefficient is read from the binomial expansion machinery, where $\binom{n}{k}$ counts selections.
What Are The Mean And Variance Of The Negative Binomial Distribution?
For $X$ counting failures before the $r$-th success, with success probability $p$:
$$\text{Mean: } \mu = \frac{r(1 - p)}{p}$$ $$\text{Variance: } \sigma^{2} = \frac{r(1 - p)}{p^{2}}$$
Comparing the two lines shows a defining feature. The variance is the mean divided by $p$:
$$\sigma^{2} = \frac{\mu}{p}.$$
Since $0 < p < 1$, dividing by $p$ makes the variance larger than the mean, always. This is overdispersion: the spread exceeds what the average alone would suggest. It is the single most important practical property of the distribution, and it is why the negative binomial is the go-to model for real count data that is more variable than a simpler model allows.
When Do You Use The Negative Binomial Distribution?
Reach for the negative binomial in two related situations.
Counting trials until a fixed number of successes. How many sales calls before closing the third deal? How many rolls before the third six? Whenever the successes are the stopping condition, not the trial count.
Modelling overdispersed count data. Real-world counts - insurance claims per customer, disease cases per region, defects per batch - often vary more than a Poisson model predicts (a Poisson forces variance to equal the mean). The negative binomial has a free second parameter that lets the variance exceed the mean, so it absorbs that extra scatter.
Examples Of Negative Binomial Distribution
The set runs from a direct PMF evaluation, through the parameter-confusion mistake, up to mean, variance, and a geometric special case.
Example 1
A basketball player makes each free throw with probability $p = 0.5$. What is the probability of exactly $2$ misses before the $3$rd make?
Here a "success" is a make, $r = 3$, and $k = 2$ failures. Apply the PMF.
$$\binom{k + r - 1}{k} = \binom{2 + 3 - 1}{2} = \binom{4}{2} = 6$$ $$p^{r} = (0.5)^{3} = 0.125$$ $$(1 - p)^{k} = (0.5)^{2} = 0.25$$ $$P(X = 2) = 6 \times 0.125 \times 0.25 = 0.1875$$
Final answer: $0.1875$, or $18.75%$.
Example 2
Find the mean number of misses before the $3$rd make for the same player ($r = 3$, $p = 0.5$).
Use the mean formula, $\mu = \frac{r(1-p)}{p}$.
$$\mu = \frac{3(1 - 0.5)}{0.5}$$ $$\mu = \frac{3 \times 0.5}{0.5}$$ $$\mu = 3$$
Final answer: on average, $3$ misses before the $3$rd make.
Example 3
A quality inspector tests units until finding the $2$nd defective. Each unit is defective with probability $p = 0.2$. Find $P(X = 4)$, the probability of $4$ good units before the $2$nd defective.
Wrong path. A student sets $p = 0.2$ but plugs it into $p^{k}(1-p)^{r}$, attaching the success probability to the failures. That treats "good unit" as the success being counted, contradicting the setup where "defective" is the success ($r = 2$). The exponents get swapped and the answer comes out wrong.
Correct. Keep $p$ with the $r$ successes (defectives) and $1-p$ with the $k$ failures (good units).
$$\binom{k + r - 1}{k} = \binom{4 + 2 - 1}{4} = \binom{5}{4} = 5$$ $$p^{r} = (0.2)^{2} = 0.04$$ $$(1 - p)^{k} = (0.8)^{4} = 0.4096$$ $$P(X = 4) = 5 \times 0.04 \times 0.4096 = 0.08192$$
Final answer: $0.08192$, about $8.2%$. The probability $p$ always stays attached to the event you are counting toward.
Example 4
Find the variance for the inspector's setup ($r = 2$, $p = 0.2$).
Apply the variance formula, $\sigma^{2} = \frac{r(1-p)}{p^{2}}$.
$$\sigma^{2} = \frac{2(1 - 0.2)}{(0.2)^{2}}$$ $$\sigma^{2} = \frac{2 \times 0.8}{0.04}$$ $$\sigma^{2} = \frac{1.6}{0.04} = 40$$
Final answer: $\sigma^{2} = 40$. The mean here is $\mu = \frac{2 \times 0.8}{0.2} = 8$, and $40$ is far larger — overdispersion in action.
Example 5
Show that with $r = 1$ the PMF reduces to the geometric distribution.
Set $r = 1$ in the PMF and simplify the coefficient.
$$\binom{k + 1 - 1}{k} = \binom{k}{k} = 1$$ $$P(X = k) = 1 \times p^{1}(1 - p)^{k}$$ $$P(X = k) = p(1 - p)^{k}$$
Final answer: $P(X = k) = p(1-p)^{k}$, the geometric distribution — failures before the first success. The negative binomial contains the geometric as its $r = 1$ case.
Example 6
A telemarketer closes a sale with probability $p = 0.25$ per call and works until the $4$th sale. What is the expected number of unsuccessful calls?
The failures are the unsuccessful calls; use the mean with $r = 4$, $p = 0.25$.
$$\mu = \frac{r(1 - p)}{p}$$ $$\mu = \frac{4(1 - 0.25)}{0.25}$$ $$\mu = \frac{4 \times 0.75}{0.25} = 12$$
Final answer: $12$ unsuccessful calls on average before the $4$th sale.
How Does It Compare To The Binomial, Geometric, And Poisson?
The negative binomial sits inside a small family of counting distributions, and telling them apart comes down to what is fixed and what is counted.
Distribution | What is fixed | What is counted | Key relation |
|---|---|---|---|
Binomial | Number of trials $n$ | Successes in $n$ trials | Fixed trials, count successes |
Geometric | $1$ success | Failures before the $1$st success | Negative binomial with $r = 1$ |
Negative binomial | $r$ successes | Failures before the $r$-th success | Sum of $r$ geometric variables |
Poisson | Rate over an interval | Events in the interval | Negative binomial approaches it in a limit; variance forced to equal mean |
The one-line summary: the binomial fixes trials and counts successes; the negative binomial fixes successes and counts failures. And where the Poisson demands variance equal to the mean, the negative binomial allows variance to exceed it, which is exactly the flexibility that makes it fit messy real data. This whole family leans on the same combinatorial counting captured in Pascal's triangle.
Common Mistakes
Mistake 1: Swapping p And 1−p In The PMF
Where it slips in: deciding which probability gets the exponent $r$ and which gets $k$.
Don't do this: attach the success probability $p$ to the failures. The exponents then contradict the setup and every probability comes out wrong.
The correct way: $p^{r}$ goes with the $r$ successes you are waiting for; $(1-p)^{k}$ goes with the $k$ failures. The memoriser who learned the formula as symbols without meaning is the one who flips them - anchoring $p$ to "the event I'm counting toward" fixes it.
Mistake 2: Confusing "Failures Before" With "Total Trials"
Where it slips in: reading the problem's random variable.
Don't do this: assume $X$ counts every trial. In this convention $X$ counts only the failures; the total number of trials is $X + r$.
The correct way: decide up front whether the source counts failures or trials, and adjust. If a problem asks for total attempts, add $r$ to the failure count. The rusher who skips this reading answers a subtly different question.
Mistake 3: Assuming Variance Equals The Mean
Where it slips in: carrying a Poisson habit over to the negative binomial.
Don't do this: treat the variance as roughly equal to the mean. For the negative binomial the variance is always the mean divided by $p$, hence strictly larger.
The correct way: compute the variance from its own formula, $\sigma^{2} = \frac{r(1-p)}{p^{2}}$, and expect it to exceed the mean. That gap is the overdispersion the model exists to capture.
Conclusion
The negative binomial distribution counts the failures before the $r$-th success in independent trials with success probability $p$.
Its PMF is $P(X = k) = \binom{k+r-1}{k} p^{r}(1-p)^{k}$; the final trial is pinned as the $r$-th success, which sets the coefficient.
The mean is $\frac{r(1-p)}{p}$ and the variance is $\frac{r(1-p)}{p^{2}}$; the variance always exceeds the mean, giving overdispersion.
With $r = 1$ it becomes the geometric distribution; it is the flexible alternative to the Poisson for scattered count data.
The usual slips are swapping $p$ and $1-p$, confusing failures with total trials, and assuming variance equals the mean.
To build probability and statistics skills with a teacher, explore Bhanzu's high school math tutor sessions, one-to-one math tutoring, or structured math classes online. Want a live trainer to walk through distributions and their formulas? Book a free demo class with a Bhanzu trainer.
Read More
What is probability — the foundation every distribution is built on.
Mean, median, and mode — the summary statistics a distribution's mean sits among.
What is frequency — how counts of outcomes turn into a distribution.
Cube of a binomial — the binomial algebra that sits beneath the coefficients.
Was this article helpful?
Your feedback helps us write better content
