Quiz 2
Registry Synced

Week 6.1: Moment Generating Functions

444 words
2 min read

Reading compass

Now · 1. Intuition: A "Generating" Function

Week 6.1: Moment Generating Functions

Prerequisites: Expectation (Week 3.1: Expected Value), Independence (Week 2.3: Independence of Random Variables) Cross-links: BSMA1001 (Maths 1) — series expansions Core question: Is there a single function that encodes all moments of a distribution?

1. Intuition: A "Generating" Function

The moment generating function (MGF) MX(t)M_X(t) is a function whose derivatives at t=0t=0 give the moments of XX:
E[Xk]=MX(k)(0).\mathbb{E}[X^k] = M_X^{(k)}(0).
If you know the MGF, you know all moments — and often the entire distribution.

2. Definition

Definition (MGF) For a random variable XX, the MGF is:
>MX(t)=E[etX],>> M_X(t) = \mathbb{E}[e^{tX}], >
defined for tt in a neighbourhood of 00 where the expectation exists. For discrete: MX(t)=xetxfX(x)M_X(t) = \sum_x e^{tx} f_X(x) For continuous: MX(t)=etxfX(x)dxM_X(t) = \int_{-\infty}^\infty e^{tx} f_X(x) \, dx

3. Key Properties

  1. MX(0)=1M_X(0) = 1
  2. MX(k)(0)=E[Xk]M_X^{(k)}(0) = \mathbb{E}[X^k] — the kk-th derivative at 0 gives the kk-th moment
  3. MaX+b(t)=ebtMX(at)M_{aX+b}(t) = e^{bt} M_X(at)
  4. If XX and YY are independent: MX+Y(t)=MX(t)MY(t)M_{X+Y}(t) = M_X(t) \cdot M_Y(t)
  5. If MX(t)=MY(t)M_X(t) = M_Y(t) in a neighbourhood of 0, then XX and YY have the same distribution

4. MGFs of Common Distributions

DistributionMGF MX(t)M_X(t)
Bernoulli( pp )1p+pet1-p + pe^t
Binomial( n,pn,p )(1p+pet)n(1-p+pe^t)^n
Poisson( λ\lambda )exp(λ(et1))\exp(\lambda(e^t-1))
Geometric( pp )pet1(1p)et\frac{pe^t}{1-(1-p)e^t}
Normal( μ,σ2\mu,\sigma^2 )exp(μt+σ2t22)\exp\left(\mu t + \frac{\sigma^2 t^2}{2}\right)
Exponential( λ\lambda )λλt\frac{\lambda}{\lambda - t} , t<λt < \lambda
Uniform( a,ba,b )etbetat(ba)\frac{e^{tb} - e^{ta}}{t(b-a)}

5. Using MGFs: Sum of Independent Normals

Let XN(μ1,σ12)X \sim \mathcal{N}(\mu_1, \sigma_1^2), YN(μ2,σ22)Y \sim \mathcal{N}(\mu_2, \sigma_2^2) independent. MX(t)=exp(μ1t+σ12t2/2)M_X(t) = \exp(\mu_1 t + \sigma_1^2 t^2/2), MY(t)=exp(μ2t+σ22t2/2)M_Y(t) = \exp(\mu_2 t + \sigma_2^2 t^2/2). MX+Y(t)=exp((μ1+μ2)t+(σ12+σ22)t2/2)=MGF of N(μ1+μ2,σ12+σ22)M_{X+Y}(t) = \exp((\mu_1+\mu_2)t + (\sigma_1^2+\sigma_2^2)t^2/2) = \text{MGF of } \mathcal{N}(\mu_1+\mu_2, \sigma_1^2+\sigma_2^2). So X+YN(μ1+μ2,σ12+σ22)X+Y \sim \mathcal{N}(\mu_1+\mu_2, \sigma_1^2+\sigma_2^2).

6. Practice Questions

Q1 (Easy)

XPoisson(3)X \sim \text{Poisson}(3). Find MX(t)M_X(t) and use it to find E[X]\mathbb{E}[X].
Full Solution
MX(t)=exp(3(et1))M_X(t) = \exp(3(e^t-1)).
MX(t)=exp(3(et1))3etM_X'(t) = \exp(3(e^t-1)) \cdot 3e^t, so E[X]=MX(0)=exp(0)3=3\mathbb{E}[X] = M_X'(0) = \exp(0) \cdot 3 = 3. ✓

Q2 (Medium)

XExp(2)X \sim \text{Exp}(2). Find MX(t)M_X(t) and E[X2]\mathbb{E}[X^2].
Full Solution
MX(t)=22tM_X(t) = \frac{2}{2-t} for t<2t < 2.
MX(t)=2(2t)2M_X'(t) = \frac{2}{(2-t)^2}, MX(t)=4(2t)3M_X''(t) = \frac{4}{(2-t)^3}.
E[X]=MX(0)=2/4=1/2\mathbb{E}[X] = M_X'(0) = 2/4 = 1/2. E[X2]=MX(0)=4/8=1/2\mathbb{E}[X^2] = M_X''(0) = 4/8 = 1/2.

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.