Probability
Mathematical Tools
Moments & MGFs

Moments & Moment Generating Functions (MGFs)

⚖️

If a distribution is a complex, high-dimensional object, Moments are the summary statistics that describe its "personality"—where it sits, how wide it is, and whether it has "fat" or "skewed" tails.


1. What are Moments? (The Physical Intuition)

The term "Moment" comes from Physics. If you think of a probability distribution as a physical object made of mass:

  1. The 1st Moment (Mean): This is the Center of Mass. It’s the balance point of the object.
  2. The 2nd Moment (Variance): This is the Moment of Inertia. It describes how far the mass is spread out from the center.
  3. The 3rd Moment (Skewness): This describes the Asymmetry. Is the mass leaning more to the left or right?
  4. The 4th Moment (Kurtosis): This describes the Tails. Is the mass concentrated in the center, or is there a lot of "heavy" mass far away in the outliers?

Raw vs. Central Moments

  • Raw Moment (E[Xn]E[X^n]): Calculated relative to zero. The 1st raw moment is the Mean.
  • Central Moment (E[(Xμ)n]E[(X-\mu)^n]): Calculated relative to the Mean (μ\mu). The 2nd central moment is the Variance.

2. The Moment Generating Function (MGF)

The MGF is a mathematical "magic trick." It allows us to pack every single moment (1st, 2nd, 3rd... to infinity) into a single function.

MX(t)=E[etX]M_X(t) = E[e^{tX}]

Why etXe^{tX}? (The Taylor Expansion)

This is the part that usually confuses students. Why this specific formula? It comes down to the Taylor Series for eze^{z}: etX=1+tX+(tX)22!+(tX)33!+e^{tX} = 1 + tX + \frac{(tX)^2}{2!} + \frac{(tX)^3}{3!} + \dots

When we take the Expected Value E[]E[\dots] of this expansion, we get: E[etX]=1+tE[X]+t22!E[X2]+t33!E[X3]+E[e^{tX}] = 1 + t \cdot \mathbf{E[X]} + \frac{t^2}{2!} \cdot \mathbf{E[X^2]} + \frac{t^3}{3!} \cdot \mathbf{E[X^3]} + \dots

Every raw moment of XX is sitting there as a coefficient!


3. How to "Extract" Moments

To get the nn-th moment out of the MGF, we simply:

  1. Differentiate the MGF nn times with respect to tt.
  2. Set t=0t = 0.

E[Xn]=MX(n)(0)E[X^n] = M_X^{(n)}(0)

Why do we need this?

Calculating E[Xk]E[X^k] directly usually involves a very difficult integral (xkf(x)dx\int x^k f(x) dx). The MGF turns a hard calculus problem into a much easier differentiation problem.


4. The Uniqueness Property

🆔

If two random variables have the same MGF, they must have the same distribution. The MGF is like a Unique Fingerprint.

This is how we prove things like the Central Limit Theorem. We show that as we add variables, their combined MGF approaches the MGF of a Normal distribution.

Test Your Knowledge

Example: Extracting Variance from an MGF

Suppose a random variable XX has the MGF MX(t)=(12t)3M_X(t) = (1 - 2t)^{-3}. Find the Mean and Variance of XX.

View Step-by-Step Solution

Step 1: Find the 1st Raw Moment (Mean) MX(t)=(3)(12t)4(2)=6(12t)4M_X'(t) = (-3)(1-2t)^{-4}(-2) = 6(1-2t)^{-4} E[X]=MX(0)=6(10)4=6E[X] = M_X'(0) = 6(1-0)^{-4} = 6

Step 2: Find the 2nd Raw Moment MX(t)=(6)(4)(12t)5(2)=48(12t)5M_X''(t) = (6)(-4)(1-2t)^{-5}(-2) = 48(1-2t)^{-5} E[X2]=MX(0)=48(10)5=48E[X^2] = M_X''(0) = 48(1-0)^{-5} = 48

Step 3: Calculate Variance Var(X)=E[X2](E[X])2\text{Var}(X) = E[X^2] - (E[X])^2 Var(X)=48(6)2=4836=12\text{Var}(X) = 48 - (6)^2 = 48 - 36 = 12