Factsheet: Negative binomial distribution

Statistics
Author

Michelle Arnetta and Tom Coleman

Summary
A factsheet for the negative binomial distribution.
Negative Binomial Distribution Calculator
Parameters

Probability to calculate:
The negative binomial distribution models the number of failures observed before achieving a specified number of successes.
Negative binomial distribution plot
NegBin(r = 5, p = 0.50)
Results

Where to use: The negative binomial distribution is often used to handle over-dispersed data, which means the variance exceeds the mean. It can serve as an alternative to the Poisson distribution, as the Poisson distribution assumes that the mean is equal to the variance. \(X\) represents the number of trials required to reach the targeted number of successes \(r\).

Notation: \(X \sim \textrm{NB}(r,p)\)

Parameters: Two numbers \(r,p\) where:

Quantity Value Notes
Mean \(\mathbb{E}(X) = \dfrac{r(1-p)}{p}\)
Variance \(\mathbb{V}(X) = \dfrac{r(1-p)}{p^2}\)
PMF \(\mathbb{P}(X=x)=\dfrac{(x+r-1)!}{(r-1)!x!}(1-p)^xp^r\)
CDF \(\displaystyle\mathbb{P}(X\leq x)=\sum^{x}_{i=1}\frac{(x+r-1)!}{(r-1)!x!}(1-p)^xp^r\)

Example: You flip a coin multiple times, and the probability of getting ‘heads’ is \(0.5\). You decide to stop flipping the coin once you get \(3\) ‘heads’; these do not have to be consecutive. Taking ‘heads’ as a success, this can be expressed as \(X \sim \textrm{NB}(3,0.5)\). It means the probability of success is \(0.5\), and you will stop conducting trials after you reach \(3\) successes.

Further reading

This interactive element appears in Overview: Probability distributions..

Version history

v1.0: initial version created 08/25 by tdhc.

  • v1.1: deprecated shinylive apps replaced 09/26 by tdhc.

This work is licensed under CC BY-NC-SA 4.0.

Feedback

Your feedback is appreciated and useful. Feel free to leave a comment here,
but please be specific with any issues you encounter so we can help to resolve them
(for example, what page it occured on, what you tried, and so on).