MGU Mathematics Series — Probability and Statistics
Part II: Multivariable Probability and Distribution Theory
Transformations · Moments · MGFs · Sums of Independent Variables
Chapter 6 of 14
MGU Mathematics Series  ·  Probability and Statistics  ·  Library Textbook Edition

Chapter 6:
Transformations, Expectation,
and Moment Methods

CDF method, change of variables, LOTUS, moments, skewness, kurtosis, moment generating functions, and the distributional algebra of sums — the analytical backbone of distribution theory

■ Math Level: Calculus-Based Probability ■

■ 14 Sections  •  Part II of 5 ■

Follows Chapters 3–5: Discrete, Continuous, and Joint Distributions  ·  Prepares for Chapter 7: Limit Theorems and Sampling Distributions

Purpose and Overview

Probability models do not always arrive in convenient form. A random variable may measure voltage, but the quantity of interest is power, which depends on the square of voltage. A model may describe individual component lifetimes, but the question concerns the total lifetime of a system built from many components. Data science pipelines routinely apply logarithms, normalizations, and other functions to raw measurements before any analysis begins. In every case, the underlying question is the same: if a random variable $X$ has a known distribution, what is the distribution of $Y = g(X)$, and what can we say about its expected value, its spread, and its shape?

This chapter develops the tools for answering that question systematically. The first half studies transformation methods: how to derive the distribution of a function of one or more random variables, starting with direct probability arguments and extending to the change-of-variables technique that uses derivatives and integrals. The second half studies moment methods: how to describe and compare distributions through their moments, and how moment generating functions provide an algebraically powerful way to compute moments, identify distributions, and analyze sums of independent random variables.

Together, transformations and moment methods form the analytical backbone of distribution theory. They are the techniques that turn raw probability models into answers about real quantities in science, engineering, finance, and data analysis. They are also the tools that will make the central limit theorem and the sampling distributions of Chapter 7 feel mathematically grounded rather than mysterious.

Students who have studied Chapters 3 through 5 carefully are well prepared. This chapter draws directly on probability density functions, cumulative distribution functions, expected value as an integral, variance, and the basic properties of joint distributions. The calculus of derivatives, integrals, and the chain rule will appear throughout. The chapter moves carefully and illustrates every technique with worked examples before asking students to apply it independently.

Opening Question

An engineer models voltage $V$ across a resistor as a random variable. The power dissipated is $P = V^2/R$, where $R$ is fixed. If the distribution of $V$ is known, what is the distribution of $P$? Can we compute $E[P]$ without finding the distribution of $P$ first? These are the questions this chapter teaches you to answer — and the answers turn out to be far more elegant than you might expect.

14Sections
12Objectives
18Key Terms
20+Worked Examples

Learning Objectives

  1. 1Find the PMF of a discrete transformed random variable $Y = g(X)$ using the direct summation method.
  2. 2Apply the CDF method to find the PDF of a continuous transformed random variable.
  3. 3Apply the change-of-variables formula to find the PDF of a monotone transformation of a continuous random variable.
  4. 4Apply the two-variable change-of-variables formula using the Jacobian determinant.
  5. 5Use LOTUS to compute $E[g(X)]$ directly from the distribution of $X$, without finding the distribution of $g(X)$.
  6. 6Compute and interpret moments, including mean, variance, skewness, and kurtosis.
  7. 7Define the moment generating function and derive it for common distributions.
  8. 8Use derivatives of the MGF to compute moments efficiently.
  9. 9Apply the MGF product theorem to identify the distribution of sums of independent random variables.
  10. 10Describe what characteristic functions are and why they are needed when MGFs do not exist.
  11. 11Apply transformation and moment methods to scientific, engineering, and data science modeling problems.
  12. 12Identify and avoid the most common errors in transformation and moment calculations.

Sections at a Glance

Sections 6.1 – 6.5
Transformation Methods: Deriving New Distributions
Functions of Random Variables · Discrete · Continuous · Change of Variables · Two Variables

Functions of Random Variables

Why We Need to Transform Random Variables

In Chapters 3 and 4, random variables were introduced as numerical functions on outcomes. We studied their distributions directly: the probability mass function or probability density function was given, and we computed probabilities, expected values, and variances from it. But in practice, the random variable whose distribution we can specify is often not the one we actually need.

Consider a few examples. A physicist measures the speed $V$ of a gas molecule, which follows a distribution related to the Maxwell–Boltzmann distribution. The kinetic energy is $E = \frac{1}{2}mV^2$. The physicist needs the distribution of $E$, not $V$. An electrical engineer models the voltage $V$ across a resistor as a random variable. The power dissipated is $P = V^2/R$. The engineer needs the distribution of $P$. A statistician models the lifetime $T$ of a component as an exponential random variable. The log-lifetime $W = \ln T$ is more symmetric and easier to work with in certain analyses. In each case, a new random variable $Y = g(X)$ is defined as a function of a known random variable $X$, and the question is how to find the distribution of $Y$.

The Two Core Ideas

Core Idea 1 — Probability Is Preserved

The probability that $Y$ falls in some set $B$ equals the probability that $X$ falls in the set of all $x$-values that $g$ maps into $B$:

$$P(Y \in B) = P(X \in g^{-1}(B))$$

where $g^{-1}(B) = \{x : g(x) \in B\}$ is the preimage of $B$ under $g$.

Core Idea 2 — CDF of Y from CDF of X

The CDF of $Y$ can always be written in terms of the CDF or PDF of $X$, because

$$F_Y(y) = P(Y \leq y) = P(g(X) \leq y).$$

Differentiating $F_Y(y)$ with respect to $y$, when possible, gives the PDF of $Y$.

There is no single method that works for every $g$ and every type of $X$. Section 6.2 handles discrete random variables directly. Section 6.3 uses the CDF method for continuous random variables. Section 6.4 develops the change-of-variables method using derivatives. Section 6.5 extends these ideas to two-variable transformations.

Transformations of Discrete Random Variables

The Direct Method

When $X$ is a discrete random variable, transforming it is conceptually straightforward. If $Y = g(X)$, then for each possible value $y$ that $Y$ can take:

Direct Method — Discrete Transformations

$$p_Y(y) = P(Y = y) = P(g(X) = y) = \sum_{\{x\,:\,g(x)=y\}} p_X(x)$$

To find the probability that $Y = y$, add up the probabilities of all values of $X$ that $g$ maps to $y$. This method requires no calculus — only careful bookkeeping over the preimage.

Worked Example 6.2.1
Squaring a discrete random variable
  • SetupLet $X$ be uniform on $\{-2, -1, 0, 1, 2\}$ with $p_X(x) = 1/5$ for each value. Define $Y = X^2$. Find the PMF of $Y$.
  • MapApply $g(x) = x^2$: $g(-2)=4$, $g(-1)=1$, $g(0)=0$, $g(1)=1$, $g(2)=4$. The possible values of $Y$ are $0, 1, 4$.
  • Sum p_Y(0) = P(X=0) = 1/5 p_Y(1) = P(X=-1) + P(X=1) = 1/5 + 1/5 = 2/5 p_Y(4) = P(X=-2) + P(X=2) = 1/5 + 1/5 = 2/5
  • Note$Y$ takes only three values though $X$ took five. The squaring function collapsed symmetric pairs into the same output, so their probabilities combined. Check: $1/5 + 2/5 + 2/5 = 1$. ✓
PMF of Y: $p_Y(0) = 1/5$, $p_Y(1) = 2/5$, $p_Y(4) = 2/5$.
Worked Example 6.2.2
A binomial transformation: number of failures
  • SetupLet $X \sim \text{Binomial}(n, p)$. Define $Y = n - X$, the number of failures in $n$ independent trials.
  • SolveFor $y \in \{0, 1, \ldots, n\}$: p_Y(y) = P(n - X = y) = P(X = n - y) = \binom{n}{n-y} p^{n-y}(1-p)^y Since $\binom{n}{n-y} = \binom{n}{y}$: p_Y(y) = \binom{n}{y}(1-p)^y p^{n-y}
  • IdentifyThis is the PMF of a $\text{Binomial}(n, 1-p)$ random variable. The transformation $Y = n - X$ switches the roles of success and failure, exchanging $p$ and $1-p$.
$Y = n - X \sim \text{Binomial}(n, 1-p)$.
Why Probabilities Sum — Mutual Exclusivity

The events $\{X = x_1\}$ and $\{X = x_2\}$ are mutually exclusive when $x_1 \neq x_2$, so $P(Y = y) = P\!\left(\bigcup_{\{x: g(x)=y\}} \{X=x\}\right) = \sum_{\{x: g(x)=y\}} P(X = x)$. No approximation is involved — the direct method is exact.

Practice 6.2Discrete Transformations
  1. Let $X$ have PMF $p_X(-1) = 1/4$, $p_X(0) = 1/2$, $p_X(1) = 1/4$. Find the PMF of $Y = X^2$. Verify that $p_Y$ sums to 1.
  2. Let $X \sim \text{Binomial}(3, 1/3)$. Find the PMF of $Y = 3 - X$ and identify its distribution.
  3. Let $X$ have PMF $p_X(1)=0.2$, $p_X(2)=0.5$, $p_X(3)=0.3$. Find the PMF of $Y = 2X - 1$.
  4. Let $X$ be uniform on $\{1, 2, 3, 4, 5, 6\}$ (a fair die). Find the PMF of $Y = |X - 3.5|$ rounded to the nearest 0.5.

Transformations of Continuous Random Variables

The CDF Method

CDF Method for Continuous Transformations

Let $X$ be a continuous random variable with PDF $f_X(x)$ and CDF $F_X(x)$. Define $Y = g(X)$. To find the PDF of $Y$:

Step 1. Express $F_Y(y) = P(Y \leq y) = P(g(X) \leq y)$ in terms of $F_X$ or as an integral of $f_X$. The key is translating $\{g(X) \leq y\}$ into an equivalent condition on $X$.

Step 2. Differentiate: $f_Y(y) = \frac{d}{dy} F_Y(y)$, wherever the derivative exists.

Worked Example 6.3.1
Square root transformation of a uniform variable
  • SetupLet $X \sim \text{Uniform}(0,1)$ with $f_X(x) = 1$ for $0 < x < 1$. Define $Y = \sqrt{X}$. Find $f_Y(y)$.
  • CDFFor $0 < y < 1$ (since $Y = \sqrt{X}$ ranges over $(0,1)$ when $X \in (0,1)$): F_Y(y) = P(Y ≤ y) = P(√X ≤ y) = P(X ≤ y²) = F_X(y²) = y²
  • Differentiatef_Y(y) = d/dy [y²] = 2y, 0 < y < 1
  • InterpretThis is the PDF of a Beta$(2,1)$ distribution. The square root compresses small values and stretches large ones, making low values of $Y$ less likely than they were for $X$.
$f_Y(y) = 2y$ for $0 < y < 1$. This is a Beta$(2,1)$ distribution.
Worked Example 6.3.2
The lognormal distribution: exponential transformation of a normal
  • SetupLet $X \sim \text{Normal}(\mu, \sigma^2)$ and define $Y = e^X$. Find the PDF of $Y$.
  • CDFFor $y > 0$ (since $e^X > 0$ always): F_Y(y) = P(Y ≤ y) = P(e^X ≤ y) = P(X ≤ ln y) = Φ((ln y − μ)/σ) where $\Phi$ is the standard normal CDF.
  • DifferentiateBy the chain rule: f_Y(y) = φ((ln y − μ)/σ) · 1/(σy) Substituting the standard normal PDF $\phi(z) = \frac{1}{\sqrt{2\pi}}e^{-z^2/2}$: f_Y(y) = 1/(yσ√(2π)) · exp(−(ln y − μ)²/(2σ²)), y > 0
  • ApplyThe lognormal distribution appears in finance (stock prices), biology (cell sizes), and environmental science (pollutant concentrations) because it models positive quantities arising as products of many small random factors.
$Y = e^X$ follows the lognormal distribution with parameters $\mu$ and $\sigma^2$.
Worked Example 6.3.3
The probability integral transform
  • SetupLet $X \sim \text{Exponential}(\lambda)$ with $f_X(x) = \lambda e^{-\lambda x}$ for $x > 0$. Define $Y = 1 - e^{-\lambda X}$. Find the distribution of $Y$.
  • RangeSince $\lambda > 0$ and $X > 0$, we have $0 < e^{-\lambda X} < 1$, so $0 < Y < 1$.
  • CDFFor $0 < y < 1$: F_Y(y) = P(1 − e^{−λX} ≤ y) = P(e^{−λX} ≥ 1−y) = P(X ≤ −ln(1−y)/λ) = F_X(−ln(1−y)/λ) = 1 − e^{ln(1−y)} = y
  • PDFf_Y(y) = d/dy [y] = 1, 0 < y < 1
$Y \sim \text{Uniform}(0,1)$. This is the probability integral transform: $F_X(X)$ is always $\text{Uniform}(0,1)$ when $F_X$ is continuous.
The Probability Integral Transform — Why It Matters

The result that $F_X(X) \sim \text{Uniform}(0,1)$ is fundamental to simulation: to generate a random variable $X$ with CDF $F_X$, generate $U \sim \text{Uniform}(0,1)$ and set $X = F_X^{-1}(U)$. This is the inverse transform method used in every statistical computing package.

Practice 6.3CDF Method
  1. Let $X \sim \text{Uniform}(0,1)$. Use the CDF method to find the PDF of $Y = X^3$. Verify that $f_Y$ integrates to 1.
  2. Let $X \sim \text{Exponential}(1)$. Find the PDF of $Y = \ln X$ using the CDF method.
  3. Let $X \sim \text{Uniform}(0, 4)$. Find the PDF of $Y = \sqrt{X}$ and identify its distribution family.
  4. Let $X \sim \text{Exponential}(\lambda)$. Show that $Y = e^{-\lambda X} \sim \text{Uniform}(0,1)$ using the CDF method.

Change of Variables in One Dimension

Theorem — Change of Variables (One Dimension)

Let $X$ be a continuous random variable with PDF $f_X(x)$ supported on an interval $I$. Let $g: I \to \mathbb{R}$ be a strictly monotone, differentiable function, and define $Y = g(X)$. Then $Y$ has PDF

$$f_Y(y) = f_X\!\left(g^{-1}(y)\right) \cdot \left|\frac{d}{dy} g^{-1}(y)\right|$$

for $y$ in the range of $g$. The term $|dg^{-1}/dy|$ is the Jacobian of the transformation. It corrects for how the transformation stretches or compresses probability, exactly as the substitution rule corrects for stretching in a change-of-variable integral.

When $g$ is strictly increasing, $F_Y(y) = F_X(g^{-1}(y))$, and differentiating by the chain rule gives the formula directly. When $g$ is strictly decreasing, $F_Y(y) = 1 - F_X(g^{-1}(y))$, and differentiating introduces a negative sign that is cancelled by the absolute value. Both cases are unified by the absolute value in the formula.

Worked Example 6.4.1
Power transformation of a uniform variable
  • SetupLet $X \sim \text{Uniform}(0,1)$ and define $Y = X^3$. Since $g(x) = x^3$ is strictly increasing on $(0,1)$, the change-of-variables formula applies.
  • Inverseg⁻¹(y) = y^(1/3), d/dy g⁻¹(y) = (1/3)y^(−2/3)
  • Applyf_Y(y) = f_X(y^(1/3)) · (1/3)y^(−2/3) = 1 · (1/3)y^(−2/3) = (1/3)y^(−2/3), 0 < y < 1
  • InterpretSince $y^{-2/3}$ is large near $y = 0$, cubing concentrates probability near zero — small numbers cubed become much smaller.
$f_Y(y) = \frac{1}{3}y^{-2/3}$ for $0 < y < 1$. This is a Beta$(1/3, 1)$ distribution.
Worked Example 6.4.2
Log transformation of an exponential — the Gumbel distribution
  • SetupLet $X \sim \text{Exponential}(1)$ with $f_X(x) = e^{-x}$ for $x > 0$. Define $Y = -\ln X$.
  • Inverse$g(x) = -\ln x$ is strictly decreasing. The inverse is $g^{-1}(y) = e^{-y}$ for $y \in \mathbb{R}$. d/dy g⁻¹(y) = −e^(−y), |d/dy g⁻¹(y)| = e^(−y)
  • Applyf_Y(y) = f_X(e^(−y)) · e^(−y) = e^(−e^(−y)) · e^(−y), y ∈ ℝ
  • IdentifyThis is the standard Gumbel distribution, used in extreme value theory to model the distribution of maximum values — floods, wind speeds, material strength limits.
$f_Y(y) = e^{-y} e^{-e^{-y}}$ for $y \in \mathbb{R}$. This is the standard Gumbel distribution.

When $g$ Is Not Monotone: Sum Over Monotone Pieces

Theorem — Change of Variables (Non-Monotone Case)

Suppose the support of $X$ can be partitioned into intervals $I_1, I_2, \ldots, I_k$ on each of which $g$ is strictly monotone. Let $g_j^{-1}$ denote the inverse of $g$ on $I_j$. Then

$$f_Y(y) = \sum_{j=1}^{k} f_X\!\left(g_j^{-1}(y)\right) \cdot \left|\frac{d}{dy} g_j^{-1}(y)\right|.$$

Worked Example 6.4.3
$Y = X^2$ when $X$ is standard normal — the chi-squared distribution
  • SetupLet $X \sim \text{Normal}(0,1)$ and define $Y = X^2$. Since $g(x) = x^2$ is decreasing on $(-\infty, 0)$ and increasing on $(0, \infty)$, we apply the formula on each piece.
  • Two branchesOn $(-\infty, 0)$: $g_1^{-1}(y) = -\sqrt{y}$, $|d(-\sqrt{y})/dy| = 1/(2\sqrt{y})$.
    On $(0,\infty)$: $g_2^{-1}(y) = \sqrt{y}$, $|d(\sqrt{y})/dy| = 1/(2\sqrt{y})$.
  • CombineSince the standard normal PDF is symmetric, $f_X(-\sqrt{y}) = f_X(\sqrt{y}) = \frac{1}{\sqrt{2\pi}}e^{-y/2}$: f_Y(y) = 2 · (1/√(2π)) e^(−y/2) · 1/(2√y) = (1/√(2πy)) e^(−y/2), y > 0
  • IdentifyThis is the chi-squared distribution with 1 degree of freedom: $Y \sim \chi^2(1)$. It is fundamental in statistics — it appears in hypothesis tests and confidence intervals whenever squared normal random variables arise.
$Y = X^2 \sim \chi^2(1)$ when $X \sim \text{Normal}(0,1)$.
Student Warning — Always Check Monotonicity First

The single-branch change-of-variables formula requires that $g$ is strictly monotone on the entire support of $X$. Applying it to $g(x) = x^2$ on all of $\mathbb{R}$ without splitting into two branches is one of the most common errors in transformation problems. Always partition the support if $g$ changes direction.

Practice 6.4Change of Variables
  1. Let $X \sim \text{Uniform}(0,4)$. Using the change-of-variables formula, find the PDF of $Y = \sqrt{X}$.
  2. Let $X \sim \text{Exponential}(1)$. Show that $Y = 2X \sim \text{Exponential}(1/2)$ using the change-of-variables formula.
  3. Let $X \sim \text{Uniform}(-2, 2)$. Find the PDF of $Y = X^2$ by partitioning the support into two monotone pieces.
  4. Let $X \sim \text{Normal}(0,1)$. Find $P(X^2 > 3.84)$ using the chi-squared distribution from Example 6.4.3 and a standard table.

Transformations of Two Variables: An Introduction

In many applications, we transform two random variables simultaneously. If $(X, Y)$ is a pair of random variables with a known joint distribution, and we define $U = g(X,Y)$ and $V = h(X,Y)$, what is the joint distribution of $(U,V)$?

Theorem — Change of Variables (Two Dimensions)

When the transformation $(u,v) = (g(x,y), h(x,y))$ is one-to-one and differentiable, with inverse $x = x(u,v)$ and $y = y(u,v)$:

$$f_{U,V}(u,v) = f_{X,Y}(x(u,v),\, y(u,v)) \cdot |J|$$

where $|J|$ is the absolute value of the Jacobian determinant of the inverse transformation:

$$J = \frac{\partial(x,y)}{\partial(u,v)} = \begin{vmatrix} \partial x/\partial u & \partial x/\partial v \\ \partial y/\partial u & \partial y/\partial v \end{vmatrix} = \frac{\partial x}{\partial u}\frac{\partial y}{\partial v} - \frac{\partial x}{\partial v}\frac{\partial y}{\partial u}.$$

Worked Example 6.5.1
Sum and difference of two uniform variables — the triangular distribution
  • SetupLet $X$ and $Y$ be independent, each $\text{Uniform}(0,1)$, so $f_{X,Y}(x,y) = 1$ on $(0,1)^2$. Define $U = X + Y$ and $V = X - Y$.
  • Inverse$x = (U+V)/2$, $y = (U-V)/2$.
  • Jacobian J = |1/2 · (−1/2) − (1/2) · 1/2| = |−1/4 − 1/4| = 1/2
  • Joint PDFf_{U,V}(u,v) = 1 · (1/2) = 1/2
  • Marginal of UIntegrating over valid $v$-values:
    For $0 < u \leq 1$: $f_U(u) = \int_{-u}^{u} \frac{1}{2}\,dv = u$
    For $1 < u < 2$: $f_U(u) = \int_{u-2}^{2-u} \frac{1}{2}\,dv = 2 - u$
$U = X+Y$ has the triangular distribution on $(0,2)$. The sum of two uniform variables is not uniform — it is triangular, a first hint that sums tend toward bell-shaped distributions.
Worked Example 6.5.2
Polar coordinates of two standard normals — the Rayleigh distribution
  • SetupLet $X, Y \stackrel{\text{iid}}{\sim} \text{Normal}(0,1)$. Define $R = \sqrt{X^2+Y^2}$ and $\Theta = \arctan(Y/X)$.
  • Joint PDFf_{X,Y}(x,y) = (1/2π) e^(−(x²+y²)/2)
  • JacobianInverse: $x = r\cos\theta$, $y = r\sin\theta$. The Jacobian is $|J| = r$ (the polar coordinates Jacobian).
  • Result f_{R,Θ}(r,θ) = (1/2π) e^(−r²/2) · r = (r e^(−r²/2)) · (1/2π) This factors into $f_R(r) = r e^{-r^2/2}$ (Rayleigh distribution) and $f_\Theta(\theta) = 1/(2\pi)$ (Uniform on $(0,2\pi)$). So $R$ and $\Theta$ are independent.
  • ApplyThis result underlies the Box–Muller algorithm: to generate two independent standard normals, generate $R$ and $\Theta$ independently, then convert back: $X = R\cos\Theta$, $Y = R\sin\Theta$.
$R$ (Rayleigh) and $\Theta$ (Uniform$(0,2\pi)$) are independent. This is the foundation of the Box–Muller simulation method.
Practice 6.5Two-Variable Transformations
  1. Let $X, Y$ be independent, each $\text{Uniform}(0,2)$. Find the marginal PDF of $U = X + Y$ by the Jacobian method or convolution.
  2. Let $X, Y$ be independent $\text{Exponential}(1)$ variables. Define $U = X + Y$, $V = X/(X+Y)$. Compute the Jacobian and find $f_{U,V}(u,v)$. What is the marginal distribution of $V$?
Sections 6.6 – 6.7
Expectation and Moments: Summarizing Distributions
LOTUS · Expected Value of Functions · Moments · Skewness · Kurtosis

Expected Value of $g(X)$

The Law of the Unconscious Statistician

Theorem — LOTUS (Law of the Unconscious Statistician)

Let $X$ be a random variable and let $g$ be a function such that $E[g(X)]$ exists.

If $X$ is discrete with PMF $p_X(x)$:    $E[g(X)] = \displaystyle\sum_{x} g(x)\, p_X(x)$

If $X$ is continuous with PDF $f_X(x)$:    $E[g(X)] = \displaystyle\int_{-\infty}^{\infty} g(x)\, f_X(x)\, dx$

In either case, we compute $E[g(X)]$ by averaging $g(x)$ with respect to the distribution of $X$, without needing to find the distribution of $g(X)$ first.

The name "unconscious statistician" refers to the fact that students sometimes apply this formula without realizing it requires justification. It is true, and a careful proof uses the definition of expected value and properties of probability. LOTUS allows us to compute $E[X^2]$, $E[\sqrt{X}]$, $E[e^{tX}]$, and any other expected value of a function directly from the original distribution.

Worked Example 6.6.1
$E[X^2]$ for an exponential variable using LOTUS
  • SetupLet $X \sim \text{Exponential}(\lambda)$ with $f_X(x) = \lambda e^{-\lambda x}$ for $x > 0$.
  • LOTUSE[X²] = ∫₀^∞ x² · λe^(−λx) dx = λ · (2/λ³) = 2/λ²
  • CheckSince $E[X] = 1/\lambda$, we verify: $\text{Var}(X) = E[X^2] - (E[X])^2 = 2/\lambda^2 - 1/\lambda^2 = 1/\lambda^2$, consistent with the known exponential variance. ✓
$E[X^2] = 2/\lambda^2$.
Worked Example 6.6.2
$E[e^{tX}]$ for a Bernoulli variable — preview of the MGF
  • SetupLet $X \sim \text{Bernoulli}(p)$, so $P(X=0) = 1-p$ and $P(X=1) = p$.
  • LOTUSE[e^(tX)] = e^(t·0)(1−p) + e^(t·1)·p = (1−p) + pe^t
  • NoteThis expression, as a function of $t$, is the moment generating function of $X$ — the subject of Section 6.8.
$E[e^{tX}] = (1-p) + pe^t$ for all $t$.
LOTUS for Two Variables

For two random variables $X$ and $Y$ with joint PDF $f_{X,Y}(x,y)$: $E[g(X,Y)] = \int\!\!\int g(x,y)\, f_{X,Y}(x,y)\, dx\, dy$. The covariance formula from Chapter 5, $\text{Cov}(X,Y) = E[(X-\mu_X)(Y-\mu_Y)]$, is exactly LOTUS applied to $g(x,y) = (x-\mu_X)(y-\mu_Y)$.

Jensen's Inequality — Do Not Confuse $E[g(X)]$ with $g(E[X])$

For a convex function $g$, Jensen's inequality says $E[g(X)] \geq g(E[X])$, with equality only when $X$ is constant. A common error is writing $E[1/X] = 1/E[X]$ or $E[X^2] = (E[X])^2$. Both are wrong. Use LOTUS to compute $E[g(X)]$ directly. Numerical example: if $X \sim \text{Uniform}(1,3)$, then $E[X] = 2$ but $E[1/X] = \frac{1}{2}\ln 3 \approx 0.549 \neq 0.5 = 1/E[X]$.

Practice 6.6LOTUS — Expected Value of Functions
  1. Let $X \sim \text{Uniform}(0,1)$. Use LOTUS to compute $E[X^3]$, $E[\sqrt{X}]$, and $E[-\ln X]$.
  2. Let $X \sim \text{Exponential}(1)$. Use LOTUS to compute $E[e^{X/2}]$. For what values of $c$ does $E[e^{cX}]$ exist?
  3. Let $X \sim \text{Normal}(0,1)$. Use LOTUS to verify that $E[X^2] = 1$ and compute $E[X^4]$.
  4. Let $X$ and $Y$ be independent with $E[X] = 2$ and $E[Y] = 5$. Compute $E[XY]$ and $E[3X - 2Y + 1]$.
  5. Suppose $X$ has PDF $f(x) = 2x$ for $0 < x < 1$. Compute $E[1/X]$ and $E[\ln X]$ using LOTUS. Verify that $E[1/X] > 1/E[X]$ (Jensen's inequality).

Moments

What Moments Measure

The word moment comes from physics, where the moment of a force measures its rotational effect. In probability, moments measure the shape of a distribution quantitatively and systematically.

Definitions — Moments and Central Moments

The $k$-th moment of $X$ is $\mu_k' = E[X^k]$, $k = 1, 2, 3, \ldots$

The $k$-th central moment of $X$ is $\mu_k = E[(X - \mu)^k]$, where $\mu = E[X]$.

The first moment $\mu_1' = E[X]$ is the mean: center of the distribution. The second central moment $\mu_2 = \text{Var}(X)$: spread. Higher moments describe shape in finer detail.

MomentFormulaWhat It MeasuresNormal Value
Mean$E[X]$Center of the distribution$\mu$
Variance$E[(X-\mu)^2]$Spread around the mean$\sigma^2$
Skewness$E[(X-\mu)^3]/\sigma^3$Asymmetry; positive = right tail$0$
Kurtosis$E[(X-\mu)^4]/\sigma^4$Tail weight; leptokurtic > 3$3$

Skewness

Skewness measures asymmetry. If the distribution is symmetric about its mean, $\mu_3 = 0$ because positive and negative deviations cancel. A long right tail gives positive skewness; a long left tail gives negative skewness. Dividing by $\sigma^3$ makes skewness unitless so it can be compared across distributions of different scales.

$$\text{Skewness} = \frac{E[(X-\mu)^3]}{\sigma^3}$$

Kurtosis

Kurtosis $= E[(X-\mu)^4]/\sigma^4$ measures tail weight relative to the center. The normal distribution has kurtosis exactly 3. Distributions with heavier tails than the normal (leptokurtic) have kurtosis greater than 3. Distributions with lighter tails (platykurtic) have kurtosis less than 3. Excess kurtosis = kurtosis $-$ 3 centers the comparison at the normal.

Worked Example 6.7.1
Moments of the exponential distribution
  • SetupLet $X \sim \text{Exponential}(\lambda)$. Using LOTUS with the gamma integral $\int_0^\infty x^k \lambda e^{-\lambda x}\,dx = k!/\lambda^k$:
  • Moments E[X] = 1/λ, E[X²] = 2/λ², E[X³] = 6/λ³, E[X⁴] = 24/λ⁴
  • VarianceVar(X) = E[X²] − (E[X])² = 2/λ² − 1/λ² = 1/λ²
  • SkewnessThird central moment: $\mu_3 = E[X^3] - 3E[X^2]E[X] + 2(E[X])^3 = 6/\lambda^3 - 6/\lambda^3 + 2/\lambda^3 = 2/\lambda^3$. Skewness = μ₃/σ³ = (2/λ³)/(1/λ³) = 2 The exponential always has skewness exactly 2, regardless of $\lambda$ — confirming its long right tail.
$E[X^k] = k!/\lambda^k$. Skewness $= 2$. Kurtosis $= 9$. The exponential is right-skewed and leptokurtic.
The Moment Problem

If we know all the moments $E[X], E[X^2], E[X^3], \ldots$, can we recover the distribution? In many important cases, yes — the sequence of moments uniquely determines the distribution. This motivates the moment generating function of Section 6.8, which packages all the moments into a single analytic function.

Practice 6.7Moments, Skewness, and Kurtosis
  1. Let $X \sim \text{Uniform}(a,b)$. Compute $E[X]$, $E[X^2]$, and $\text{Var}(X)$ by integration. Compute the skewness and explain why it equals zero.
  2. Let $X \sim \text{Exponential}(2)$. Compute the first four moments and the kurtosis. Is $X$ leptokurtic or platykurtic relative to the normal?
  3. Let $X \sim \text{Bernoulli}(p)$. Compute $E[X]$, $\text{Var}(X)$, and the skewness. Show that skewness $= (1-2p)/\sqrt{p(1-p)}$.
  4. Explain in your own words why a distribution with positive skewness typically has a mean greater than its median. Sketch a hypothetical density curve illustrating this.
Sections 6.8 – 6.9
Moment Generating Functions: A Single Function for All Moments
Definition · Derivations for Common Distributions · Uniqueness · Moments from Derivatives

Moment Generating Functions

Definition — Moment Generating Function

The moment generating function (MGF) of a random variable $X$ is

$$M_X(t) = E\!\left[e^{tX}\right]$$

for all values of $t$ in an open interval around 0 where this expectation exists and is finite.

For discrete $X$: $M_X(t) = \sum_x e^{tx} p_X(x)$.   For continuous $X$: $M_X(t) = \int_{-\infty}^{\infty} e^{tx} f_X(x)\, dx$.

The MGF is a function of $t$, not of $x$. The random variable $X$ lives in the expectation; $t$ is a parameter we use to extract information.

Why $e^{tX}$? The Connection to Moments

The Taylor expansion of $e^{tX}$ reveals the connection to moments:

$$e^{tX} = \sum_{k=0}^{\infty} \frac{(tX)^k}{k!} \quad \Longrightarrow \quad M_X(t) = E[e^{tX}] = \sum_{k=0}^{\infty} \frac{t^k}{k!} E[X^k] = \sum_{k=0}^{\infty} \frac{t^k}{k!} \mu_k'.$$

The MGF is a generating function for the moments: the $k$-th moment appears as the coefficient of $t^k/k!$ in the Taylor series of $M_X(t)$. Differentiating $k$ times and evaluating at $t=0$ recovers $\mu_k'$.

DistributionParameter(s)$M_X(t)$Domain of $t$
Bernoulli$(p)$$p$$(1-p) + pe^t$All $t$
Binomial$(n,p)$$n, p$$((1-p) + pe^t)^n$All $t$
Geometric$(p)$$p$$pe^t / (1-(1-p)e^t)$$t < -\ln(1-p)$
Poisson$(\lambda)$$\lambda$$e^{\lambda(e^t - 1)}$All $t$
Uniform$(a,b)$$a, b$$(e^{tb} - e^{ta}) / (t(b-a))$$t \neq 0$
Exponential$(\lambda)$$\lambda$$\lambda / (\lambda - t)$$t < \lambda$
Normal$(\mu, \sigma^2)$$\mu, \sigma^2$$e^{\mu t + \sigma^2 t^2/2}$All $t$
Gamma$(\alpha, \beta)$$\alpha, \beta$$(\beta/(\beta-t))^\alpha$$t < \beta$
Worked Example 6.8.1
Deriving the MGF of the Poisson distribution
  • SetupLet $X \sim \text{Poisson}(\lambda)$ with $p_X(k) = e^{-\lambda}\lambda^k/k!$ for $k = 0, 1, 2, \ldots$
  • Compute M_X(t) = Σ_{k=0}^∞ e^(tk) · e^(−λ)λ^k/k! = e^(−λ) Σ_{k=0}^∞ (e^t λ)^k/k! = e^(−λ) · e^(λe^t) = e^(λ(e^t − 1))
  • Verify$M_X(0) = e^{\lambda(1-1)} = e^0 = 1$. ✓ (Every MGF must satisfy $M_X(0) = E[e^0] = 1$.)
$M_X(t) = e^{\lambda(e^t - 1)}$ for all real $t$.
Worked Example 6.8.2
Deriving the MGF of the normal distribution
  • SetupLet $X \sim \text{Normal}(\mu, \sigma^2)$. Compute $M_X(t) = \int_{-\infty}^\infty e^{tx} \cdot \frac{1}{\sigma\sqrt{2\pi}}e^{-(x-\mu)^2/(2\sigma^2)}\,dx$.
  • CombineIn the exponent: $tx - \frac{(x-\mu)^2}{2\sigma^2}$. Complete the square in $x$: = −(x − (μ + σ²t))²/(2σ²) + μt + σ²t²/2
  • IntegrateFactor out the constant $e^{\mu t + \sigma^2 t^2/2}$. The remaining integral is the integral of a Normal$(\mu + \sigma^2 t,\, \sigma^2)$ PDF, which equals 1: M_X(t) = e^(μt + σ²t²/2) · 1 = e^(μt + σ²t²/2)
$M_X(t) = e^{\mu t + \sigma^2 t^2/2}$ for all real $t$. This is one of the most important MGFs in all of statistics.
Theorem — Uniqueness of MGFs

If two random variables $X$ and $Y$ have the same MGF — $M_X(t) = M_Y(t)$ for all $t$ in some open interval around 0 — then $X$ and $Y$ have the same distribution.

This means: if we compute the MGF of a random variable and recognize it as the MGF of a known distribution, we have identified the distribution exactly. This is a powerful shortcut that the next two sections will use repeatedly.

Practice 6.8Deriving and Recognizing MGFs
  1. Derive the MGF of $X \sim \text{Binomial}(n,p)$ by writing $X = X_1 + \cdots + X_n$ where each $X_i \sim \text{Bernoulli}(p)$ is independent, and using the MGF of the Bernoulli.
  2. Derive the MGF of $X \sim \text{Exponential}(\lambda)$ from $M_X(t) = \int_0^\infty e^{tx} \lambda e^{-\lambda x}\,dx$. State the domain of $t$.
  3. Suppose $M_X(t) = \left(\frac{1}{3}e^t + \frac{2}{3}\right)^{10}$. Identify the distribution of $X$.
  4. Prove that $M_X(0) = 1$ for every random variable $X$ with an MGF. What does this mean probabilistically?
  5. Let $X \sim \text{Poisson}(2)$ and $Y \sim \text{Poisson}(5)$ be given. Without computing any sum, write down $M_X(t)$ and $M_Y(t)$ from the table.

Using MGFs to Find Moments

Theorem — Moments from the MGF

If $M_X(t)$ exists in an open interval around $t = 0$, then for each positive integer $k$:

$$E[X^k] = M_X^{(k)}(0)$$

where $M_X^{(k)}(0)$ denotes the $k$-th derivative of $M_X(t)$ evaluated at $t = 0$. This follows directly from differentiating the Taylor series $M_X(t) = \sum_{k=0}^\infty \frac{t^k}{k!} E[X^k]$ term by term.

Worked Example 6.9.1
Moments from the Poisson MGF
  • Setup$X \sim \text{Poisson}(\lambda)$ with $M_X(t) = e^{\lambda(e^t - 1)}$.
  • 1st Moment M_X'(t) = e^(λ(e^t−1)) · λe^t At $t=0$: $M_X'(0) = 1 \cdot \lambda \cdot 1 = \lambda$. So $E[X] = \lambda$. ✓
  • 2nd Moment M_X''(t) = λe^t e^(λ(e^t−1)) + λ²e^(2t) e^(λ(e^t−1)) At $t=0$: $M_X''(0) = \lambda + \lambda^2$. So $E[X^2] = \lambda + \lambda^2$.
  • VarianceVar(X) = E[X²] − (E[X])² = (λ + λ²) − λ² = λ ✓
  • ConfirmThis confirms the classical result that both the mean and variance of the Poisson distribution equal $\lambda$.
$E[X] = \lambda$, $\text{Var}(X) = \lambda$ — confirmed by the MGF.
Worked Example 6.9.2
Moments from the normal MGF
  • Setup$X \sim \text{Normal}(\mu, \sigma^2)$ with $M_X(t) = e^{\mu t + \sigma^2 t^2/2}$.
  • 1st Moment M_X'(t) = (μ + σ²t) e^(μt + σ²t²/2) At $t=0$: $M_X'(0) = \mu$. So $E[X] = \mu$. ✓
  • 2nd Moment M_X''(t) = σ² e^(μt + σ²t²/2) + (μ + σ²t)² e^(μt + σ²t²/2) At $t=0$: $M_X''(0) = \sigma^2 + \mu^2$. So $E[X^2] = \mu^2 + \sigma^2$.
  • VarianceVar(X) = E[X²] − (E[X])² = (μ² + σ²) − μ² = σ² ✓
$E[X] = \mu$, $\text{Var}(X) = \sigma^2$ — confirmed by the MGF with far less integration work.
Worked Example 6.9.3
Moments from the exponential MGF
  • Setup$X \sim \text{Exponential}(\lambda)$ with $M_X(t) = \lambda(\lambda - t)^{-1}$ for $t < \lambda$.
  • Differentiate M_X'(t) = λ(λ−t)^(−2) → M_X'(0) = 1/λ M_X''(t) = 2λ(λ−t)^(−3) → M_X''(0) = 2/λ² In general: $M_X^{(k)}(0) = k!/\lambda^k$, confirming the formula derived in Section 6.7.
$E[X^k] = k!/\lambda^k$ — the exponential moments, derived efficiently by differentiating $\lambda/(\lambda-t)$.
Practice 6.9Moments from MGFs
  1. Let $X \sim \text{Exponential}(3)$. Write down $M_X(t)$, differentiate twice, and find $E[X]$, $E[X^2]$, and $\text{Var}(X)$ by evaluating at $t = 0$.
  2. Let $X \sim \text{Normal}(5, 4)$. Find $E[X]$ and $\text{Var}(X)$ by differentiating $M_X(t) = e^{5t + 2t^2}$.
  3. The MGF of $X$ is $M_X(t) = (1-2t)^{-3}$ for $t < 1/2$. Find $E[X]$ and $\text{Var}(X)$ by differentiation. Then identify the distribution of $X$ by comparing to the gamma MGF.
  4. Let $X \sim \text{Poisson}(5)$. Find $E[X(X-1)(X-2)]$ by computing $M_X'''(0)$ and expressing the answer in terms of factorial moments.
Sections 6.10 – 6.11
Sums, Independence, and Characteristic Functions
MGF Product Theorem · Sums of Poissons, Normals, Exponentials · Characteristic Functions

MGFs and Sums of Independent Random Variables

Theorem — MGF of a Sum

If $X_1, X_2, \ldots, X_n$ are independent random variables, then

$$M_{X_1 + X_2 + \cdots + X_n}(t) = M_{X_1}(t) \cdot M_{X_2}(t) \cdots M_{X_n}(t).$$

Proof: By independence, $e^{tX_1}, \ldots, e^{tX_n}$ are independent, so $E[e^{t(X_1+\cdots+X_n)}] = E[e^{tX_1}] \cdots E[e^{tX_n}]$. $\square$

Combined with the uniqueness theorem, this converts the problem of finding the distribution of a sum into simple multiplication of MGFs.

Worked Example 6.10.1
Sum of independent Poissons
  • SetupLet $X_1 \sim \text{Poisson}(\lambda_1)$ and $X_2 \sim \text{Poisson}(\lambda_2)$ be independent. Define $S = X_1 + X_2$.
  • MGF M_S(t) = M_{X₁}(t) · M_{X₂}(t) = e^(λ₁(e^t−1)) · e^(λ₂(e^t−1)) = e^((λ₁+λ₂)(e^t−1))
  • IdentifyBy the uniqueness theorem, this is the MGF of $\text{Poisson}(\lambda_1 + \lambda_2)$. So $S \sim \text{Poisson}(\lambda_1 + \lambda_2)$.
  • ApplyIf events arrive from two independent Poisson processes at rates $\lambda_1$ and $\lambda_2$, the combined process has rate $\lambda_1 + \lambda_2$. This is the reproductive property of the Poisson distribution.
$X_1 + X_2 \sim \text{Poisson}(\lambda_1 + \lambda_2)$.
Worked Example 6.10.2
Sum of independent normals
  • SetupLet $X_1 \sim \text{Normal}(\mu_1, \sigma_1^2)$ and $X_2 \sim \text{Normal}(\mu_2, \sigma_2^2)$ be independent.
  • MGF M_{X₁+X₂}(t) = e^(μ₁t + σ₁²t²/2) · e^(μ₂t + σ₂²t²/2) = e^((μ₁+μ₂)t + (σ₁²+σ₂²)t²/2)
  • IdentifyBy the uniqueness theorem, $X_1 + X_2 \sim \text{Normal}(\mu_1 + \mu_2,\, \sigma_1^2 + \sigma_2^2)$.
  • GeneralizeIf $X_i \sim \text{Normal}(\mu_i, \sigma_i^2)$ independently, then $\sum X_i \sim \text{Normal}(\sum \mu_i, \sum \sigma_i^2)$. Means and variances both add — normal distributions are stable under summation.
$X_1 + X_2 \sim \text{Normal}(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2)$.
Worked Example 6.10.3
Sum of independent exponentials is gamma
  • SetupLet $X_1, \ldots, X_n$ be independent, each $\sim \text{Exponential}(\lambda)$. Let $S = X_1 + \cdots + X_n$.
  • MGFM_S(t) = (λ/(λ−t))^n
  • IdentifyFrom the table in Section 6.8, this is the MGF of a $\text{Gamma}(n, \lambda)$ distribution. So $S \sim \text{Gamma}(n, \lambda)$.
  • ApplyIf events occur as a Poisson process at rate $\lambda$, the waiting time until the $n$-th event is the sum of $n$ independent exponential waiting times — a Gamma$(n, \lambda)$ distribution. This connects the Poisson process to the gamma distribution.
$\sum_{i=1}^n X_i \sim \text{Gamma}(n, \lambda)$ when each $X_i \sim \text{Exponential}(\lambda)$ independently.

MGF of a Linear Function

MGF of $Y = aX + b$

$$M_{aX+b}(t) = E[e^{t(aX+b)}] = e^{tb} E[e^{(at)X}] = e^{tb} M_X(at).$$

Application: The standardization $Z = (X-\mu)/\sigma$ of a Normal$(\mu, \sigma^2)$ variable has $M_Z(t) = e^{-\mu t/\sigma} M_X(t/\sigma) = e^{t^2/2}$, which is the MGF of Standard Normal$(0,1)$. The standardization of any normal is standard normal — confirmed by the MGF.

Student Warning — Independence Is Required

The factorization $M_{X+Y}(t) = M_X(t) M_Y(t)$ requires that $X$ and $Y$ be independent. If they are correlated, the MGF of the sum is not the product of the MGFs. Always verify independence before applying the product theorem.

Practice 6.10MGFs and Sums
  1. Let $X_1, X_2, X_3$ be independent with $X_i \sim \text{Poisson}(\lambda_i)$ for $i = 1, 2, 3$. Find the MGF of $S = X_1 + X_2 + X_3$ and identify its distribution.
  2. Let $X_1, \ldots, X_5$ be independent, each $\sim \text{Exponential}(2)$. Find the distribution of $S = \sum_{i=1}^5 X_i$, its mean, and its variance.
  3. Let $X \sim \text{Normal}(0,1)$ and $Y \sim \text{Normal}(0,1)$ be independent. Use the MGF product theorem to show that $X + Y \sim \text{Normal}(0, 2)$.
  4. Let $X \sim \text{Normal}(2, 9)$. Find the MGF of $Y = 3X - 1$ using the linear transformation formula.
  5. The MGF of $X$ is $M_X(t) = e^{2(e^t-1)}$. Find $P(X=0)$, $P(X=1)$, $E[X]$, and $\text{Var}(X)$.

Characteristic Functions: A Preview

Limitations of MGFs

Moment generating functions are powerful, but they have one significant limitation: they may not exist. The MGF is $E[e^{tX}]$, and for some distributions this expectation is infinite for all $t \neq 0$. The Cauchy distribution, for example, has no finite mean or variance. Its MGF does not exist for any $t \neq 0$. Yet the Cauchy distribution is perfectly well-defined as a probability model, and we would like an analogous tool to study it.

Definition — Characteristic Function

The characteristic function of a random variable $X$ is

$$\varphi_X(t) = E\!\left[e^{itX}\right] = E[\cos(tX)] + i\, E[\sin(tX)]$$

where $i = \sqrt{-1}$ and $t \in \mathbb{R}$. Since $|e^{itX}| = 1$ for all $X$ and $t$, $\varphi_X(t)$ always exists and is finite for every distribution — no convergence concerns. When the MGF exists, $\varphi_X(t) = M_X(it)$.

The characteristic function satisfies the same uniqueness and product theorems as the MGF:

PropertyMGFCharacteristic Function
Uniqueness$M_X(t) = M_Y(t)$ ⟹ same distribution$\varphi_X(t) = \varphi_Y(t)$ ⟹ same distribution
Sum of independent$M_{X+Y}(t) = M_X(t) M_Y(t)$$\varphi_{X+Y}(t) = \varphi_X(t)\varphi_Y(t)$
ExistenceMay not exist (heavy tails)Always exists for every distribution
DomainReal $t$ near 0All real $t$, complex values
Worked Example 6.11.1
Characteristic function of the standard normal
  • From MGFThe standard normal has $M_X(t) = e^{t^2/2}$. Substituting $t \mapsto it$: φ_X(t) = M_X(it) = e^(it)²/2 = e^(−t²/2)
  • NoteThe characteristic function of the normal is itself a Gaussian function in $t$ — a remarkable property connected to Fourier analysis. The normal distribution is its own Fourier transform.
$\varphi_X(t) = e^{-t^2/2}$ for the standard normal.
Bridge to the Central Limit Theorem

Characteristic functions are fundamental in rigorous proofs of the central limit theorem. If $S_n = X_1 + \cdots + X_n$ is a standardized sum of $n$ i.i.d. random variables, then $\varphi_{S_n/\sqrt{n}}(t) = [\varphi_X(t/\sqrt{n})]^n$. Expanding in a Taylor series in $t/\sqrt{n}$ and taking $n \to \infty$ yields $e^{-t^2/2}$, the characteristic function of the standard normal. The central limit theorem follows. Chapter 7 will develop this intuition fully.

Practice 6.11Characteristic Functions — Conceptual
  1. Explain in your own words why the characteristic function always exists, while the MGF may not. What feature of $|e^{itX}|$ is the key?
  2. The Cauchy distribution has no finite mean or variance. Explain why it nevertheless has a well-defined characteristic function.
  3. For $X \sim \text{Poisson}(\lambda)$, the MGF is $M_X(t) = e^{\lambda(e^t-1)}$. Write down $\varphi_X(t)$ using the relation $\varphi_X(t) = M_X(it)$.
Sections 6.12 – 6.14
Modeling, Common Mistakes, and the Road to Limit Theorems
Delta Method · Log Transformations · Variance Stabilization · Errors · Bridge to Chapter 7

Transformation Methods in Modeling

The Delta Method

In statistics, measurements are often nonlinear functions of estimated quantities. If $\bar{X}$ is the sample mean of $n$ observations from a distribution with mean $\mu$ and variance $\sigma^2$, then for large $n$, $\bar{X}$ is approximately normally distributed. But if we are interested in $g(\bar{X})$ — say, $\bar{X}^2$ or $1/\bar{X}$ — what is its approximate distribution? The delta method provides an answer using a first-order Taylor expansion.

The Delta Method

If $g$ is differentiable at $\mu$ and $\bar{X}$ has $E[\bar{X}] = \mu$ and $\text{Var}(\bar{X}) = \sigma^2/n$, then

$$\text{Var}(g(\bar{X})) \approx [g'(\mu)]^2 \cdot \frac{\sigma^2}{n}.$$

This follows from the linearization $g(\bar{X}) \approx g(\mu) + g'(\mu)(\bar{X} - \mu)$ and the variance of a linear function.

Worked Example 6.12.1
Delta method applied to the square root transformation
  • SetupSuppose $\bar{X}$ estimates $\mu = 4$ with $\text{Var}(\bar{X}) = \sigma^2/n = 0.1$. Approximate $\text{Var}(\sqrt{\bar{X}})$.
  • Apply$g(x) = \sqrt{x}$, so $g'(x) = 1/(2\sqrt{x})$ and $g'(\mu) = g'(4) = 1/4$.
  • ResultVar(√X̄) ≈ (1/4)² · 0.1 = (1/16) · 0.1 = 0.00625
$\text{Var}(\sqrt{\bar{X}}) \approx 0.00625$. The delta method propagates uncertainty through the transformation.

Log Transformations in Biology and Finance

Many natural measurements — incomes, species abundances, stock prices — span several orders of magnitude. They often follow skewed, right-tailed distributions. Log transformation compresses the upper tail, reduces skewness, and often makes the distribution approximately normal.

If $X$ is lognormal (so $\ln X \sim \text{Normal}(\mu, \sigma^2)$), we can derive the moments of $X$ using LOTUS with the MGF of the normal. Let $Y = \ln X$, so $X = e^Y$:

$$E[X] = E[e^Y] = M_Y(1) = e^{\mu + \sigma^2/2}.$$

$$\text{Var}(X) = e^{2\mu + \sigma^2}(e^{\sigma^2} - 1).$$

These formulas show how transformation methods connect the moments of a transformed variable to the MGF of the original. Note that $E[X] > e^\mu$: the mean exceeds the median ($e^\mu$) because the lognormal is right-skewed.

Variance Stabilizing Transformations

The variance of a random variable often depends on its mean. The Poisson distribution has $\text{Var}(X) = E[X] = \lambda$. If we observe Poisson counts with different means $\lambda_1, \lambda_2, \ldots$, their variances differ, complicating analysis. The delta method suggests finding a transformation $g$ such that $[g'(\lambda)]^2 \cdot \lambda \approx c$ for all $\lambda$, where $c$ is constant.

Solving: $g'(\lambda) = c/\sqrt{\lambda}$, giving $g(\lambda) = 2c\sqrt{\lambda}$. The square root transformation $g(X) = \sqrt{X}$ approximately stabilizes the variance of Poisson counts. After applying $g$, all transformed observations have approximately the same variance, simplifying comparison and modeling.

Worked Example 6.12.2
Reliability engineering — system lifetime as a sum
  • SetupA system has $n$ components that operate sequentially. Each component has lifetime $\sim \text{Exponential}(\lambda)$, and components are independent. The total system lifetime is $S_n = X_1 + \cdots + X_n$.
  • DistributionBy Section 6.10, $S_n \sim \text{Gamma}(n, \lambda)$.
  • Survival prob.The probability that the system survives at least $t$ hours: P(S_n > t) = 1 − F_{Gamma(n,λ)}(t) evaluated from the incomplete gamma function. Engineers use this to compute reliability requirements.
Total system lifetime $\sim$ Gamma$(n, \lambda)$, with $E[S_n] = n/\lambda$ and $\text{Var}(S_n) = n/\lambda^2$.
Practice 6.12Modeling Applications
  1. Household income $X$ follows a lognormal distribution with $\ln X \sim \text{Normal}(10.5, 0.64)$. Find the mean income $E[X]$ and the median income. Explain why the mean exceeds the median.
  2. Using the delta method, approximate $\text{Var}(1/\bar{X})$ in terms of $\mu = E[X]$ and $\text{Var}(\bar{X}) = \sigma^2/n$.
  3. For Poisson counts, show using the delta method that the square root transformation $g(X) = \sqrt{X}$ approximately stabilizes variance. That is, show $[g'(\lambda)]^2 \cdot \lambda \approx \text{constant}$ for all $\lambda > 0$.
  4. A satellite has 3 independent backup computers, each with exponential lifetime with mean 2 years. Find the distribution of total operational lifetime, its mean, and the probability it exceeds 8 years.

Common Transformation and Moment Mistakes

Mistake 1 — Applying Change of Variables to a Non-Monotone Function Without Splitting
For X ∼ Normal(0,1): f_Y(y) = f_X(√y) · 1/(2√y) [one branch only]

Fix: When $g(x) = x^2$ is applied to $X \in \mathbb{R}$, $g$ is decreasing on $(-\infty, 0)$ and increasing on $(0, \infty)$. Apply the formula on each piece and sum the results. The correct PDF is $f_Y(y) = 2 \cdot f_X(\sqrt{y}) \cdot \frac{1}{2\sqrt{y}} = f_X(\sqrt{y})/\sqrt{y}$, giving the chi-squared distribution. The one-branch answer integrates to $1/2$, not $1$.

Mistake 2 — Forgetting to State the Support of the Transformed Variable
f_Y(y) = 2y [no support stated]

Fix: Always determine the range of $Y = g(X)$ from the range of $X$ and the function $g$, and explicitly write it. The complete answer is $f_Y(y) = 2y$ for $0 < y < 1$ (and 0 otherwise). Without the support, a PDF is incomplete and may integrate to a value other than 1.

Mistake 3 — Confusing $E[g(X)]$ with $g(E[X])$
E[1/X] = 1/E[X] or E[X²] = (E[X])²

Fix: These equalities are false unless $X$ is constant. Jensen's inequality says $E[g(X)] \geq g(E[X])$ for convex $g$. Always use LOTUS to compute $E[g(X)] = \int g(x) f_X(x)\,dx$ directly. Numerical counterexample: for $X \sim \text{Uniform}(1,3)$, $E[X] = 2$ but $E[1/X] = \frac{1}{2}\ln 3 \approx 0.549 \neq 0.5$.

Mistake 4 — Forgetting the Jacobian
f_Y(y) = f_X(g⁻¹(y)) [Jacobian omitted]

Fix: The Jacobian $|dg^{-1}/dy|$ is always required. It corrects for how the transformation stretches probability. Omitting it produces a function that has the right shape but does not integrate to 1 and is not a valid PDF. Always write and compute the Jacobian term explicitly.

Mistake 5 — Evaluating the MGF at a Point to Get a Moment
For Exponential(4): E[X²] = M_X(2) = 4/(4−2) = 2

Fix: $M_X(2)$ is just the value of the MGF at $t = 2$; it has no direct meaning as a moment. The $k$-th moment is $M_X^{(k)}(0)$ — the $k$-th derivative evaluated at $t = 0$. For Exponential$(4)$: $M_X''(t) = 8(4-t)^{-3}$, so $E[X^2] = M_X''(0) = 8/64 = 1/8$. Check: $E[X^2] = 2/\lambda^2 = 2/16 = 1/8$. ✓

Mistake 6 — Using the MGF Product Rule Without Checking Independence
M_{X+Y}(t) = M_X(t) · M_Y(t) [assuming X, Y are correlated]

Fix: The product rule holds only for independent random variables. If $X$ and $Y$ are correlated, $M_{X+Y}(t) \neq M_X(t)M_Y(t)$ in general. Verify independence — either from the problem statement or by checking that the joint distribution factors as a product of the marginals — before applying the theorem.

Mistake 7 — Miscomputing the Inverse Transformation
If y = e^x, then x = e^(−y) [incorrect inverse]

Fix: The inverse of $y = e^x$ is $x = \ln y$, not $x = e^{-y}$. Always verify the inverse by checking that $g(g^{-1}(y)) = y$. Check: $e^{\ln y} = y$. ✓ Compare: $e^{e^{-y}} \neq y$ in general. A sign or exponent error in the inverse function propagates through the entire transformation calculation.

Mistake 8 — Using the MGF Outside Its Domain
For Exponential(λ): M_X(t) = λ/(λ−t) is valid for all t

Fix: The exponential MGF requires $t < \lambda$ for the integral to converge. Evaluating the formula at $t \geq \lambda$ gives a negative or infinite result with no probabilistic meaning. Always state and check the domain of the MGF before using it. For the normal, the domain is all $t$; for the exponential, $t < \lambda$; for the gamma Gamma$(\alpha, \beta)$, $t < \beta$.

Preparing for Limit Theorems

What Chapter 7 Will Study

Chapter 7 takes the tools developed in Chapters 3 through 6 and uses them to study what happens when we observe a large number of independent values and ask about the behavior of their sum or average. This leads to the law of large numbers and the central limit theorem — the most important results in probability for all of statistics.

How This Chapter Feeds Into That Story

The MGF product theorem is the technical backbone of the central limit theorem. When $S_n = X_1 + \cdots + X_n$ is a standardized sum of $n$ independent, identically distributed random variables, its MGF is $[M_X(t/\sqrt{n})]^n e^{-\mu t\sqrt{n}/\sigma}$. Taylor expanding $M_X(t/\sqrt{n})$ around 0 and tracking carefully:

Preview — The CLT from the MGF

Let $X_1, X_2, \ldots$ be i.i.d. with mean $\mu$ and variance $\sigma^2$. Define $Z_n = (X_1 + \cdots + X_n - n\mu)/(\sigma\sqrt{n})$. Then

$$M_{Z_n}(t) = \left[M_X\!\left(\frac{t}{\sigma\sqrt{n}}\right)\right]^n e^{-\mu t\sqrt{n}/\sigma} \;\longrightarrow\; e^{t^2/2} \quad \text{as } n \to \infty.$$

Since $e^{t^2/2}$ is the MGF of Normal$(0,1)$, and MGFs uniquely determine distributions, $Z_n \to \text{Normal}(0,1)$ in distribution. This is the central limit theorem. Chapter 7 makes it precise.

The transformation methods of Sections 6.3 and 6.4 will also be used in Chapter 7 to derive sampling distributions: the chi-squared distribution (from squaring standard normals), the $t$-distribution (from the ratio of a normal and a chi-squared), and the $F$-distribution (from ratios of chi-squareds). These are the distributions underlying the inference procedures in Chapters 8 and 9.

The concept of moments supports the statement of the CLT: the theorem applies whenever the mean and variance of the summands are finite — the first two moments determine whether the theorem works. LOTUS will appear in Chapter 8 to compute the bias and variance of estimators. The techniques of this chapter are not isolated tools; they are the foundation of the mathematical structure that makes probability theory rigorous and statistics theoretically grounded.

Practice 6.14Readiness Check for Chapter 7
  1. Let $X_1, X_2, \ldots$ be i.i.d. with $E[X_i] = 3$ and $\text{Var}(X_i) = 4$. Write the MGF of the sample mean $\bar{X}_n = S_n/n$ in terms of $M_X(t)$. Find $E[\bar{X}_n]$ and $\text{Var}(\bar{X}_n)$.
  2. Explain in your own words why the product rule for MGFs suggests that sums of independent, identically distributed variables become approximately normal for large $n$.
  3. Name the three sampling distributions (chi-squared, $t$, $F$) and describe how each arises from transformations of normal random variables, based on what you know from this chapter.