IB Maths AI HLRandom VariablesPaper 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
Single variable: E(aX Β± b) = aE(X) Β± b and Var(aX Β± b) = a2Var(X).
The mean is affected by both multiplication and addition; the variance only by multiplication (the constant b shifts data but doesn’t spread it).
Two variables: E(aX Β± bY) = aE(X) Β± bE(Y) β true for anyX, Y.
Var(aX Β± bY) = a2Var(X) + b2Var(Y) β note the + even when subtracting, and only if X, Y are independent.
2X β X1 + X2: same mean, but Var(2X) = 4Var(X) while Var(X1 + X2) = 2Var(X).
All of these formulae are in the booklet β your job is choosing the right one.
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 = 20Var(3X + 5) = 3Β²Var(X)= 9(4) = 36Var(2 β X) = (β1)Β²Var(X)= 1(4) = 420, 36, 4in 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
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 = 0Var(2X + 5Y) = 2Β²Var(X) + 5Β²Var(Y)= 4(3) + 25(4) = 12 + 100 = 112Var(4X β Y) = 4Β²Var(X) + (β1)Β²Var(Y)= 16(3) + 1(4) = 48 + 4 = 520, 112, 52in 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), notC + 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) = 10E(Xβ + Xβ) = 5 + 5 = 10Variances (different!)Var(2X) = 2Β²(3) = 12Var(Xβ + Xβ) = 3 + 3 = 6means equal, variances 12 vs 6doubling 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).
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 = 5Var(A β B) = Var(A) + Var(B)= 5 + 3 = 8E = 5, Var = 8the mean subtracts, but the variance ADDS β the classic difference trap.
π‘ Top tips
Square the constant for every variance: Var(aX) = a2Var(X).
Drop the +b from any variance β adding a constant never changes spread.
Variance always adds when combining independent variables, even for aX β bY.
Check independence before using the variance rule β the mean rule doesn’t need it, the variance rule does.
Rewrite division: Xa = 1aX, then square the 1a.
Read “n of them” carefully: nX (one value scaled) vs X1 + β¦ + Xn (n separate values).
β Common mistakes
Not squaring the constant in the variance β writing aVar(X) instead of a2Var(X).
Subtracting variances for aX β bY. You always add them.
Keeping +b in the variance of aX + b.
Confusing nX with X1 + β¦ + Xn β they share a mean but not a variance.
Using the variance rule without independence β it only holds for independent variables.
Writing 6Β²Var(E) for six different eggs β that’s the scaling case, not the sum.
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.