Negative Binomial Distribution Calculator

Calculate the probability of achieving the r-th success on the k-th trial. Find PMF, CDF, mean, and variance for the negative binomial distribution.

P(X = k)
--
Mean
--
Variance
--
Std Deviation
--
P(X ≤ k)
--

What Is the Negative Binomial Distribution?

The negative binomial distribution models the number of trials needed to achieve a specified number of successes (r) in a sequence of independent Bernoulli trials. It generalizes the geometric distribution, which is the special case where r = 1.

Applications include modeling the number of sales calls needed to reach a sales target, the number of attempts before passing an exam a certain number of times, or the number of drill holes before finding a specified number of oil reserves.

Formula

P(X=k) = C(k-1, r-1) × p^r × (1-p)^(k-r)
Mean = r/p   |   Variance = r(1-p)/p²

Where k is the trial number on which the r-th success occurs, p is the probability of success on each trial, and C(k-1, r-1) is the binomial coefficient.

Examples

r (successes)pMean TrialsVariance
10.52.002.00
30.310.0023.33
50.510.0010.00
100.812.503.13

Frequently Asked Questions

How does the negative binomial relate to the geometric distribution?

The geometric distribution is a special case of the negative binomial with r = 1 (waiting for the first success). The negative binomial is essentially the sum of r independent geometric random variables.

What is the difference from the binomial distribution?

The binomial fixes the number of trials and counts successes. The negative binomial fixes the number of successes and counts the trials needed. They answer complementary questions.

Can the negative binomial be used for overdispersed count data?

Yes, the negative binomial is commonly used as an alternative to the Poisson distribution when the variance exceeds the mean (overdispersion). It provides a more flexible model for count data.