What Is the MGF of the Negative Binomial Distribution?
At a glance
- 1. Choose the convention
Let X count failures before the rth success, with success probability p.
- 2. Write the probability mass
Use the probability of x failures: choose(x + r − 1, x) p^r (1 − p)^x.
- 3. Form the generating sum
Multiply each probability by e^(tx) and sum over x from zero to infinity.
- 4. Check the domain
The sum converges when t is less than −ln(1 − p).
The negative binomial distribution has more than one common convention, so its moment-generating function (MGF) depends on what the random variable counts. The formula below uses the convention that is the number of failures before the th success, with success probability on each independent trial.
With that convention, the MGF is finite for . If your variable counts total trials instead, the adjustment is a factor of .
MGF for failures before the rth success
Let be a positive integer and let . The probability mass function is
The MGF is . Substituting the probability mass function gives
The binomial-series identity
then yields
For a real value of , the series converges when , which is equivalent to
This domain includes , as an MGF must, and . When , there are no failures and with probability one, so its MGF is for every real . The usual negative-binomial model assumes .
Worked example
Suppose you count failures before the third success, and each trial succeeds with probability . Then and , so
At , the expression equals . The mean and variance can also be checked by differentiating the logarithm of the MGF:
The mean of 4.5 is the expected number of failures before the third success; it need not be an integer.
If the variable counts total trials
Let be the number of trials up to and including the th success. Since , its MGF is
The domain is unchanged. For the example above, has mean and variance . The fixed shift by increases the mean by but does not change the variance.
A different convention counts successes before a specified number of failures. If the target is failures and each trial succeeds with probability , then the failure probability is , and the MGF for the success count is
The formula changes because the counted outcome and the event being repeated until are different.
Common mistakes
- Mixing up and . State which outcome has probability and which outcome your variable counts before using a formula.
- Forgetting the fixed shift. Counting total trials rather than failures adds to the random variable, so its MGF needs the factor .
- Ignoring the convergence condition. The expression is not finite for every real ; for failures before the th success, require .
- Treating conventions as interchangeable. A formula from a source may use the number of successes before a fixed number of failures. Compare the random variable’s definition and support before applying it.
References
- A First Course in Probability, Sheldon Ross
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.