< List of probability distributions < Negative binomial distribution

What is a negative binomial distribution?
A negative binomial distribution is a discrete probability distribution used to model random variables in a binomial experiment. It is used when there are exactly two mutually exclusive outcomes, labelled “success” and “failure”.
In this type of experiment, we are looking at the number of repeated trials (X) required to produce a certain number of successes (r).
A negative binomial experiment must meet the following requirements [2]:
- The experiment must consist of a sequence of independent trials.
- Each trial results in a success (S) or failure (F).
- The probability of success is the same from trial to trial.
- The experiment continues until you have r successes, where r is a positive integer (i.e., 1, 2, 3, …).
In addition, the name “negative binomial distribution” is often used only when the success parameter r is an integer. This integer version also goes by the name the Pascal distribution [3].
Properties
Probability mass function (PMF) [4]:

where
- r = number of successes
- x = number of failures
- p = probability of success.
The geometric distribution is a special case when r = 1. The Poisson distribution is a special case when the number of successes is very large (i.e. tends to infinity).
Example: you are running a weight loss experiment and need 5 people willing to participate who have never tried a weight loss program before. If the probability that a randomly selected person has never tried a weight loss regimen is 0.2, what is the probability you must ask 15 people before you can find 5 people who have never tried losing weight?
Solution: Place the following information into the formula:
- r = 5 (number of successes = people who have never tried losing weight)
- x = 10 (number of failures = people who have tried losing weight)
- p = 0.2 = probability of success.
That gives

The probability is 3.4% that you will find 5 candidates from 15 people.
There are other parameterizations for the formula. For example, an alternate version gives you the number of trials until the rth success. The count includes both successes and failures:

Here, x ≥ r, where r is a positive integer.
The mean (μ) of the negative binomial distribution is [5]
µ = r(1 − p)/p
where
- r = number of successes
- p = probability of success
The variance is
σ2 = r(1 − p)/p2 = µ + (1/r)µ2.
Binomial vs negative binomial distribution
A regular binomial distribution looks at the number of successes while the negative binomial looks at the number of failures before each success that matters. For example, if you wanted to find how many times you needed to flip a coin before getting two heads in a row, then you would use the negative binomial distribution. On the other hand, if you wanted to count the number of heads in five trials, you would use a binomial distribution instead.
Why is it called a “negative” binomial?
The distribution gets its name from the negative exponent in the binomial theorem, which is used to find binomial probabilities [5]:
1 = pr p-r = pr (1 – q)-r.
References
[1] Image: Ederporto, CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0, via Wikimedia Commons
[2] 3.5 Hypergeometric and Negative Binomial Distributions. Retrieved September 1, 2023 from: https://www.stat.purdue.edu/~zhanghao/STAT511/handout/Stt511%20Sec3.5.pdf
[3] Boost C++ libraries. Negative Binomial Distribution. Retrieved September 1, 2023 from: https://valelab4.ucsf.edu/svn/3rdpartypublic/boost/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/negative_binomial_dist.html
[4] Cook, J. (2009). Notes on the Negative Binomial Distribution. Retrieved September 1, 2023 from: Notes on the Negative Binomial Distribution
[5] Discrete distributions. Retrieved September 1, 2023 from: https://utw11041.utweb.utexas.edu/ORMM/computation/unit/rvadd/discrete_dist/neg_binomial.html
Pingback: Pólya distribution - P-Distribution