|
Interactive animation |
Negative binomial distribution
You're playing "Heads" and "Tails". You decide to play as long as a "Head" hasn't showed up exactly k times, and then stop the "game". How many times do you have to toss the coin ?
If, after the first game, you decide to play another one, you certainly expect the number of tosses you'll need to win this second game to be different from the number of tosses you needed to win the first one. So the number of tosses needed to win a game is a random variable, whose distribution is known as the negative binomial distribution.
The geometric distribution thus appears as the special case of the negative binomial distribution for k = 1.
A negative binomial distribution is defined by two parameters :
* p, the probability for the coin to land on "Head",
* k, the number of "Heads" you want to get before stopping the game. This parameter is sometimes known as the "size" of the distribution.
You'll find here an interactive animation that illustrates the Negative Binomial Distribution.
We give hereunder a
slightly different definition of the Negative Binomial Distribution, with slightly
different properties.
Here are some basic properties of the negative binomial distribution.
The probability Pk{L = n} of having to toss the coin n times before obtaining k "Heads" is :
|
|
with n = k, k +1, k + 2 ......
and where :

is the number of combinations of B objects among A.
Note that for k = 1, one obtains the probability function of the geometric distribution.
We have :
|
|
which is just k times the mean of the geometric
distribution for the same value of p.
We have :
|
|
which is just k times the variance of the geometric distribution for the same value of p.
These simple relationships between "geometric" and "negative binomial" are justified below.
Let Gi be k independent geometric variables, all with the same value of the parameter p. Denote L the sum of these variables :
L =
i
Gi i
= 1, 2, ..., k
We'll show that L follows a negative binomial distribution of parameter p and size k.
This provides a very simple explanation for the values of the mean and variance of the negative binomial distribution.
Another definition of the negative binomial distribution may be used, depending on the problem at hand.
Suppose "Head" is considered as a "success", while "Tail" is considered as a "failure". Then you may ask : "How many failures will have to be overcome before finally getting k successes ?". The random variable is then F, the number of failures ("Tails") in a winning game. A winning series will now be made of f failures, k successes for a total of n = k + l tosses, with the last toss being a success. We then have :
with f = 0, 1, 2, ...
The mean is:

This value is smaller by a factor q than the mean of the first definition.
We also have :

The variance has the same value as for the first definition.
Note that the variance is now always larger than the mean (by a factor 1/p). A distribution with such a property is said to be "overdispersed". This result is to be compared with that for the Poisson distribution, where the mean l is always equal to the variance. Thus, the Poisson distribution is a "limit case" of the overdispersion concept.
These basic results relative to this second definition are not demonstrated in the Tutorial below, but they can easily be obtained by following exactly the same path that we use for demonstrating the results relative to the first demonstration.
____________________________________________________________
|
Tutorial |
Here is the Table of Content of the Tutorial on the
Negative Binomial Distribution.
THE NEGATIVE BINOMIAL DISTRIBUTION
|
Probability mass function Why "negative binomial"? Taking the derivatives of the Mclaurin expansion First derivative Second derivative Mean µ Mean of the translated distribution Mean of the original distribution Variance s² Sum of independent geometric variables Additivity Moment generating function M(t) The m.g.f. Mean Variance |
||
|
TUTORIAL |
||
|
|
|
|
* Adjustable parameter and sample size. * Mean, mode. |
|
____________________________________________________________
Related readings:
|
The geometric distribution |
|
|
The Poisson distribution |