- a generating function packs a sequence a0,a1,… into the coefficients of a power series
g(t)=j=0∑∞j!ajtj=a0+a1t+2a2t2+…
- differentiate $j$ times and set $t = 0$ to read one back: $a_j = g^{(j)}(0)$
- e.g. $g(0) = a_0$, every other term dies
- the moment generating function uses the moments aj=E(Xj), and the series collapses into one expectation
MX(t)=j=0∑∞j!E(Xj)tj=E(j=0∑∞j!(tX)j)=E(etX)
- so $E(X^j) = M_X^{(j)}(0)$: the mean is $M_X'(0)$, $E(X^2) = M_X''(0)$, and $Var(X) = M_X''(0) - M_X'(0)^2$
- doesn't always exist; the [[Characteristic function]] $E(e^{itX})$ always does
- example: exponential with rate λ, for t<λ
- MX(t)=∫0∞etxλe−λxdx=λ−tλ
- MX′(0)=λ1, MX′′(0)=λ22, so Var(X)=λ21
- the bird perching exercise from this lecture is really about memorylessness, it lives in Memoryless Property For Exponentials