NegativeBinomial Distribution#
Univariate, Discrete, Non-Negative
The NegativeBinomial distribution describes a Poisson random variable whose rate parameter is Gamma distributed. It is commonly used as an alternative to the Poisson distribution when the variance is greater than the mean (overdispersed data).
Key properties and parameters#
Support |
\(x \in \mathbb{N}_0\) |
Mean |
\(\mu\) |
Variance |
\(\frac{\mu (\alpha + \mu)}{\alpha}\) |
Parameters:
\(\mu\) (mean) : \(\mu > 0\)
\(\alpha\) (shape) : \(\alpha > 0\)
\(n\) (number of failures) : \(n > 0\)
\(p\) (probability of success) : \(0 < p < 1\)
Alternative Parametrization:
The NegativeBinomial distribution is parametrized with \(\mu\) (mean) and \(\alpha\) a shape parameter. The variance is \(\mu + \alpha \mu^2\). This parametrization is common for linear regression. Alternatively, if parametrized in terms of \(n\) and \(p\), the negative binomial describes the probability to have \(x\) failures before the n-th success, given the probability \(p\) of success in each trial.
The link between the parameters is given by:
Probability Density Function (PDF)#
Cumulative Distribution Function (CDF)#
where \(I\) is the regularized incomplete beta function.
See also
Common Alternatives:
Poisson - The NegativeBinomial distribution arises as a continuous mixture of Poisson distributions where the mixing distribution of the Poisson rate is a gamma distribution.
ZeroInflatedNegativeBinomial - The Zero-Inflated NegativeBinomial is used when there is an excess of zero counts in the data.
HurdleNegativeBinomial - The Hurdle NegativeBinomial is used when there is an excess of zero counts in the data.
Related Distributions:
Geometric - The geometric distribution (on \(\{ 0, 1, 2, 3, \dots \}\)) is a special case of the negative binomial distribution, with \(\text{Geom}(p)=\text{NB}(1, p)\).