IB Maths AI SL Topic 4 — Statistics Toolkit Paper 1 & 2 Coding data ~6 min read

Linear Transformations of Data

If a teacher doubles every mark and adds 10, or you convert metres to centimetres, every data value gets the same linear transformation y = ax + b. You don’t need to redo all the statistics — two short rules tell you what happens to the mean and standard deviation. Memorise them and you’ll save several minutes per exam paper.

📘 What you need to know

The two rules — and the picture

Think of the data as dots on a number line. Two things can happen:

Adding b — the entire dot pattern slides sideways by b. Every gap is preserved, so the spread is unchanged. Mean shifts, std dev unchanged.
Multiplying by a — the pattern is stretched (or shrunk) by factor a away from zero. Gaps grow by factor |a|, so std dev scales by |a| and variance by a2.

Shift only vs stretch — what changes Add 3: y = x + 3 mean shifts, σ unchanged 0246810orig. x̄ = 4new ȳ = 7 +3spread width = 4 in both rows σ ≈ 1.41 (unchanged) Multiply by 2: y = 2x mean & σ both scale by 2 024681012orig. x̄ = 4new ȳ = 8×2 stretch spread width 4 → 8 (doubled) σ: 1.41 → 2.83
Left: adding 3 slides every dot right by 3 — mean shifts but gaps are preserved, so σ is unchanged. Right: multiplying by 2 stretches the whole pattern away from zero — gaps double, so σ doubles too.
The transformation rules If  y = ax + b  then:
 
mean:   = a + b  Â·  variance:  σy2 = a2 σx2  Â·  std dev:  σy = |a| σx

🧭 Recipe — apply a linear transformation

  1. Identify a and b from the question (the “multiply by” and “add” parts).
  2. New mean: apply the SAME transformation to the old mean — = a + b.
  3. New std dev: multiply the old std dev by |a|. The b is irrelevant for spread.
  4. New variance: multiply the old variance by a2 (not |a|).
  5. Reverse question? Compare old & new std devs to find a; then use the means to find b.
Spread test: if the question only ADDS a constant, the spread doesn’t change — σ, variance, range and IQR are all identical. Only the mean / median / mode shift.

Worked examples

WE 1

Add a constant — mean shifts, σ unchanged

A class of students took a maths test. The mean mark was 60 and the standard deviation was 8. The teacher then adds 5 bonus marks to every student’s score.

Find the new mean and standard deviation.

Transformation: y = x + 5 → a = 1, b = 5 New mean ȳ = 1×60 + 5 = 65 New std dev (only b changed → σ unchanged) σ_y = |1| × 8 = 8 new mean = 65 · new σ = 8 adding the same amount to every value shifts the WHOLE distribution sideways. Distances between values stay the same → σ unchanged.
WE 2

Unit conversion — multiply only

The heights of a group of plants have mean 2.5 m and standard deviation 0.3 m. The data is converted to centimetres.

Find the new mean and standard deviation.

1 m = 100 cm → transformation y = 100x a = 100, b = 0 New mean ȳ = 100 × 2.5 = 250 cm New std dev σ_y = |100| × 0.3 = 30 cm mean = 250 cm · σ = 30 cm unit conversions are pure multiplication (b = 0). Both the mean and σ scale by the same factor — and the units change with them.
WE 3

Combined ax + b — standardising scores

A practice test has mean 40 and standard deviation 6. The teacher converts each raw score x using y = 1.5x + 5.

Find the mean and standard deviation of the converted scores.

Identify a, b a = 1.5, b = 5 New mean ȳ = 1.5 × 40 + 5 = 60 + 5 = 65 New std dev σ_y = |1.5| × 6 = 9 new mean = 65 · new σ = 9 apply the transformation to the mean directly. For σ, only the “× 1.5” matters; the “+ 5” doesn’t change spread.
WE 4

Reverse problem — find a and b

A data set has mean 50 and standard deviation 4. After applying y = ax + b, the new mean is 110 and the new standard deviation is 12.

Find the values of a and b.

Step 1 — use σ to find a σ_y = |a| × σ_x 12 = |a| × 4 → |a| = 3 take a = 3 (positive default) Step 2 — use the mean to find b ȳ = a×xÌ„ + b 110 = 3×50 + b 110 = 150 + b → b = −40 Check y = 3x − 40, mean: 3(50)−40 = 110 ✓ a = 3 · b = −40 always solve σ FIRST (it only involves a). Then plug a into the mean equation to find b. The order matters because b doesn’t appear in the σ equation.
WE 5

Variance scales by a2, not |a|

A data set has variance 9. Each value is multiplied by 4.

Find the new variance and the new standard deviation.

Transformation: y = 4x → a = 4 New variance: multiply by a², NOT |a| σ_y² = 4² × 9 = 16 × 9 = 144 Std dev (two ways) σ_y = √144 = 12 OR σ_y = |4| × √9 = 4 × 3 = 12 ✓ new variance = 144 · new σ = 12 the trap: writing “new variance = 4 × 9 = 36”. Variance scales by a² because variance is already in squared units. Std dev (linear units) scales by |a|.
WE 6

Negative coefficient — absolute value of a

A set of temperatures (°C) has mean 10 and standard deviation 3. The values are transformed using y = −2x + 50.

Find the new mean and standard deviation.

Identify a, b a = −2, b = 50 New mean (signed a) ȳ = (−2)(10) + 50 = −20 + 50 = 30 New std dev (|a|, always positive) σ_y = |−2| × 3 = 6 new mean = 30 · new σ = 6 for the mean keep the negative sign; for σ take the absolute value. A standard deviation can never be negative — that’s why |a| not a.

💡 Top tips

âš  Common mistakes

Next up: Outliers. We’ve already seen that the mean and range are sensitive to extreme values, but how do you formally identify which values count as outliers? The 1.5 × IQR rule answers that — and decides whether to remove them or not.

Need help with AI SL Statistics?

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

Book Free Session →