Negative Binomial mean

89 Views Asked by At

Let $X\sim BN(r,p)$.

If I try to compute E[X] through the Moment Generating Function I get the following:

\begin{aligned} E[X] &=\left.\frac{d}{d t} M_{X}(t)\right|_{t=0} \ &=\left.\frac{d}{d t} p^{r}\left(1-p e^{t}(1-p)\right)^{-r}\right|_{t=0} \ &=p^{r+1} r(1-p)(1-p(1-p))^{-r-1} \end{aligned}

But if I find it through the first factorial moment I get
$E\left[X^{(h)}\right]$ $=\sum_{x=0}^{\infty} \frac{x !}{(x-h) !} \frac{(x+r-1) !}{x !(r-1) !} p^{r}(1-p)^{x}$ $=\sum_{x=h}^{\infty} \frac{(x+r-1) !}{(x-h) !(r-1) !} p^{r}(1-p)^{x},\left(x^{*}=x-h\right)$ $=\sum_{x^{*}=0}^{\infty} \frac{\left(x^{*}+r+h-1\right) !}{x^{*} !(r-1) !} p^{r}(1-p)^{x^{*}+h}$ $=\frac{(r+h-1) !}{(r-1) !} \frac{(1-p)^{h}}{p^{h}} \sum_{x^{*}=0}^{\infty} \frac{\left(x^{*}+h+r+1\right) !}{x^{*} !(r+h-1) !} p^{r+h}(1-p)^{x^{*}}$ $=\frac{(r+h-1) !}{(r-1) !} \frac{(1-p)^{h}}{p^{h}}$
Therefore,
$E[X]=\frac{r(1-p)}{p}$
Where did I do wrong?

2

There are 2 best solutions below

2
On

The MGF is $\left(\dfrac{1-p}{1-p\mathrm{e}^x}\right)^r$ So taking derivatives we get

$$\frac{p\,r\,\mathrm{e}^x\cdot\left(\frac{1-p}{1-p\,\mathrm{e}^x}\right)^{r-1}}{1-p\,\mathrm{e}^x}$$ Evaluating at $x=0$ gives us $\frac{pr}{1-p}$

0
On

Your second derivation seems right. I can only guess that you made some minor error taking derivative.

Maybe it is better to compute abstract: Let $M_Y(t)$ be the moment generating function of a geometrically distributed random variable $Y$ with parameter $p\in(0,1)$, then $M_X(t)=(M_Y(t))^r$.

Therefore by chain rule $$M_X(t)'=r(M_Y(t))^{r-1}\cdot M_Y'(t)$$

Taking $t$ to zero, the result is just $\mathbb E[X]=r\cdot\mathbb E[Y]=r\cdot\frac{1-p}{p}$, as you correctly derived using the second method.