Negative Binomial Distribution
The negative binomial distribution is an extension of the geometric distribution.
Description
The geometric distribution describes the number of independent Bernoulli trials taken to acheive one success. The negative binomial distribution describes the number of trials taken to acheive r successes.
where r is a integer greater than 0. Additionally x must be an integer greater than or equal to r. That is to say, it makes no sense to ask the probability of acheiving 5 successes in 2 trials.
Moments
The expected value is given as E[X] = r/p.
Variance is given as Var[X] = r(1-p)/p2.
