Definition:Negative Binomial Distribution

Definition
Let $X$ be a discrete random variable on a probability space $\left({\Omega, \Sigma, \Pr}\right)$.

There are two forms of the negative binomial distribution, as follows:

First Form
$X$ has the negative binomial distribution (of the first form) with parameters $n$ and $p$ if:


 * $\operatorname{Im} \left({X}\right) = \left\{{0, 1, 2, \ldots}\right\}$


 * $\displaystyle \Pr \left({X = k}\right) = \binom {n + k - 1} {n - 1} p^k \left({1-p}\right)^n$

where $0 < p < 1$.

It is frequently seen as:
 * $\displaystyle \Pr \left({X = k}\right) = \binom {n + k - 1} {n - 1} p^k q^n $

where $q = 1 - p$.

This is a generalization of the geometric distribution.

That is, it can be viewed as modelling the number of successes in a series of Bernoulli trials before $n$ failures have been encountered.

Second Form
$X$ has the negative binomial distribution (of the second form) with parameters $n$ and $p$ if:


 * $\operatorname{Im} \left({X}\right) = \left\{{n, n+1, n+2, \ldots}\right\}$


 * $\displaystyle \Pr \left({X = k}\right) = \binom {k-1} {n-1} p^n \left({1-p}\right)^{k-n}$

where $0 < p < 1$.

It is frequently seen as:
 * $\displaystyle \Pr \left({X = k}\right) = \binom {k-1} {n-1} q^{k-n} p^n $

where $q = 1 - p$.

This is a generalization of the shifted geometric distribution.

That is, it can be viewed as modelling the number of Bernoulli trials up to (and including) the $n$th success.