S2.5StatisticsStretch

Coding

Coding simplifies awkward numbers by transforming the data with . You then find the mean and standard deviation of the easy coded values and reverse the coding to recover the originals.

25 min Video by Zeeshan Zamurred Measures of Location and Spread
Edexcel AS Level Maths: 2.5 Coding (Mean and Standard Deviation)Watch the full walkthrough before the notes below.
Open on YouTube

What you'll be able to do

  • Apply a coding transformation
  • Find the mean of the original data from the coded mean
  • Find the standard deviation from the coded data
  • Understand which statistics shift vs scale
1

What coding does

Coding replaces each value with — subtracting then dividing by to get smaller, friendlier numbers to work with.

Subtract , divide by .
2

Reversing for the mean

The mean codes exactly like a data value: find , then reverse the transformation to get .

Undo the coding on the mean.
1.
Answer
3

Reversing for standard deviation

Standard deviation is affected by the only, not the shift — subtracting doesn’t change spread, but dividing by does. So multiply the coded standard deviation by .

Only the scale factor affects spread.

Tip — Adding/subtracting shifts data (mean changes, spread doesn’t); multiplying/dividing scales both.

Formula recap

The coding transformation.
Reverse coding for the mean.
Reverse coding for σ (scale only).

Common mistakes to avoid

Adding a back when reversing the standard deviation.
The shift a does not affect spread; only multiply σ by b.
Forgetting to reverse the coding at the end.
The coded mean/σ must be converted back to the original scale.

Key takeaways

  • Coding: y = (x − a)/b to simplify numbers.
  • Mean reverses fully: x̄ = b·ȳ + a.
  • Standard deviation reverses by scale only: σₓ = b·σᵧ.

Test yourself

Ready to lock in Coding? Pick a mode and earn XP & Dobloons.