Exam PRandom variablesFree to read

Moment generating functions

M(t) = E[e^{tX}] encodes every moment in its derivatives at zero, and turns sums of independent variables into products.

The formulas

Definition
MX(t)=E ⁣[etX]M_X(t) = E\!\left[e^{tX}\right]
Moments
MX(k)(0)=E[Xk]M^{(k)}_X(0) = E[X^{k}]
Sum of independents
MX+Y(t)=MX(t)MY(t)M_{X+Y}(t) = M_X(t)M_Y(t)
Linear transform
MaX+b(t)=ebtMX(at)M_{aX+b}(t) = e^{bt}M_X(at)
Uniqueness
MX=MY⇒X=dYM_X = M_Y \Rightarrow X \stackrel{d}{=} Y

Where it comes from

  1. Expand etX=∑ktkXkk!e^{tX} = \sum_k \frac{t^k X^k}{k!} and take expectations term by term: the coefficient of tk/k!t^k/k! is E[Xk]E[X^k].
  2. Differentiating kk times and setting t=0t=0 therefore isolates the kkth moment.
  3. For independent XX and YY, E[et(X+Y)]=E[etX]E[etY]E[e^{t(X+Y)}] = E[e^{tX}]E[e^{tY}] - the factorisation that makes MGFs worth using at all.

Worked example

A random variable has MGF $M(t) = \left(0.3 + 0.7e^{t}\right)^{8}$. Find its variance.

  1. This is the MGF of a binomial with n=8n = 8 and p=0.7p = 0.7, by inspection of (1−p+pet)n\left(1-p+pe^{t}\right)^{n}.
  2. Uniqueness of the MGF makes that identification exact - no differentiation needed.
  3. Var⁡(X)=np(1−p)=8(0.7)(0.3)\operatorname{Var}(X) = np(1-p) = 8(0.7)(0.3).
  4. Var⁡(X)=1.68\operatorname{Var}(X) = 1.68.

Answer: 1.68

This answer is recomputed from the site’s own interest-theory and probability functions every time the test suite runs, so the page and the mathematics cannot drift apart.

Memory hooks

  • Recognise the shape before you differentiate. Most MGF questions are really 'name this distribution'.
  • M(0) = 1 always. If your MGF fails that, you have made an algebra slip.

Traps

  • Forgetting that M'(0) is E[X], not the variance.
  • Multiplying MGFs of variables that are not independent.

Related

Drill this: the Exam P question bank has original questions on this topic, and today’s free round is open to everyone.