Study Guide

Linear transformations and combinations of random variables

IB Mathematics AI HL· 12 min read

1. Linear Transformations of a Single Random Variable★★☆☆☆⏱ 3 min

A linear transformation modifies every outcome of a random variable by a fixed scaling factor and a fixed shift. This is commonly used to convert units, for example converting a random variable measured in kilograms to grams, or adjusting raw test scores to a scaled grading curve.

📘 Definition

Linear transformation properties

Forconstantsa,bandrandomvariableXFor constants a, b and random variable X

E(aX + b) = aE(X) + b, Var(aX + b) = a²Var(X). The constant shift b does not affect variance, as it moves all outcomes by the same amount without changing their spread.

📐 Worked Example

The random variable X has E(X) = 12, Var(X) = 4. Find E(3X + 7) and Var(3X + 7).

  1. 1

    Apply the expected value linearity rule

  2. 2
    E(3X+7)=3E(X)+7=3(12)+7=43E(3X +7) = 3E(X) +7 = 3(12) +7 = 43
  3. 3

    Apply the variance transformation rule, squaring the scaling factor and ignoring the constant shift

  4. 4
    Var(3X+7)=32Var(X)=9(4)=36Var(3X +7) = 3^2 Var(X) = 9(4) = 36
✓ Quick check

Test your understanding of basic transformation rules

  1. A random variable Y has mean 20, variance 9. What is Var(2Y - 5)?

    • 18

    • 36

    • 31

    • 13

    Reveal answer
    36

    Var(2Y -5) = 2²Var(Y) = 4*9 = 36, the -5 shift has no impact on variance.

2. Expected Value of Linear Combinations of Random Variables★★★☆☆⏱ 3 min

Linearity of expectation holds for all random variables, regardless of whether they are independent or dependent. This is one of the most flexible properties in probability, and can be extended to any number of random variables in a linear combination.

E(aX+bY)=aE(X)+bE(Y)E(aX + bY) = aE(X) + bE(Y)
E(X1+X2+...+Xn)=E(X1)+E(X2)+...+E(Xn)E(X_1 + X_2 + ... + X_n) = E(X_1) + E(X_2) + ... + E(X_n)
📐 Worked Example

The mass of a single apple A has mean 110g, the mass of a single banana B has mean 130g. Find the expected total mass of 3 apples and 2 bananas.

  1. 1

    Write the total mass as a linear combination: Total = 3A + 2B

  2. 2
    E(Total)=3E(A)+2E(B)=3(110)+2(130)=330+260=590gE(Total) = 3E(A) + 2E(B) = 3(110) + 2(130) = 330 + 260 = 590g

3. Variance of Linear Combinations of Independent Random Variables★★★★☆⏱ 3 min

Unlike expected value, variance of a linear combination only simplifies to a sum of weighted variances if the random variables are independent. Dependent variables require an additional covariance term that is omitted for IB AI HL problems unless explicitly stated.

🔬 Derivation
Goal:

Derive Var(X - Y) for independent X, Y

Starting from:

Var(Z) = E(Z²) - [E(Z)]², X and Y independent

  1. 1

    Let Z = X - Y, expand the variance definition

  2. 2
    Var(XY)=E((XY)2)[E(XY)]2Var(X-Y) = E((X-Y)^2) - [E(X-Y)]^2
  3. 3

    Expand terms and cancel cross terms using independence property E[XY] = E[X]E[Y]

  4. 4
    Var(XY)=Var(X)+Var(Y)Var(X-Y) = Var(X) + Var(Y)
Result:

Variance of a difference of independent variables is equal to the sum of their individual variances

📐 Worked Example

Independent random variables X and Y have Var(X) = 16, Var(Y) = 9. Find Var(2X - 3Y).

  1. 1

    Square each scaling factor and multiply by the respective variance

  2. 2
    Var(2X3Y)=22Var(X)+(3)2Var(Y)Var(2X - 3Y) = 2^2 Var(X) + (-3)^2 Var(Y)
  3. 3
    =4(16)+9(9)=64+81=145= 4(16) + 9(9) = 64 + 81 = 145

4. Sums and Differences of Independent Normal Random Variables★★★★☆⏱ 3 min

A critical property tested frequently in IB AI HL exams is that the linear combination of independent normal random variables also follows a normal distribution. This allows you to use standard normal CDF functions to calculate probabilities for combined variables.

📘 Definition

Sum of independent normal variables

IfX N(μ1,σ12),Y N(μ2,σ22),independentIf X ~ N(μ₁, σ₁²), Y ~ N(μ₂, σ₂²), independent

aX + bY ~ N(aμ₁ + bμ₂, a²σ₁² + b²σ₂²)

📐 Worked Example

X ~ N(50, 16), Y ~ N(30, 9), independent. Find P(X > Y + 15).

  1. 1

    Rearrange the inequality: X - Y > 15, define new variable Z = X - Y

  2. 2
    E(Z)=5030=20,Var(Z)=16+9=25,Z N(20,25)E(Z) = 50 - 30 = 20, Var(Z) = 16 + 9 = 25, Z ~ N(20, 25)
  3. 3

    Calculate P(Z > 15) using normal CDF on your GDC

  4. 4
    P(Z>15)=0.8413P(Z > 15) = 0.8413

5. Common Pitfalls

Wrong move:

Forgetting to square the scaling factor when calculating Var(aX + b)

Why:

Students incorrectly carry over the linear scaling rule from expected value to variance

Correct move:

Always use Var(aX + b) = a²Var(X), the constant b has no impact on variance

Wrong move:

Subtracting variances when calculating Var(X - Y)

Why:

Confusing variance rules with the linearity of expected value for differences

Correct move:

Var(X - Y) = Var(X) + Var(Y) for independent X and Y

Wrong move:

Applying combination variance rules to dependent random variables

Why:

Failing to check for independence before discarding covariance terms

Correct move:

Only use Var(aX + bY) = a²Var(X) + b²Var(Y) if X and Y are explicitly stated to be independent

Wrong move:

Adding standard deviations instead of variances for combined distributions

Why:

Mixing up units of spread for transformed variables

Correct move:

Sum variances first, then take the square root to get the combined standard deviation

Wrong move:

Assuming the sum of any two random normal variables is normal

Why:

Forgetting the requirement of independence for this property to hold in exam contexts

Correct move:

Confirm independence before stating that X + Y follows a normal distribution

6. Quick Reference Cheatsheet

Operation

Expected Value

Variance (Independent RVs)

aX + b

aE(X) + b

a²Var(X)

X + Y

E(X) + E(Y)

Var(X) + Var(Y)

X - Y

E(X) - E(Y)

Var(X) + Var(Y)

aX + bY

aE(X) + bE(Y)

a²Var(X) + b²Var(Y)

Sum of n identical independent X

nE(X)

nVar(X)

When this came up on past exams

AI-estimated based on syllabus patterns — cross-check with official past papers for accuracy. Use only as revision-focus signals.

  • 2023 · Paper 3

    Combined variable variance calculation

  • 2022 · Paper 2

    Sum of normal distributions problem

  • 2021 · Paper 3

    Transformed RV expected value

What's Next

Mastering these linear combination rules is a critical prerequisite for tackling more advanced IB AI HL topics including linear regression, hypothesis testing for two independent samples, and probability modelling for combined real-world datasets. These properties are frequently tested in Paper 2 and Paper 3 extended response questions, where you will often be required to justify your use of distribution properties to earn full method marks. You will next apply these rules to solve problems involving linear combinations of discrete random variables, then extend the framework to calculate confidence intervals for difference in population means. Make sure to complete the associated practice question set to reinforce your understanding before moving on.