IB Maths AI HL Random Variables Paper 1 & 2 ~7 min read

Linear Combinations of Random Variables

When you scale a random variable (multiply by a constant) or combine two of them (add or subtract), the mean and variance follow simple rules. The mean behaves intuitively. The variance is the trap: constants get squared, addition/subtraction of a constant leaves it unchanged, and when you combine independent variables you always add the variances β€” even when subtracting. Get those three facts right and this topic is free marks.

πŸ“˜ What you need to know

Transforming a single variable

If you multiply X by a constant and add another, both the mean and variance respond β€” but differently. Multiplying stretches the data (changes spread), while adding a constant just slides everything along (no change in spread).

Single variable transformation E(aX Β± b) = aE(X) Β± b     Var(aX Β± b) = a2Var(X) in the formula booklet βœ“
The mean E(X)
Γ— and Β±
Affected by both: multiply by a, then add/subtract b.
The variance Var(X)
Γ— only
Multiply by a2. Adding b does nothing β€” it shifts, not spreads.

πŸ€” Why does +b vanish from the variance?

Variance measures spread. Adding the same constant to every value slides the whole distribution sideways but keeps every point the same distance apart β€” so the spread is identical. Multiplying by a stretches every gap by a, and since variance is built from squared distances, it scales by a2.

🧠 Memory aid β€” “divide is just multiply”

If you see Xa, rewrite it as 1aX first. So Var(Xa) = 1a2Var(X) β€” the constant still gets squared.

WE 1

Transform a single variable

X is a random variable with E(X) = 5 and Var(X) = 4. Find E(3X + 5), Var(3X + 5) and Var(2 βˆ’ X).

E(3X + 5) = 3E(X) + 5 = 3(5) + 5 = 20 Var(3X + 5) = 3Β²Var(X) = 9(4) = 36 Var(2 βˆ’ X) = (βˆ’1)Β²Var(X) = 1(4) = 4 20,   36,   4 in 2 βˆ’ X the coefficient of X is βˆ’1, and (βˆ’1)Β² = 1, so the +2 has no effect.

Combining two variables

For two random variables X and Y with constants a and b, the mean rule always holds. The variance rule needs the variables to be independent β€” and the right-hand side is always a sum.

Combining two variables E(aX Β± bY) = aE(X) Β± bE(Y)
Var(aX Β± bY) = a2Var(X) + b2Var(Y) in the formula booklet βœ“ (variance needs independence)
The “always add” rule: Var(aX βˆ’ bY) = a2Var(X) + b2Var(Y) β€” exactly the same as for +. Because b2 is positive even when b is negative, the variances of aX + bY and aX βˆ’ bY are identical.

Mean vs Variance under combination
MEAN E(aX βˆ’ bY) = aE(X) βˆ’ bE(Y) sign kept β†’ subtract VARIANCE Var(aX βˆ’ bY) = aΒ²Var(X) + bΒ²Var(Y) always + constants squared β†’ terms always positive β†’ you add
The minus survives in the mean but disappears in the variance.
WE 2

Mean and variance of a combination

X and Y are independent with E(X) = 5, Var(X) = 3, E(Y) = βˆ’2, Var(Y) = 4. Find E(2X + 5Y), Var(2X + 5Y) and Var(4X βˆ’ Y).

E(2X + 5Y) = 2E(X) + 5E(Y) = 2(5) + 5(βˆ’2) = 10 βˆ’ 10 = 0 Var(2X + 5Y) = 2Β²Var(X) + 5Β²Var(Y) = 4(3) + 25(4) = 12 + 100 = 112 Var(4X βˆ’ Y) = 4Β²Var(X) + (βˆ’1)Β²Var(Y) = 16(3) + 1(4) = 48 + 4 = 52 0,   112,   52 in the last one the minus becomes a plus once the constant is squared.

Many variables & the 2X trap

The two-variable rules extend to any number of variables. For constants a1, …, an and variables X1, …, Xn:

Linear combination of n variables E(βˆ‘aiXi) = βˆ‘aiE(Xi)     Var(βˆ‘aiXi) = βˆ‘ai2Var(Xi) in the formula booklet βœ“ (variance needs independence)

πŸ€” Why is 2X different from X1 + X2?

2X means take one observation and double it. X1 + X2 means take two separate observations and add them. If X can be 0 or 1, then 2X gives only 0 or 2, but X1 + X2 can give 0, 1 or 2 β€” that extra middle value is why the spreads differ.

Scaled: 2X
4 Var(X)
One observation, doubled. Var(2X) = 2Β²Var(X) = 4Var(X). Same mean: 2E(X).
Summed: X₁ + Xβ‚‚
2 Var(X)
Two independent observations. Var = Var(X) + Var(X) = 2Var(X). Same mean: 2E(X).

🧠 Decision check β€” which case am I in?

Ask: am I adding different observations of the same variable (X1 + X2 + … + Xn), or scaling a single observation by a constant (nX)? A carton of 6 eggs is C + E1 + … + E6 (six different eggs), not C + 6E β€” because the eggs have different masses.

WE 3

2X versus X₁ + Xβ‚‚

For a random variable X with E(X) = 5 and Var(X) = 3, compare 2X with X1 + X2 (independent observations).

Means (the same) E(2X) = 2(5) = 10 E(X₁ + Xβ‚‚) = 5 + 5 = 10 Variances (different!) Var(2X) = 2Β²(3) = 12 Var(X₁ + Xβ‚‚) = 3 + 3 = 6 means equal, variances 12 vs 6 doubling one value spreads more than adding two independent values.
WE 4

Modelling a carton of eggs

A carton’s mass is M = C + E1 + E2 + … + E6, where the carton mass C has E = 20, Var = 4, and each egg E (independent) has E = 58, Var = 9. Find E(M) and Var(M).

E(M) = E(C) + 6E(E) = 20 + 6(58) = 20 + 348 = 368 Var(M) = Var(C) + 6Var(E) = 4 + 6(9) = 4 + 54 = 58 E(M) = 368 g,   Var(M) = 58 six different eggs β†’ add the variance six times, NOT 6Β²(9).
WE 5

Difference of two variables

Independent A and B have E(A) = 12, Var(A) = 5, E(B) = 7, Var(B) = 3. Find E(A βˆ’ B) and Var(A βˆ’ B).

E(A βˆ’ B) = E(A) βˆ’ E(B) = 12 βˆ’ 7 = 5 Var(A βˆ’ B) = Var(A) + Var(B) = 5 + 3 = 8 E = 5,   Var = 8 the mean subtracts, but the variance ADDS β€” the classic difference trap.

πŸ’‘ Top tips

⚠ Common mistakes

Next up β€” Unbiased Estimates. You’ll use these exact linear-combination rules to prove why the sample mean xΜ„ hits the population mean on average, and why the sample variance needs that nn βˆ’ 1 correction to become unbiased.

Need help with Random Variables?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session β†’