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]$.