IB Maths AA HL
Topic 4 — Statistics & Probability
Paper 1 & 2
HL only
~7 min read
Mean & Variance of a CRV
The mean (expected value) of a continuous random variable X is E(X) = ∫ x·f(x) dx — note the extra factor of x compared with the validity integral. Variance comes from Var(X) = E(X²) − [E(X)]², where E(X²) = ∫ x²·f(x) dx. For linear transformations, E(aX + b) = aE(X) + b and Var(aX + b) = a²Var(X) — the constant b shifts the mean but doesn’t affect spread.
📘 What you need to know
- Mean: E(X) = ∫ x·f(x) dx over the pdf’s domain — given in the booklet.
- Mean of squares: E(X²) = ∫ x²·f(x) dx — note the squared x, NOT the squared f.
- Variance: Var(X) = E(X²) − [E(X)]² — booklet (alternative form ∫(x − μ)²f dx is rarely faster).
- SD: σ = √Var(X) — square-root the variance.
- Don’t confuse E(X²) with [E(X)]² — they differ by exactly the variance.
- Symmetry shortcut: if f is symmetric about x = a, then E(X) = a automatically.
- Linear mean: E(aX + b) = aE(X) + b.
- Linear variance: Var(aX + b) = a²Var(X) — b drops out.
The mean E(X)
Mean of a continuous random variable
μ = E(X) = ∫−∞∞ x·f(x) dx
The “−∞ to ∞” in the limits sounds scary but in practice means “over the values where f(x) ≠ 0″ — the rest contributes 0. So if f is nonzero only on [a, b], the integral is just ∫ab x·f(x) dx.
Symmetry shortcut: if the graph of f has axis of symmetry at x = a, then E(X) = a by inspection — no integration. The same applies for piecewise pdfs symmetric about a midpoint.
Variance and standard deviation
Variance — most practical form
Var(X) = E(X²) − [E(X)]²
E(X²) — “mean of squares”
∫ x²·f(x) dx
integrate x² weighted by f
[E(X)]² — “square of mean”
(∫ x·f(x) dx)²
find the mean first, THEN square it
These two are different! Their difference is precisely the variance — confusing them is the single biggest exam slip.
Linear transformations
If a and b are constants, the random variable aX + b has:
Linear transformation rules
E(aX + b) = a·E(X) + b and Var(aX + b) = a²·Var(X)
The constant b shifts every value by b, so the mean shifts too — but the spread stays the same. Multiplying by a stretches the distribution by a, so the SD is multiplied by |a| (and variance by a²).
🧭 Recipe — find mean, variance, SD
- Identify f(x) and its domain; check for symmetry which can give E(X) free.
- Mean: integrate x·f(x) over the domain.
- E(X²): integrate x²·f(x) over the domain.
- Variance: Var(X) = E(X²) − [E(X)]²; SD = √Var(X).
- For aX + b: apply E(aX + b) = aE(X) + b and Var(aX + b) = a²Var(X).
Worked examples
WE 1Mean of a simple polynomial pdf
The continuous random variable X has pdf f(x) = 3x² for 0 ≤ x ≤ 1 (and 0 otherwise). Find E(X).
Apply E(X) = ∫ x·f(x) dx
E(X) = ∫₀¹ x · 3x² dx
= ∫₀¹ 3x³ dx
= [3x⁴/4]₀¹
= 3/4
E(X) = 3/4
most of the density sits near x = 1, so a mean > 1/2 (midpoint) makes sense
WE 2Mean by symmetry — no integration needed
The continuous random variable X has pdf f(x) = 34(1 − x²) for −1 ≤ x ≤ 1 (and 0 otherwise). Find E(X).
Test for symmetry
f(−x) = (3/4)(1 − (−x)²) = (3/4)(1 − x²) = f(x)
→ f is symmetric about x = 0
Symmetric pdf → E(X) = axis of symmetry
E(X) = 0
verifying: x·f(x) is an odd function, so its integral on [−1, 1] is 0 ✓
WE 3Full pipeline: E(X), E(X²), Var, SD
The continuous random variable X has pdf f(x) = 18x for 0 ≤ x ≤ 4 (and 0 otherwise). Find E(X), Var(X) and the standard deviation of X.
Step 1 — find E(X)
E(X) = ∫₀⁴ x · (1/8)x dx = (1/8)∫₀⁴ x² dx
= (1/8)[x³/3]₀⁴ = (1/8)(64/3) = 8/3
Step 2 — find E(X²)
E(X²) = ∫₀⁴ x² · (1/8)x dx = (1/8)∫₀⁴ x³ dx
= (1/8)[x⁴/4]₀⁴ = (1/8)(64) = 8
Step 3 — Var(X) = E(X²) − [E(X)]²
Var(X) = 8 − (8/3)² = 8 − 64/9
= 72/9 − 64/9 = 8/9
Step 4 — SD = √Var
σ = √(8/9) = (2√2)/3 ≈ 0.943
E(X) = 8/3; Var(X) = 8/9; σ = (2√2)/3
work in fractions throughout — 64/9 stays exact, 0.111… loses precision
WE 4Linear transformation — E and Var rules
The continuous random variable X has E(X) = 5 and Var(X) = 4. Find: (a) E(3X − 7); (b) Var(3X − 7); (c) the standard deviation of 3X − 7.
(a) Apply E(aX + b) = aE(X) + b
E(3X − 7) = 3(5) − 7 = 15 − 7 = 8
(b) Apply Var(aX + b) = a²Var(X) — the −7 vanishes
Var(3X − 7) = 3² · Var(X) = 9(4) = 36
(c) SD = √Var
σ(3X − 7) = √36 = 6
(a) 8; (b) 36; (c) 6
subtracting 7 shifts the mean but leaves the spread untouched — typical Paper 1 fact-check
WE 5Mean of a piecewise pdf
The continuous random variable X has pdf:
f(x) = 23x for 0 ≤ x ≤ 1;
f(x) = 23 for 1 ≤ x ≤ 2;
f(x) = 0 otherwise.
Find E(X).
Quick validity check (it should integrate to 1)
Triangle area + rectangle area = (1/2)(1)(2/3) + (1)(2/3) = 1/3 + 2/3 = 1 ✓
Split E(X) into two pieces
E(X) = ∫₀¹ x · (2/3)x dx + ∫₁² x · (2/3) dx
Piece 1
∫₀¹ (2/3)x² dx = (2/3)[x³/3]₀¹ = (2/3)(1/3) = 2/9
Piece 2
(2/3)∫₁² x dx = (2/3)[x²/2]₁² = (2/3)(2 − 1/2) = (2/3)(3/2) = 1
Add them
E(X) = 2/9 + 1 = 11/9
E(X) = 11/9 ≈ 1.222
always integrate piece-by-piece — there’s no shortcut around the junction
WE 6Real-world: full pipeline + linear transformation
A delivery service’s wait time T (in hours, 0 ≤ T ≤ 2) has pdf f(t) = 38t² for 0 ≤ t ≤ 2 (and 0 otherwise). The courier’s pay (in dollars) is P = 5T − 2.
(a) Find E(T), Var(T) and σ(T). (b) Hence find E(P) and σ(P).
(a) Step 1 — E(T)
E(T) = ∫₀² t · (3/8)t² dt = (3/8)∫₀² t³ dt
= (3/8)[t⁴/4]₀² = (3/8)(4) = 3/2
Step 2 — E(T²)
E(T²) = ∫₀² t² · (3/8)t² dt = (3/8)∫₀² t⁴ dt
= (3/8)[t⁵/5]₀² = (3/8)(32/5) = 12/5
Step 3 — Variance and SD
Var(T) = 12/5 − (3/2)² = 12/5 − 9/4
= 48/20 − 45/20 = 3/20
σ(T) = √(3/20) = √15 / 10 ≈ 0.387
(b) Apply linear transformation rules to P = 5T − 2
E(P) = 5·(3/2) − 2 = 15/2 − 2 = 11/2 = 5.5
Var(P) = 5²·Var(T) = 25·(3/20) = 75/20 = 15/4
σ(P) = √(15/4) = √15 / 2 ≈ 1.94
(a) E(T)=3/2, Var(T)=3/20, σ(T)≈0.387 (b) E(P)=$5.50, σ(P)≈$1.94
notice σ(P) = 5·σ(T) directly — multiplying by 5 multiplies the SD by |5|
💡 Top tips
- Check for symmetry first — gives E(X) for free; saves an integral.
- Work in fractions throughout — exact answers stay clean (e.g., 8/9 not 0.888…).
- Keep constants outside the integral; multiply at the end.
- For SD of aX + b, the answer is |a|·σ(X) — sign of a doesn’t matter (since variance squares it).
- Sanity check: Variance is always ≥ 0; if you get a negative number, something’s wrong.
⚠ Common mistakes
- Using E(X²) = [E(X)]² — they differ by exactly the variance.
- Forgetting the extra x in E(X) = ∫ x·f(x) dx — without it you’re checking validity, not finding the mean.
- Keeping the +b when computing Var(aX + b) — the constant doesn’t affect spread.
- Reporting variance as SD — square-root the variance to get σ.
- Skipping the piece-by-piece split for piecewise pdfs — you can’t integrate one expression across the junction.
That closes Topic 4 — Statistics & Probability. Up next is Topic 5 — Calculus, the longest and most heavily weighted HL topic. We’ll start with limits and continuity, then move through differentiation rules, applications (kinematics, optimisation, related rates), integration techniques, and finish with differential equations and Maclaurin series. Calculus quietly underpins half of what you’ve already used in Topics 3 and 4 (rates of change, areas, expected values for CRVs) — so it’ll feel like the theory catching up with the practice.
Need help with Statistics & Probability?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.
Book Free Session →