Expectation and Variance of Negative Binomial Distribution from the MGF

1k Views Asked by At

For any $0<p<1$ and $r$ a positive integer, the probability function $$f(x)={{r+x-1}\choose{x}}p^r(1-p)^x \ \ \ \ \ \ x=0,1,2...$$ defines a random variable $X$.

I have computed the mgf of the above distribution to be $$m_X(u)=\Big(\frac{p}{1-(1-p)e^u)}\Big)^r \ \ \ \ \ \ \ u<\text{ln}((1-p)^{-1})$$

Hence compute $\ \mathbb{E}(X)\ $ and $\ Var(X)$

For the expectation, I realised that $$m'_X(0)=\mathbb{E}(X)$$ Deriving the mgf with respect to $u$ and then substituting $u=0$, $$m'_X(0)=r\Big(\frac{1-p}{p}\Big)^{r-1}$$ But this does note equal the correct expectation, which is $\frac{r(1-p)}{p}$.

Have I made a mistake somewhere?

1

There are 1 best solutions below

7
On BEST ANSWER

$\begin{align}\mathsf M'_X(u) & = \dfrac{\mathsf d~~}{\mathsf d u}\left(\dfrac{p}{1-(1-p)e^u}\right)^r\\[1ex] & =p^r \dfrac{\mathsf d (1-(1-p)e^u)^{-r}}{\mathsf d u}\\[1ex] &= p^r (1-(1-p)e^u)^{-r-1}(-r)\dfrac{\mathsf d (1-(1-p)e^u)}{\mathsf d u}\\[1ex] &= p^r r(1-(1-p)e^u)^{-r-1}(1-p)e^u\\[2ex] \mathsf M'_X(0) &= rp^{-1}(1-p)\end{align}$