3
$\begingroup$

Problem:
Let $X$ have a Poisson distribution with parameters $\lambda$. Use moment generating function to find the mean and variance of $X$.
Answer:
For the Poisson distribution we have $M_x(t) = e^{\lambda(t-1)}$. Now, to find the mean, $u$, we compute $M_x'(0)$. \begin{align*} M_x'(t) &= \lambda e^{\lambda(t-1)} \\ M_x'(0) &= \lambda e^{\lambda(0-1)} = \lambda e^{-\lambda} \\ u &= \lambda e^{-\lambda} \end{align*} Where did I go wrong? The answer should be $\lambda$.

Here is a revised solution based upon the comments of Ekesh Kumar. I now correctly find the mean, but I get the wrong value for the variance. For the Poisson distribution we have $M_x(t) = e^{\lambda(e^t-1)}$. Now, to find the mean, $u$, we compute $M_x'(0)$. \begin{align*} M_x'(t) &= \lambda e^t e^{\lambda(e^t-1)} \\ M_x'(0) &= \lambda e^0 e^{\lambda(e^0-1)} = \lambda e^{\lambda(1-1)} \\ M_x'(0) &= \lambda \\ u &= \lambda \end{align*} Now to find $E(x^2)$, I find $M''_x(0)$. \begin{align*} M_x''(t) &= \lambda e^t ( \lambda e^t e^{\lambda(e^t-1) } ) + \lambda e^t \lambda e^t e^{\lambda(e^t-1)} \\ M_x''(0) &= \lambda e^0 ( \lambda e^0 e^{\lambda(e^0-1) } ) + \lambda e^0 \lambda e^0 e^{\lambda(e^0-1)} \\ M_x''(0) &= \lambda ( \lambda e^{\lambda(1-1) } ) + \lambda \lambda e^0 e^{\lambda(1-1)} \\ M_x''(0) &= \lambda ( \lambda e^{\lambda(1-1) } ) + \lambda \lambda e^{\lambda(0)} \\ M_x''(0) &= \lambda \lambda + \lambda \lambda = 2{\lambda}^2 \\ \sigma_2 &= M_x''(0) - u^2 = 2{\lambda}^2 - {\lambda}^2 \\ \sigma_2 &= {\lambda}^2 \end{align*}

$\endgroup$
  • $\begingroup$ That's the PGF. It only tells you anything useful when you input $t=1$. $\endgroup$ – J.G. Jan 26 at 22:31
  • $\begingroup$ @J.G. Are you saying to find the mean using a moment generating function, I should find $M'_x(1)$ not $M'_x(0)$? $\endgroup$ – Bob Jan 26 at 23:11
  • $\begingroup$ MGF at $0$, PGF at $1$, but what you calculated is actually the PGF. $\endgroup$ – J.G. Jan 26 at 23:34
2
$\begingroup$

Let's clarify the difference between two approaches. The probability-generating function$$G_X(t):=\Bbb Et^X=\sum_{k\ge0}t^ke^{-\lambda}\frac{\lambda^k}{k!}=e^{-\lambda}e^{\lambda t}$$satisfies$$G_X^{(n)}(t)=\Bbb Et^X(X)_n=\lambda^ne^{-\lambda}e^{\lambda t}$$in terms of falling Pochhammer symbols, so$$\Bbb E(X)_n=G_X^{(n)}(1)=\lambda^n.$$In particular$$\begin{align}\Bbb EX&=\lambda,\\\Bbb E(X^2-X)&=\lambda^2,\\\Bbb EX^2&=\lambda^2+\lambda,\\\operatorname{Var}X&=\Bbb EX^2-(\Bbb EX)^2=\lambda^2+\lambda-\lambda^2=\lambda.\end{align}$$The moment-generating function$$M_X(t):=\Bbb Ee^{tX}=G_X(e^t)=e^{-\lambda}e^{\lambda e^t}$$satisfies$$M_X^{(n)}(t)=\Bbb EX^ne^{tX}=e^{-\lambda}\frac{d^n}{dt^n}e^{\lambda e^t}$$so$$\Bbb EXe^{tX}=M_X^\prime(t)=\lambda e^{-\lambda}e^te^{\lambda e^t}$$and$$\Bbb EX^2e^{tX}=M_X^{\prime\prime}(t)=\lambda e^{-\lambda}e^te^{\lambda e^t}\left(1+\lambda e^t\right).$$Hence$$\Bbb EX=M_X^{\prime}(0)=\lambda e^{-\lambda}e^0e^\lambda=\lambda$$and$$\Bbb EX^2=M_X^{\prime\prime}(0)=\lambda e^{-\lambda}e^0e^{\lambda}\left(1+\lambda\right)=\lambda^2+\lambda,$$so $\operatorname{Var}X=\lambda$ by the same logic as before.

$\endgroup$
  • $\begingroup$ If $EX^2 = \lambda^2 + \lambda$ then I do not understand how you find that $Var X = \lambda$. $\endgroup$ – Bob Jan 27 at 17:40
  • 1
    $\begingroup$ @Bob As I said, subtract the squared mean. That's how you get variance. $\endgroup$ – J.G. Jan 27 at 17:47
  • $\begingroup$ Can you tell me where I went wrong? Can anybody tell me where I went wrong? $\endgroup$ – Bob Jan 28 at 0:37
  • 1
    $\begingroup$ @Bob Your calculation of $M_X^{\prime\prime}(t)$ is wrong due to bungling the product rule. Let $u:=\lambda e^t,\,v:=e^{\lambda(e^t-1)}$; then $M_X^{\prime\prime}=uv^\prime+u^\prime v$, but you calculated $2uv^\prime$ (or perhaps you were thinking of $uv^\prime+u^\prime v^\prime$). $\endgroup$ – J.G. Jan 28 at 6:49
3
$\begingroup$

Your approach is right, but your moment generating function is wrong. It should be $M_X(t) = e^{\lambda(e^t-1)}$ as derived here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.