Home›Math›Negative Binomial Distribution Explained

Negative Binomial Distribution Explained

The negative binomial distribution answers a different question from the ordinary binomial: not how many successes in a fixed number of trials, but how many trials until a fixed number of successes.

14 min readUpdated October 2026Binomial Distribution Calculator

The ordinary binomial distribution fixes the number of trials and lets the number of successes vary. The negative binomial distribution does the reverse: it fixes the number of successes wanted and lets the number of trials vary. It answers waiting-time questions, such as how many calls it takes to make three sales, or how many components must be tested to find the fourth defect.

Key takeaways
  • The negative binomial counts trials needed to reach a fixed number r of successes, with the same per-trial probability p and independent trials.
  • The probability that the r-th success lands on trial k is C(k minus 1, r minus 1) times p to the power r, times (1 minus p) to the power (k minus r).
  • The mean number of trials is r divided by p, and the variance is r times (1 minus p) divided by p squared. Waiting gets longer and more variable as p falls.
  • With r = 1 the distribution is geometric: the waiting time for the first success. The negative binomial is the sum of r independent geometric waits.

What the negative binomial counts

Imagine a salesperson who closes a sale on each call with probability 0.25, independently, and who needs 3 sales to hit a target. The question how many calls will it take has no fixed number of trials: the experiment stops when the third sale happens, whether that is on call 3, call 12, or call 30. The random quantity is the trial count, call it X, and X follows a negative binomial distribution with parameters r = 3 and p = 0.25. The distribution gives a probability for every possible stopping trial, starting at r itself, since at least r trials are needed for r successes, and extending without bound, since in principle the successes might take arbitrarily long to arrive. The name is historical and unhelpful: nothing about the distribution is negative except the exponent in an early derivation. Think of it as the waiting-for-r-successes distribution, and the name stops mattering.

The conditions mirror the binomial ones, with the stopping rule changed. Each trial has two outcomes, the success probability p is the same on every trial, trials are independent, and the experiment continues until the r-th success occurs. Failures before that point are counted only through the trial total: if the third success arrives on trial 7, there were exactly 4 failures among the first 6 trials, in some order. That observation is the whole formula, as the next section shows. Note what is not assumed: there is no deadline, no maximum number of trials, and no requirement that the process ever stops, although with p above zero it stops with probability 1. If p is zero, the r-th success never arrives, and the distribution is degenerate; as with the binomial, that signals a setup error rather than a calculation problem.

Two features distinguish the negative binomial from everyday intuition about waiting. First, the distribution is right-skewed: the most likely stopping trial is usually well below the mean, while a long right tail of unlucky runs pulls the average up. A salesperson with p = 0.25 needing 3 sales most often finishes in 6 to 9 calls, but the mean is 12, because occasional runs of 25 or 30 calls contribute disproportionately to the average. Second, the variance grows quickly as p falls. Halving p roughly doubles the mean wait and roughly quadruples the variance, so low-probability waiting problems are not merely slower, they are much less predictable. Anyone planning around the mean alone will be caught out by the tail; plan around a high percentile of the distribution instead, such as the trial count by which the target is reached 90 percent of the time.

The formula, and why the last trial is fixed

The probability that the r-th success occurs on trial k is P(X = k) = C(k minus 1, r minus 1) times p to the power r, times (1 minus p) to the power (k minus r), for k = r, r plus 1, and so on. The reasoning follows the stopping rule. For the r-th success to land exactly on trial k, trial k itself must be a success, which has probability p, and the first k minus 1 trials must contain exactly r minus 1 successes, in any order, with the remaining trials failures. The number of orders for those first trials is C(k minus 1, r minus 1), and each such order has probability p to the power (r minus 1) times (1 minus p) to the power (k minus r). Multiply by the final success probability p and the powers combine into the formula above. The combination uses k minus 1, not k, because the last trial is not free to vary: it is fixed as a success by the definition of the event. Using C(k, r) instead is the standard error, and it overcounts by treating sequences whose r-th success arrived earlier as if they stopped at k.

Check the formula at the boundary. When k = r, the combination C(r minus 1, r minus 1) is 1, the failure power is (1 minus p) to the power 0, which is 1, and the answer is p to the power r: the probability that the first r trials are all successes, the fastest possible finish. For r = 3 and p = 0.5, that is 0.125, or 12.5 percent. When k grows, the failure power shrinks the individual terms while the combination grows, and the product first rises then falls, producing the skewed hump. The terms sum to 1 over all k from r upward, although the sum is infinite; in practice the tail beyond a reasonable multiple of the mean contributes negligibly, and cumulative probabilities are computed by adding terms until the remainder is tiny.

PartMeaningExample: r = 3, p = 0.5, k = 5
C(k minus 1, r minus 1)Orders of the first k minus 1 trials with r minus 1 successesC(4, 2) = 6
p to the power rAll r successes, including the fixed final one0.5 to the power 3 = 0.125
(1 minus p) to the power (k minus r)The failures before the final trial0.5 to the power 2 = 0.25
ProductProbability the 3rd success lands on trial 56 times 0.125 times 0.25 = 0.1875, or 18.75%

The fixed-last-trial logic also explains why the negative binomial is sometimes parametrised by the number of failures instead of the number of trials. If Y = X minus r is the number of failures before the r-th success, then Y takes values 0, 1, 2, and so on, with P(Y = y) = C(y plus r minus 1, r minus 1) times p to the power r times (1 minus p) to the power y. The two versions describe the same process with a shifted count, and mixing them up is a common source of off-by-r errors in tables and software. When consulting any reference, check whether its variable counts trials or failures: if its support starts at 0, it counts failures; if it starts at r, it counts trials. This guide counts trials throughout, matching the waiting-time question as usually asked.

Worked examples

First, the coin example. A fair coin is tossed until the third head appears. What is the probability that the third head arrives on the fifth toss? Here r = 3, p = 0.5, k = 5. The combination C(4, 2) is 6: among the first four tosses there must be exactly two heads, in any of six orders. The success power is 0.125 and the failure power is 0.25, so the probability is 6 times 0.125 times 0.25 = 0.1875, or 18.75 percent. The fastest finish, three heads in three tosses, has probability 12.5 percent, and the fourth-toss finish has probability C(3, 2) times 0.125 times 0.5 = 3 times 0.0625 = 18.75 percent as well. The distribution peaks early and declines slowly: the chance the third head needs more than 10 tosses is still about 5.47 percent, the same tail figure that appears in the binomial distribution for at least 8 heads in 10 tosses, because the two events are equivalent. That equivalence is not a coincidence, and the next section uses it.

Second, the sales example. With p = 0.25 and r = 2, what is the probability that the second sale lands on the fourth call? C(3, 1) is 3, p squared is 0.0625, and (1 minus p) squared is 0.5625, giving 3 times 0.0625 times 0.5625 = 0.10546875, about 10.55 percent. The mean wait is r divided by p = 8 calls, so a finish on call 4 is quicker than average but entirely plausible. The probability of finishing by call 8, the mean, is roughly 63 percent, which illustrates the skew: the mean sits well above the median, because the unlucky tail stretches far to the right while the left side is bounded by r = 2. Reporting only the mean wait of 8 calls would understate how often the target is reached sooner and overstate how reliable 8 calls is as a plan. The cumulative distribution, not the mean, is the planning tool.

Third, a quality-control example. Components are tested until the fourth defective is found, with a defect probability of 0.1 per component. The probability that the fourth defect is the twentieth component tested is C(19, 3) times 0.1 to the power 4 times 0.9 to the power 16. C(19, 3) is 969, 0.1 to the power 4 is 0.0001, and 0.9 to the power 16 is about 0.1853, giving about 0.01796, or 1.80 percent. Any single stopping point is unlikely when the wait is long and variable; the useful quantities are cumulative, such as the probability of finding four defectives within 30 tests, which is the same as the binomial probability of at least 4 successes in 30 trials at p = 0.1. That duality, developed below, is how cumulative negative binomial probabilities are usually computed in practice.

Mean, variance, and the waiting-time picture

The mean number of trials to reach r successes is r divided by p. The reasoning is additive: the wait for each success averages 1 divided by p trials, and r successes require r such waits, so the total averages r divided by p. For r = 3 and p = 0.25, the mean is 12 trials. The variance is r times (1 minus p) divided by p squared, and the standard deviation is its square root. For the same parameters, the variance is 3 times 0.75 divided by 0.0625 = 36, so the standard deviation is 6 trials: as large as half the mean. For r = 3 and p = 0.5, the mean is 6 and the variance is 3 times 0.5 divided by 0.25 = 6, standard deviation about 2.45. Compare the two: halving p doubled the mean but multiplied the variance by six, because the p squared in the denominator dominates. Low success probabilities do not merely slow a process down; they make its duration much harder to predict.

The mean and variance have a clean interpretation through the geometric pieces. Each success requires a geometric wait: the first success takes on average 1 divided by p trials, the gap to the second takes the same on average, independently, and so on. Variances add for independent pieces, so the total variance is r times the single-wait variance, (1 minus p) divided by p squared. This decomposition also explains the skew: a sum of right-skewed geometric waits is itself right-skewed, though less extremely as r grows, and for large r the total wait becomes approximately normal by the central limit theorem, centred at r divided by p with the standard deviation above. For r = 20 and p = 0.25, the wait is nearly symmetric around 80; for r = 2 it is heavily skewed. Small r is where the negative binomial looks most different from a bell curve, and small r is where most everyday waiting questions live.

Planning with percentiles beats planning with the mean. The duality with the binomial gives the percentiles: the event that the r-th success arrives by trial k is exactly the event that at least r successes occur in the first k trials. So P(X at most k) equals the binomial probability of at least r successes in k trials at the same p. For the salesperson with p = 0.25 and r = 3, the chance of finishing by call 10 is the binomial probability of at least 3 successes in 10 trials, about 47.4 percent; by call 16 it is about 79.7 percent; by call 20, about 90.9 percent. A manager who budgets 12 calls, the mean, is budgeting a coin flip weighted only slightly in their favour. A budget of 20 calls covers about nine cases in ten. The percentile framing turns the distribution into a decision: choose the coverage probability first, then read off the trial count.

The geometric case: waiting for the first success

Set r = 1 and the negative binomial becomes the geometric distribution: the number of trials until the first success. The formula simplifies to P(X = k) = p times (1 minus p) to the power (k minus 1): k minus 1 failures, then a success. The mean is 1 divided by p and the variance is (1 minus p) divided by p squared. With p = 0.25, the first success arrives on the first trial 25 percent of the time, on the second 18.75 percent, on the third about 14.06 percent, declining geometrically, hence the name. The geometric distribution is memoryless: having waited 10 trials without success does not change the distribution of the remaining wait. A coin has no memory, and neither does any process satisfying the independence condition. The gambler’s fallacy is precisely the belief that a long failure run makes success due; under the model, the next trial still succeeds with probability p, and the expected remaining wait is still 1 divided by p.

Memorylessness is a strong claim and a useful diagnostic. Real waiting processes often are not memoryless: a machine that has run without failure for a long time may be more likely to fail soon through wear, or less likely because weak units have already been weeded out. When the remaining wait depends on how long you have already waited, the geometric and negative binomial models are the wrong tools, and survival or reliability models take over. Within the model, though, memorylessness gives clean results, such as the probability that the wait exceeds k trials being exactly (1 minus p) to the power k: the probability of k consecutive failures. For p = 0.25, the chance of waiting more than 10 trials for the first success is 0.75 to the power 10, about 5.63 percent. These tail probabilities are the geometric distribution’s most used output, and they follow directly from the failure run, with no sum required.

Negative binomial, binomial, or geometric?

Choose by what is fixed. If the number of trials is fixed and the number of successes is random, use the binomial distribution: how many heads in 10 tosses, how many defectives in a batch of 50. If the number of successes is fixed and the number of trials is random, use the negative binomial: how many tosses until the third head, how many calls until the second sale. If only the first success is awaited, the geometric distribution, the r = 1 negative binomial, is enough. The three models share p and independence, and they are linked by the duality used above: stopping by trial k is equivalent to reaching r successes within k trials. Any cumulative negative binomial probability can therefore be computed as a binomial tail, and any binomial tail can be read as a waiting-time statement. The hub calculator covers the fixed-trials case; waiting-time probabilities are computed through the same duality with its cumulative outputs.

ModelFixedRandomTypical question
BinomialTrials nSuccesses XHow many successes in 20 trials?
Negative binomialSuccesses rTrials XHow many trials until 3 successes?
Geometric (r = 1)First successTrials XHow long until the first success?
PoissonTime or space intervalCount in the intervalHow many events in an hour?

A common confusion is to treat the negative binomial as the binomial with a negative parameter, or as a distribution of negative counts. It is neither. The counts are ordinary positive trial numbers, and the parameters r and p are both positive. Another confusion is to apply the negative binomial when the stopping rule is a deadline rather than a success count: testing until Friday, or calling until the end of the day, fixes the trials and makes the count of successes the random quantity, which is binomial, even if the language talks about waiting. The stopping rule, not the vocabulary, decides the model. Write the stopping rule as a sentence before choosing: the experiment stops when, and what is counted at that moment.

Where it is used, and where it misleads

Quality control uses waiting-time thinking when inspection continues until a set number of defects is found, to decide whether a process has drifted. Sales and fundraising use it to plan activity: calls, visits, or pitches needed for a target number of conversions at an observed conversion rate. Ecology and accident modelling use the negative binomial in a second, related sense, as an overdispersed count distribution: when counts vary more than the Poisson allows, because risk differs across units, the negative binomial with an extra dispersion parameter fits better. That regression usage shares the name and the skewed shape but parametrises counts in a fixed interval, not waiting times. The two usages are cousins, both arising from mixing a Poisson or binomial process with varying rates, and the context usually makes clear which is meant. This guide covers the waiting-time form; the overdispersion form belongs to count regression, where the dispersion parameter, not a trial count, is the focus.

The model misleads when p drifts or trials correlate. A salesperson whose skill improves with practice has a rising p, so early failures overstate later difficulty and the model overestimates the wait. A process with clustered defects, where one fault causes several, violates independence and produces longer waits than predicted in bad patches and shorter waits in good ones. A changing environment, such as calling at different times of day with different answer rates, breaks the constant-p condition unless the trials are stratified. In each case the fix is not a more elaborate formula but a better description: split the process into homogeneous stretches, estimate p separately, or move to a model that allows p to vary. The negative binomial is exact for its conditions and approximate for everything else, like every model. Its value is that the conditions are checkable and the failure modes are visible in the data as overdispersion or drift.

A routine for waiting-time questions

State the stopping rule in one sentence: the experiment ends when the r-th success occurs. Identify r and estimate p from the per-trial probability, not from an overall proportion that mixes different conditions. Check independence and constant p, and decide whether the count wanted is trials or failures, to avoid the off-by-r shift. Compute the exact probability for a single stopping point with the formula, and cumulative probabilities through the binomial duality: the chance of finishing by trial k equals the chance of at least r successes in k binomial trials. Report the mean, r divided by p, alongside a high percentile, such as the 90 percent completion trial count, because the mean alone hides the tail that causes missed targets. Finally, sanity-check against the geometric pieces: each success should take about 1 divided by p trials on average, so a total wait far from r divided by p, or a claimed probability that does not decline sensibly with k, signals an error.

The waiting-time view reframes many binomial questions productively. Instead of asking whether 3 successes in 10 trials is likely, ask how long reaching 3 successes usually takes, and the answer carries planning information the fixed-trials view lacks. Instead of reporting a mean wait, report the distribution of waits, and a plan that looked safe on average reveals its real risk. The negative binomial distribution is the mathematics of until: until the third sale, until the fourth defect, until the target is met. Used with its conditions checked and its tail respected, it turns vague expectations about how long something will take into numbers a schedule can be built on.

Frequently asked questions

What is the negative binomial distribution?

It is the distribution of the number of trials needed to reach a fixed number r of successes, when each trial succeeds with the same probability p and trials are independent. It answers waiting-time questions, not fixed-trial count questions.

What is the negative binomial formula?

P(X = k) = C(k minus 1, r minus 1) times p to the power r, times (1 minus p) to the power (k minus r), for k = r, r plus 1, and so on. The combination counts orders of the first k minus 1 trials, and the last trial is fixed as a success.

What is the mean of the negative binomial distribution?

The mean number of trials is r divided by p. The variance is r times (1 minus p) divided by p squared. For r = 3 and p = 0.25, the mean is 12 trials with a standard deviation of 6 trials.

How is the negative binomial different from the binomial distribution?

The binomial fixes the number of trials and lets successes vary. The negative binomial fixes the number of successes and lets trials vary. They are linked: finishing by trial k equals getting at least r successes in k binomial trials.

What is the geometric distribution?

The geometric distribution is the negative binomial with r = 1: the waiting time for the first success. Its probability is p times (1 minus p) to the power (k minus 1), its mean is 1 divided by p, and it is memoryless.

Why is the negative binomial distribution right-skewed?

Because the wait is bounded below by r but unbounded above, and occasional long failure runs pull the mean above the most likely value. The mean exceeds the median, so planning on the mean alone understates the risk of a long wait.

Try it on the calculator

Use the binomial calculator for the fixed-trials side of the duality, and convert waiting-time questions into binomial tails with the rules in this guide.

Open the Binomial Distribution Calculator →
Related guides

Similar Posts