In probability theory and statistics, the negative binomial distribution, also called a Pascal distribution, is a discrete probability distribution that models the number of failures in a sequence of independent and identically distributed Bernoulli trials before a specified/constant/fixed number of successes r {\displaystyle r} occur. (Sometimes the roles are swapped: the number of failures is fixed and the number of successes is modeled.) For example, we can define rolling a 6 on some dice as a success, and rolling any other number as a failure, and ask how many failure rolls will occur before we see the third success ( r = 3 {\displaystyle r=3} ). In such a case, the probability distribution of the number of failures that appear will be a negative binomial distribution. An alternative formulation is to model the number of total trials (instead of the number of failures). In fact, for a specified (non-random) number of successes (r), the number of failures (n − r) is random because the number of total trials (n) is random. For example, we could use the negative binomial distribution to model the number of days n (random) a certain machine works (specified by r) before it breaks down. The negative binomial distribution has a variance μ / p {\displaystyle \mu /p} , with the distribution becoming identical to Poisson in the limit p → 1 {\displaystyle p\to 1} for a given mean μ {\displaystyle \mu } (i.e. when the failures are increasingly rare). Here p ∈ [ 0 , 1 ] {\displaystyle p\in [0,1]} is the success probability of each Bernoulli trial. This can make the distribution a useful overdispersed alternative to the Poisson distribution, for example for a robust modification of Poisson regression. In epidemiology, it has been used to model disease transmission for infectious diseases where the likely number of onward infections may vary considerably from individual to individual and from setting to setting. More generally, it may be appropriate where events have positively correlated occurrences causing a larger variance than if the occurrences were independent, due to a positive covariance term. The term "negative binomial" is likely due to the fact that a certain binomial coefficient that appears in the formula for the probability mass function of the distribution can be written more simply with negative numbers.
Definitions Imagine a sequence of independent Bernoulli trials: each trial has two potential outcomes called "success" and "failure." In each trial the probability of success is p {\displaystyle p} and of failure is 1 − p {\displaystyle 1-p} . We observe this sequence until a predefined number r {\displaystyle r} of successes occurs. Then the random number of observed failures, X {\displaystyle X} , follows the negative binomial distribution:
X ∼ NB ( r , p ) {\displaystyle X\sim \operatorname {NB} (r,p)}
Probability mass function The probability mass function of the negative binomial distribution is
f ( k ; r , p ) ≡ Pr ( X = k ) = ( k + r − 1 k ) ( 1 − p ) k p r {\displaystyle f(k;r,p)\equiv \Pr(X=k)={\binom {k+r-1}{k}}(1-p)^{k}p^{r}}
where r is the number of successes, X = k is the number of failures before the r-th success, and p is the probability of success on each trial. Here, the quantity in parentheses is the binomial coefficient, and is equal to
… excerpt ends here. Continue reading the full article.


