On this page
The binomial distribution fixes the number of trials and asks how many successes you get. The negative binomial turns that question around: it fixes the number of successes and asks how many trials you need. Roll a die until the third six appears, take penalty kicks until the fifth goal, test components until the second faulty one. Each is a negative binomial waiting time.
What is the negative binomial distribution?
Run independent trials, each a success with the same probability p. Let X be the number of the trial on which the r-th success happens. X can be r, r + 1, r + 2 and so on, never less than r.
The probability that the r-th success lands exactly on trial k is P(X = k) = C(k−1, r−1) pʳ (1−p)^(k−r), for k = r, r + 1, r + 2, ... (Siegrist, Probability, Mathematical Statistics and Stochastic Processes, section 11.4/11%3A_Bernoulli_Trials/11.04%3A_The_Negative_Binomial_Distribution)).
Where does that come from? For the r-th success to arrive on trial k, two things must happen:
Trial k is a success. Probability p.
The first k − 1 trials hold exactly r − 1 successes, in any order. That is an ordinary binomial probability: C(k−1, r−1) p^(r−1) (1−p)^(k−r).
Multiply the two and you have the formula. Note C(k−1, r−1), not C(k, r): the last trial is fixed as a success, so only the earlier k − 1 positions are free. To check when a set-up counts as binomial in the first place, see the four conditions that make a distribution binomial.
What are the mean and variance of the negative binomial?
The mean number of trials is E(X) = r/p, and the variance is Var(X) = r(1−p)/p² (Siegrist, section 11.4/11%3A_Bernoulli_Trials/11.04%3A_The_Negative_Binomial_Distribution)).
The mean makes sense without algebra. Each success takes 1/p trials on average, and you need r of them, so r × (1/p). Compare the binomial, where the mean is np and the variance npq; our explainer on binomial mean np and variance npq shows those side by side.
Worked example: on which roll does the third six appear?
Roll a fair die until you see your third six. Here r = 3 and p = 1/6, using the formula and mean from Siegrist, section 11.4/11%3A_Bernoulli_Trials/11.04%3A_The_Negative_Binomial_Distribution).
Fastest case. P(X = 3) = C(2, 2)(1/6)³ = 1/216, about 0.0046.
Third six on roll 10. P(X = 10) = C(9, 2)(1/6)³(5/6)⁷ = 36 × (1/216) × 0.2791, about 0.0465.
Average wait. E(X) = 3 ÷ (1/6) = 18 rolls, with variance 3 × (5/6) × 36 = 90, so a standard deviation of about 9.5 rolls.
Most likely roll. The ratio P(X = k+1) ÷ P(X = k) equals (k/(k−2)) × (5/6). It is exactly 1 at k = 12, so rolls 12 and 13 tie as the most likely, each about 0.0493.
The most likely roll sits well below the mean: a long right tail of slow waits pulls the average up.
An exam check: "third six by roll 10" means "at least three sixes in 10 rolls", a binomial question. One minus the chances of zero, one and two sixes gives 1 − (0.1615 + 0.3230 + 0.2907) ≈ 0.225. Adding the negative binomial probabilities for k = 3 to 10 gives the same 0.225, which confirms your C(k−1, r−1).
For more problems like this, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
How is it related to the geometric distribution?
Set r = 1. The formula becomes P(X = k) = (1−p)^(k−1) p, the number of trials to the first success, which is the geometric distribution (Siegrist, section 11.4/11%3A_Bernoulli_Trials/11.04%3A_The_Negative_Binomial_Distribution)).
Waiting for the third six is three independent geometric waits added together, which is why the mean is 3 × 6 = 18.
Why do scientists use it for overdispersed counts?
The Poisson distribution, the usual model for counts of random events (see how Poisson arrivals work), has its variance equal to its mean. Many real counts vary more than that; this is called overdispersion.
Biologists commonly use the negative binomial as a model for overdispersed counts, as James Lloyd-Smith notes in a 2007 PLOS ONE paper on estimating its dispersion parameter. In that form the variance is m(1 + m/k) for a mean m, so it always exceeds the mean, and a smaller dispersion parameter k (a different k from our trial number) means more dispersion.
Exams use the trial-counting version above; the mean-and-dispersion form is the one you meet in biology papers, such as Lloyd-Smith's work on infectious diseases.
If the binomial coefficient or the idea of independent trials still feels shaky, the Fermi Concept Library covers every concept in mathematics with its own lesson, so you can fill the gap before attempting the next problem.



