Statistics – Linear Transformation

📐 Linear Transformation

What happens to the mean and standard deviation when a constant is added or multiplied?

🎯 Why Does This Matter?

A linear transformation applies the same change to every data value. Examples:

  • Adding a bonus: every employee receives a 500 pay increase
  • Currency conversion: all amounts converted from dollars to shekels (×3.6)
  • Temperature conversion: Celsius to Fahrenheit: \(F = 1.8C + 32\)
  • Score update: teacher added 5 points to every student

The central question: How does such a change affect the Mean, Median, SD and Variance?

📚 Definition: What Is a Linear Transformation?

If the original data are \(x_1, x_2, \ldots, x_n\)

The new data: \(y_i = a + b \cdot x_i\)

Symbol Meaning Example
a Constant added (shift) +500 bonus, +5 points
b Constant multiplied (scale change) ×3.6 (dollar→shekel), ×1.8 (Celsius→Fahrenheit)

💡 Important special cases:

  • If \(b = 1\): adding a constant only → \(y = a + x\)
  • If \(a = 0\): multiplying by a constant only → \(y = b \cdot x\)

⭐ The Central Rule: Transformation Formulas

If \(y = a + b \cdot x\), then:

Measure Formula In words
Mean \(\bar{y} = a + b \cdot \bar{x}\) Affected by both a and b
Median \(Me_y = a + b \cdot Me_x\) Affected by both a and b
SD \(s_y = |b| \cdot s_x\) Affected only by |b|, not by a!
Variance \(s_y^2 = b^2 \cdot s_x^2\) Affected only by b², not by a!

⚠️ The most important rule to remember:

Adding a constant (a) does not change the spread!

Standard deviation and variance are unaffected by adding a constant

🧠 Why Does Adding a Constant Not Change the Spread?

Think of it simply:

Imagine 5 people sting in a line.

If they all jump 3 metres to the right — the distance between any two does not change!

They all moved by the same amount, so the spread remains the same.

Before the shift:

📍2 📍5 📍8 📍11 📍14

Mean = 8, SD = 4.47

After adding 10 to everyone:

📍12 📍15 📍18 📍21 📍24

Mean = 18, SD = 4.47

In contrast, when multiplying by a constant — the distances between people grow!

Before multiplication:

📍2 📍5 📍8 📍11 📍14

Mean = 8, SD = 4.47

After ×3 for everyone:

📍6 📍15 📍24 📍33 📍42

Mean = 24, SD = 13.42 (= 3 × 4.47)

📝 Example 1: Adding 5 Points to Every Score

Original scores: 70, 80, 90, 60, 100

Transformation: \(y = 5 + x\) (i.e. \(a = 5, \; b = 1\))

Measure Before (x) Calculation After (y)
Mean 80 \(5 + 1 \times 80\) 85 ✅
Median 80 \(5 + 1 \times 80\) 85 ✅
SD 14.14 \(|1| \times 14.14\) 14.14 (unchanged!)
Variance 200 \(1^2 \times 200\) 200 (unchanged!)

📝 Example 2: Converting Salaries from Dollars to Shekels (×3.6)

Salaries in dollars: 2000, 3000, 4000, 5000, 6000

Transformation: \(y = 3.6 \cdot x\) (i.e. \(a = 0, \; b = 3.6\))

Measure In dollars (x) Calculation In shekels (y)
Mean $4,000 \(0 + 3.6 \times 4000\) ₪14,400
Median $4,000 \(0 + 3.6 \times 4000\) ₪14,400
SD $1,581 \(|3.6| \times 1581\) ₪5,692
Variance $²2,500,000 \(3.6^2 \times 2500000\) ₪²32,400,000

📝 Example 3: Converting Celsius to Fahrenheit

Temperatures in Celsius: 10°, 20°, 30°, 40°, 50°

Transformation: \(F = 32 + 1.8 \cdot C\) (i.e. \(a = 32, \; b = 1.8\))

Measure Celsius (x) Calculation Fahrenheit (y)
Mean 30°C \(32 + 1.8 \times 30 = 32 + 54\) 86°F
SD 15.81°C \(|1.8| \times 15.81\) 28.46°F
Variance 250 °C² \(1.8^2 \times 250 = 3.24 \times 250\) 810 °F²

💡 Note: The 32 (=a) changed the Mean but not the SD. Only the 1.8 (=b) changed the SD!

📋 Summary Table: What Changes When?

Operation Mean / Median SD Variance
Adding constant a
(y = a + x)
✅ Yes
Increases by a
❌ No
Remains the same
❌ No
Remains the same
Multiplying by b
(y = b·x)
✅ Yes
Multiplied by b
✅ Yes
Multiplied by |b|
✅ Yes
Multiplied by b²
Both
(y = a + b·x)
✅ Yes
a + b·mean
✅ Yes
|b|·SD
✅ Yes
b²·variance

🎓 Typical Exam Question

Question: The class mean is 72 and the SD is 8.
The teacher applies a transformation: new score = 10 + 1.2 × old score.
Find the mean and SD of the new scores.

Solution:

Given: \(\bar{x} = 72, \; s_x = 8, \; a = 10, \; b = 1.2\)

New mean:
\(\bar{y} = a + b \cdot \bar{x} = 10 + 1.2 \times 72 = 10 + 86.4 = 96.4\)

New SD:
\(s_y = |b| \cdot s_x = |1.2| \times 8 = 9.6\)

Answer: new mean = 96.4, new SD = 9.6

⚠️ Common Mistakes

❌ Mistake ✅ Correct
"I added 5, so SD also increased by 5" Adding constant does not change SD at all!
"I multiplied by 3, so variance was multiplied by 3" Variance is multiplied by = 9, not by b!
"New SD = a + b·old SD" New SD = |b|·SD (without a!)

📝 Summary

Linear transformation: \(y = a + b \cdot x\)

Measures of centre (Mean, Median) — affected bya andb

Measures of dispersion (SD, Variance) — affected only by|b|

🔑 Adding a constant does not change dispersion!