Moment generating function of the negative binomial distribution.

• February 13th 2009, 06:07 PM
synclastica_86
Moment generating function of the negative binomial distribution.
I am trying to find the moment generating function for the negative binomianl distribution. I know that it's baiscly finding <e^ty>. I therefore put e^ty into the sum from y=0 to infinity. I tried a few ways of solving it but I am stuck for quite sime time now. Here is what I tried:

1. Expanding e^ty and use it's summation form. But this only led to showing how the moment generating function works.
2. Use different substitutions to try and get the original form or one of it's varience back with a factor outside the summation. But this is not working too.

Am I going in the right direction?

$P\left (Y=y \right )=\binom{y+r-1}{r-1}p^r\left (1-p \right )^y; Supp\left (Y \right )=\left \{0,1,2,3,... \right \}$
$M_{Y}(t)=E(e^{ty})=\sum_{y=0}^{\infty }e^{ty}\binom{y+r-1}{r-1}p^r\left (1-p \right )^y$
$=\sum_{y=0}^{\infty }\binom{y+r-1}{y}p^r\left (1-p \right )^y\sum_{n=0}^{\infty}
\frac{(ty)^n}{n!}$

$=\sum_{n=0}^{\infty}\frac{t^n}{n!}\sum_{y=0}^{\inf ty }\frac{(y+r-1)!}{y!(r-1)!}p^r\left (1-p \right )^yy^n$
$=\sum_{n=0}^{\infty}\frac{t^n}{n!}\ E(y^n)$
• February 14th 2009, 09:57 PM
matheagle
To obtain the MGF of a Neg Binomial, you just look at it as a sum of r independent geometrics r.v.s
with parameter p. By independence that just produces the MGF of your Neg Bi as the MGF
of a geo to the power r.
• February 15th 2009, 10:33 AM
synclastica_86
Thanks for the solution. It is $\frac{p^r}{(1-(1-p)e^t)^r}$right?
But I am more interested in how these things work. I don't have a strong math background, so please forgive me if I'm asking the obvious.

Generally, I'm more comfortable with the continuous case:
$E(X)=\int_{-\infty}^{\infty}e^{tx}p(x)dx$.
I can evaluate this integral with different tools and techniques.

But the discrete case seems to be more problematic.
I can't use
$E(X)=\sum_{Supp(X)}^{}e^{tx}p(x)dx$
to get anything useful. I think that this is due to a lack of math skills.
Are there any tricks that I should know in general?

Since I now know the answer, I tried working backwards:
$\frac{p^r}{(1-(1-p)e^t)^r}=\sum_{y=0}^{\infty }e^{ty}\binom{y+r-1}{r-1}p^r\left (1-p \right )^y
$

$\frac{p^r}{(1-(1-p)e^t)^r}=\frac{p^r}{(1-(1-p)e^t)^r}\sum_{y=0}^{\infty }e^{ty}\binom{y+r-1}{r-1}\left (1-p \right )^y(1-(1-p)e^t)^r$
Therefore, I need to show that:
$1=\sum_{y=0}^{\infty }e^{ty}\binom{y+r-1}{r-1}\left (1-p \right )^y(1-(1-p)e^t)^r$
$=\sum_{y=0}^{\infty }\binom{y+r-1}{y}(\left (1-p \right )e^t)^y(1-(1-p)e^t)^r$
$=\sum_{y=0}^{\infty }\frac{(y+r-1)!}{y!(r-1)!}(\left (1-p \right )e^t)^y(1-(1-p)e^t)^r$
Now I let: $p'=(1-P)e^t$
$=\sum_{y=0}^{\infty }\frac{(y+r-1)!}{y!(r-1)!}p'^y(1-p')^r$
$=1$because that's just another Neg Bi distribution for p'.
Is this correct?
• February 15th 2009, 11:59 AM
Moo
Hello,

You have this sum :

$S=\sum_{y=0}^{\infty }e^{ty}\binom{y+r-1}{r-1}p^r\left (1-p \right )^y$
Since $p^r$ has no y in it, you can factor it out :

$S=p^r \sum_{y=0}^\infty \binom{y+r-1}{r-1} (e^t)^y (1-p)^y$
$S=p^r \sum_{y=0}^\infty \binom{y+r-1}{r-1} [e^t(1-p)]^y$

Now, have a look here : Binomial theorem - Wikipedia, the free encyclopedia (at the end of the paragraph, when they say : "r=-s"). This gives in our case :
$\frac{1}{(1-x)^r}=\sum_{y=0}^\infty \binom{r+y-1}{y} x^y{\color{red}=}\sum_{y=0}^\infty \binom{r+y-1}{r-1} x^y$

The red equality is obtained by the following identity :
$\binom{n+k-1}{k}=\binom{n+k-1}{n-1}$
Proof :
$\binom{n+k-1}{k}=\frac{(n+k-1)!}{k!(n+k-1-k)!}$
$=\frac{(n+k-1)!}{k!(n-1)!}=\frac{(n+k-1)!}{(n-1)!(n+k-1-[n-1])!}=\binom{n+k-1}{n-1}$