Coding Data: Linear Changes to the Mean and Standard Deviation | Edexcel IAL Maths notes
Free preview: Coding Data: Linear Changes to the Mean and Standard Deviation
What Coding Is and Why It Helps
Unit S1 (WST01): Statistics 1
Let's start with a problem. Squaring and adding numbers like 1020, 1030 and 1090 by hand is slow and easy to get wrong. , and you need five of those. Can we make the numbers smaller first, and still get the right mean and standard deviation at the end?
- Coding means changing every data value by the same simple rule, usually to make the numbers smaller and easier to work with.
- Coding usually uses this form:
💡 In plain words
- x is an original value and y is the coded value.
- a is a number subtracted from every value (a shift).
- b is a number every value is divided by (a scale).
Recipe: choosing and using a code
- Pick a near the smallest (or middle) value. Why: subtracting it leaves small numbers.
- Pick b as the common gap or step in the data (10, 0.5, 0.01...). Why: dividing by it leaves whole numbers.
- Code every value: subtract a first, then divide by b. Why: the order matters, just like in the formula.
👀 Watch me do it: code five masses: 1020, 1030, 1050, 1060, 1090 g
| What I write | Why I do it |
|---|---|
| Take a = 1000 and b = 10. | Steps 1 and 2: all values are just over 1000, and they go up in 10s. |
| Subtract 1000: 20, 30, 50, 60, 90. | Step 3, first the shift. |
| Divide by 10: the coded values are 2, 3, 5, 6, 9. | Then the scale. |
| These are far easier to square and add. | For example instead of . |
✏️ YOUR TURN 1
Try this first:
Code the times 2.35, 2.40, 2.55, 2.30, 2.45 seconds using .
Answer:
- Subtract 2.3: 0.05, 0.10, 0.25, 0, 0.15.
- Divide by 0.05: 1, 2, 5, 0, 3.
What Coding Does to the Mean
We've changed the numbers. So the coded mean is not the real mean. How do we get back?
- Subtracting a from every value moves the whole data set down by a, so the mean moves down by a.
- Dividing every value by b divides the mean by b.
- So the mean follows exactly the same rule as the data:
Why it is true
| What I write | Why I do it |
|---|---|
| Add up all n coded values. a is subtracted n times. | |
| Divide by n. | |
| Rearrange: multiply by b, then add a. |
- Medians, quartiles and other positions follow the same rule too, because coding keeps the values in the same order.
💡 Decode by reversing
To get back to x, rearrange the code: . Then . Doing the operations in reverse order (multiply by b, then add a) is the safest way to avoid slips.
Unlock the full note: start 7 days free.
Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.
All notes in S1.1 Representing and Summarising Data
- Statistical Modelling, and Stem-and-Leaf Diagrams
- Types of Data and the Mean, Median and Mode
- Grouped Data: Estimating the Mean, Median, Quartiles and Percentiles
- Measuring Spread: Range, Interquartile Range, Variance and Standard Deviation
- Cumulative Frequency Diagrams and Box Plots
- Histograms, Frequency Density and the Shape of a Distribution
- Outliers, Cleaning Data and Choosing How to Present It
- Coding Data: Linear Changes to the Mean and Standard Deviation
What's inside for this topic
8 teacher notes, 180 practice questions, 40 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Previous note: Outliers, Cleaning Data and Choosing How to Present It