Negative Binomial distribution
Quick view
The Negative Binomial counts failures before observing r successes. In Phitter’s parameterization, r is the target number of successes and p success probability per trial.
If you are coming from another distribution
At r=1 it connects to Geometric under the failure-count convention. As a Gamma–Poisson mixture it explains variance larger than the mean.
History and terminology
The family grew from Pascal trial and counting problems. Modern use expanded in epidemiology, ecology, and insurance as an overdispersed alternative to Poisson.
A familiar situation
It suits data where event rates vary between units or unobserved heterogeneity exists. Dispersion may then represent mixture rather than temporal dependence.
Fitting with care
State whether the variable counts failures or total trials and whether p means success or failure; both conventions circulate.
Two stories for the same shape
In Pascal’s story, an experiment stops after r successes and the variable counts accumulated failures. In the modern regression story, a Poisson count has a rate that varies across units according to a Gamma distribution. Integrating out that unknown rate also yields a Negative Binomial law. The first story is about waiting; the second is about heterogeneity and overdispersion.
Those interpretations do not make parameterizations interchangeable. Some texts count successes, others failures, and the second parameter may be stated as a probability, a mean, or a dispersion. Always verify support and convention before comparing results. For longitudinal data, variance above the mean can arise from serial dependence rather than Gamma mixing alone.
Decision guide
A good candidate when: counts have variance greater than the mean, or failures are counted until a fixed number of successes occurs.
Compare it with: Poisson, zero-inflated models, and Beta-binomial according to mechanism. Check parameter conventions: libraries differ on successes, failures, and probability.
References
- SciPy reference: scipy.stats.nbinom — definition and parameterization
- Johnson, N. L., Kemp, A. W. & Kotz, S. (2005). Univariate Discrete Distributions, 3rd ed. Wiley.
- Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd ed. Wiley.
- Hilbe, J. M. (2011). Negative Binomial Regression, 2nd ed. Cambridge University Press.