## The Negative Binomial Distribution: pmf, mgf, mean and variance.

### The Negative Binomial Distribution

- Probability mass function
- Moment Generating Function
- Mean of Negative Binomial
- Variance of Negative Binomial Distribuiton

### The probability mass function of the negative binomial distribution

Consider the situation where one performs a number Bernoulli trials, each trial has a probability of success , and

trials continue until the th successs occurs. Let be the random variable which is the number of trials up to

and including the th success. This means that the range of X is the set . Then the pmf would be given by

Note that there are r successes and x-r previous failures, with the last success at a fixed rth position. Thus the number of possible outcomes is the number of combinations of selecting objects taken at a time.

Top | pmf | mgf | mean | variance |

### The moment generating function of the negative binomial distribution

What is the mgf of the negative binomial distribution? Let us compute the value of

Writing the first few terms of the expansion, we get

which simplifies to

and which upon factoring out and further simplication results in

It will be shown later that the bracketed terms is equivalent to

, see the blog entry A negative binomial series identity and therefore the moment generating function of the negative binomial distribution

is given by

Note that the numerator in the formula of Spiegel's Statistics in page. 118 should be raised to the power .

Top | pmf | mgf | mean | variance |

### The mean of the Negative Binomial Distribution

The expectation or mean of the negative binomial distribution with the pmf and mgf above is obtained by differentiating the mgf wrt t and setting t to zero:

When differentiated, the derivative is

and the value at t=0 is

which collapses to

Top | pmf | mgf | mean | variance |

### The variance of the Negative Binomial Distribution

The second moment or of the negative binomial distribution with the pmf and mgf above is obtained by differentiating the mgf twice wrt t and setting t to zero and the variance is computed as

We will leave as an exercise (at the moment since it is so tedious) that the variance is given by

.

This entry is subject to review but the final formulas are all right.

Top | pmf | mgf | mean | variance |

Revisions.

Feb. 20, 2010: We missed the square in the denominator! We will redo the presentation for the variance.

January 21st, 2011 at 4:41 pm

It will be better if you will provide to us the derivation of variance of negative binomial distribution by using raw moment.. (I'm from Tanzania}

January 21st, 2011 at 4:49 pm

Thanks, will take a look at this again before January is over. Reader feedback is important to us.

April 23rd, 2011 at 4:40 am

Very nice article. There is a typo in the

equation following "which simplifies to"

in the exponent of the 3rd term. Thank you.

January 1st, 2013 at 8:13 am

This is a very big effort. It has simplified my academic work. Keep it up

April 28th, 2013 at 6:36 pm

thanks.