RATS 10.1
RATS 10.1

The Negative Binomial is the distribution of the number of failures in a sequence of Bernoulli trials to achieve a certain number of successes. Another related distribution is the Binomial, which looks at the number of successes in a fixed number of Bernoulli trials. (Note that there is an alternative formulation which is the distribution of the number of trials, rather than the number of failures before the required number of successes.) The geometric distribution is a special case where the number of successes is 1.
 

Parameters

The probability of success \(p\), and the desired number of successes \(r>0\). \(r\) is permitted to be real-valued, which makes this a Polya distribution. The case where \(r\) is integer-valued only is sometimes known as the Pascal distribution.

Probability Function

\(\frac{{\Gamma (x + r)}}{{\Gamma (r)\Gamma (x + 1)}}p^r (1 - p)^x \)

Support

Non-negative integers

Mean

\(r(1 - p)/p\)

Variance

\(r(1 - p)/p^2 \)

Main Uses

In addition to the direct use as defined, it can also be used as an alternative to the Poisson distribution for general count data as it has a variance that exceeds its mean (while with the Poisson, the two are identical). Typically, you would model the mean and allow either \(r\) or \(p\) to be freely estimated given that with the other solved given the mean and freely chosen parameter.

Probability Functions

%NEGBIN(x,r,p) is the probability of \(x\) given parameters \(x\) and \(p\).

 

%LOGNEGBIN(x,r,p) is the log of the probability of \(x\) given parameters \(r\) and \(p\). (%LOGNEGBIN would be used for maximum likelihood estimation for general count data).

 


Copyright © 2025 Thomas A. Doan