# Working out the variance of the Poisson distribution

My lecturer in his notes uses this definition of Poisson distribution:

$$P_{X}(t)= \exp( \lambda (t-1))$$

You differentiate once and set equal $t=1$ to get $E[X]=\lambda$, but in the notes to get $E[X^2]$, he doesn't differentiate $P_{X}(t) = \exp( \lambda (t-1))$ twice and set equal $t=1$.

Instead the formulae used is this $E[X^2-X]=P_{X}''(1)$.

Can someone explain that? As it confusing the hell out of me. Like I don't know when to just differentiate twice and make it equal to $E[X^2]$ or I have to do that trick.

Or maybe you can't actually differentiate twice to get $E[X^2]$.

-
Take a look at factorial moments and factorial moment generating functions (That's what he's using). –  Mike Wierzbicki Nov 4 '11 at 1:22
@Mike Oh thanks that makes perfect sense now. –  simplicity Nov 4 '11 at 1:24

The formula $P_X(t)$ is your notes is the factorial moment generating function, defined as $$P_X(t) = \mathbb{E}( t^X )$$ Therefore: $$P_X^\prime(t) = \mathbb{E}(X t^{X-1} ) \qquad P_X^{\prime\prime}(t) = \mathbb{E}(X (X-1) t^{X-2} ) \qquad P_X^{(k)}(t) = \mathbb{E}( X(X-1) \cdots (X-k+1) t^{X-k} )$$ Setting $t=1$ afterwords makes $t^{X-k}$ factor equal 1 and you are left with expectations of linear combination of moments. Thus $$m_1 = P^\prime(1) \qquad m_2 = P_X^{\prime\prime}(1) + P_X^\prime(1) \qquad m_k = \sum_{m=0}^k \mathsf{S}^{(2)}_{k,m} P_X^{(m)}(1)$$ where $\mathsf{S}^{(2)}_{k,m}$ is the Stirling number of the second kind.

-
What is this approach called? I may look some similar approach somewhere. Maybe is it the connection between factorial moment generating function and moment generating function? –  Fan Zhang Nov 4 '11 at 3:00
@FanZhang Yes, this is exactly that. Notice that $P_X(\exp(u)) = M_X(u)$, where $M_X$ is the moment generating function. –  Sasha Nov 4 '11 at 3:55

If you were thinking about the moment generating function rather than the factorial moment generating function it would look like this:

$M_{X}(t)=\exp( \lambda (e^t-1))$ is the moment generating function of a Poisson distribution, not $\exp( \lambda (t-1))$.

Differentiate it once to $M'_{X}(t)=\lambda \exp(\lambda (e^t-1)+t)$ and set $t=0$ (not $1$) to get $E[X]=M'_{X}(0)=\lambda$.

Differentiate it again to $M''_{X}(t)=\lambda^2 \exp(\lambda (e^t-1)+2t)+\lambda \exp(\lambda (e^t-1)+t)$ and set $t=0$ to get $E[X^2]=M''_{X}(0)=\lambda^2+\lambda$.

So $\operatorname{Var}(X)=E[X^2]-(E[X])^2=\lambda^2+\lambda-\lambda^2=\lambda$ as expected.

-
As Sasha points out, you are not using the moment generating function, but I will leave this here anyway as it may be of interest to somebody. $M_X(t)$ is the usual notation for the moment generating function –  Henry Nov 4 '11 at 1:37