Measures of Variation
0. Why measure variation?
A measure of central tendency alone does not describe a data set — it says where the middle is, not how spread out the values are. Two sets can have the same mean/median/mode and be totally different.
Best summary = centre (mean / median) + variation (also called spread or dispersion).
Both batters: mean = 224 ÷ 8 = 28. A's scores are consistent, B's are varied — a measure of variation shows this.
1. The Range
- + Easy to calculate.
- − Uses only the two extreme values — ignores the middle values.
- Often more informative to quote min and max than just the difference.
e.g. lowest mark 6, highest 19 ⇒ range = 19 − 6 = 13.
Least = (lower bdy of the max) − (upper bdy of the min) | Greatest = (upper bdy of the max) − (lower bdy of the min).
To the nearest cm, tallest and shortest pupils are 169 cm and 150 cm. Find least & greatest possible range.
Rounded to nearest cm ⇒ 168.5 ≤ h < 169.5 and 149.5 ≤ h < 150.5.
2. Interquartile Range & Percentiles
Quartiles split the ordered data into 4 equal-sized parts:
- Q₁ = lower quartile | Q₂ = median (middle quartile) | Q₃ = upper quartile
Why IQR beats range: it measures the spread of the central half, is relatively unaffected by outliers (extreme values), and can be found even when the exact extreme values aren't known.
Ungrouped data — finding quartiles
- Even n: split into lower half & upper half. Q₁ = median of lower half, Q₃ = median of upper half.
- Odd n: split at the median and discard the median. Q₁, Q₃ = medians of the lower / upper halves.
IQR of the ordered values 2, 5, 9, 13, 29, 33, 49, 55.
Lower half: 2 5 9 13 | Upper half: 29 33 49 55.
IQR of 69, 17, 43, 6, 73, 77, 39.
Order: 6, 17, 39, 43, 69, 73, 77 ⇒ median = 4th = 43 (discard it).
Stem-and-leaf (key 14|2 = 142): 14| 2 2 4 8 9 15| 1 3 5 6 7 9 16| 5 8
(each half has 6 values ⇒ its median is the 3.5th value, i.e. average of the 3rd & 4th)
| Set | min | Q₁ | Q₂ | Q₃ | max |
|---|---|---|---|---|---|
| A: 2 2 3 11 11 21 22 | 2 | 2 | 11 | 21 | 22 |
| B: 6 6 6 11 13 17 19 20 | 6 | 6 | 12 | 18 | 20 |
| C: 9 15 28 32 35 49 | 9 | 15 | 30 | 35 | 49 |
| D: 5 7 9 10 11 12 12 16 17 | 5 | 8 | 11 | 14 | 17 |
- ① median mid-way between min & max — sometimes (true only for D)
- ② median mid-way between Q₁ & Q₃ — sometimes (B and D)
- ③ IQR = exactly ½ range — sometimes (D: 6 and 12)
- ④ Q₃ − Q₂ > Q₂ − Q₁ — sometimes (A: 10 > 9 ✓; B: 6 = 6 ✗; C: 5 < 15 ✗)
Grouped data — use a cumulative frequency graph
Read values at any position of the ordered data off a cumulative frequency (CF) graph.
| Quartile | Lower Q₁ | Median Q₂ | Upper Q₃ |
|---|---|---|---|
| Position | n4 or ¼Σf | n2 or ½Σf | 3n4 or ¾Σf |
Q₁, Q₂, Q₃ = 25th, 50th, 75th percentiles.
e.g. 320 values: Q₁, Q₂, Q₃ at 80th, 160th, 240th; 90th percentile at (0.90 × 320) = 288th value.
Range of the middle 80% = 90th percentile − 10th percentile.
From the CF polygon (min 2 min, max 30 min) estimate: a greatest possible range, b IQR, c 95th percentile.
3. Box-and-Whisker Diagrams
A box plot shows 5 key values: smallest, Q₁, median Q₂, Q₃, largest.
- Draw on graph paper with a scale; label the variable and units (e.g. "Length (cm)").
- Box = IQR (Q₁ to Q₃) with a line at the median. Whiskers go from the box out to min and max.
- The whisker (range) is NOT drawn through the box.
| Median | Range | IQR | |
|---|---|---|---|
| Dataset x | 6 | 14 − 1 = 13 | 11 − 4 = 7 |
| Dataset y | 9 | 15 − 0 = 15 | 12 − 3 = 9 |
Compare medians (average): x-values are on average less than y-values.
Compare range & IQR (spread): y is more varied than x.
Skewness from a box plot
The longer tail of the data's curve is on the side of the larger values for positive skew, smaller values for negative skew.
4. Variance & Standard Deviation
Deviation of a value = x − x̄ (positive above the mean, negative below). Take 5 numbers with mean 10, e.g. 4, 8, 10, 12, 16:
Sum of deviations is always 0 for any data set (positives cancel negatives) ⇒ mean deviation is useless. We need every deviation to be ≥ 0.
Option 1 – mean absolute deviation: Σ|x − x̄|n (|x − x̄| = drop the minus sign). Awkward for big data & algebra ⇒ not used.
Option 2 – square the deviations (our choice): mean of (x − x̄)² is the variance.
Variance has squared units (m² if data in m) ⇒ take the square root to get the standard deviation, in the original units. Written SD(X).
grouped (x = class mid-value)SD = √Σ(x − x̄)²fΣf = √Σx²fΣf − x̄² , x̄ = ΣxfΣf
Meaning: low SD ⇒ values close to the mean; high SD ⇒ widely spread. (e.g. coffee machine set to 400 ml: high SD ⇒ some customers cheated, some cups overflow!)
For 3, 9, 15, 24, 29 find a the SD, b which numbers are more than 1 SD from the mean.
x = 12, 14, 16 with f = 13, 28, 10. Find SD to 3 s.f. — extend the table:
| x | f | xf | x²f = x × xf |
|---|---|---|---|
| 12 | 13 | 156 | 12×156 = 1872 |
| 14 | 28 | 392 | 14×392 = 5488 |
| 16 | 10 | 160 | 16×160 = 2560 |
| Σf = 51 | Σxf = 708 | Σx²f = 9920 |
Heights of 20 children: 1.2– (f = 2), 1.4– (f = 12), 1.5–1.7 (f = 6). Grouped ⇒ use class mid-values x = 1.3, 1.45, 1.6 ⇒ an estimate.
| x | 1.3 | 1.45 | 1.6 | totals |
|---|---|---|---|---|
| f | 2 | 12 | 6 | Σf = 20 |
| xf | 2.6 | 17.4 | 9.6 | Σxf = 29.6 |
| x²f | 3.38 | 25.23 | 15.36 | Σx²f = 43.97 |
- High SD of property prices: mixed area — cheap flats beside luxury houses; buyers of very different wealth.
- High variance of monthly sales: seasonal product (e.g. ice cream, heaters, festival goods).
- SD of exam marks ≈ 0: nearly everyone scored the same ⇒ exam does not separate students (too easy / too hard) ⇒ not very useful.
- Low variance of procedure times: teams are consistent, efficient and well-trained (standard procedure).
Laps (4–8: 6 adults, 9–13: 10, 14–18: 4). Andrea used mid-values 6, 11, 16 (mean 10.5); Billie used 6.5, 11.5, 16.5 (mean 11). Both got SD = 3.5.
Billie's values are all 0.5 more ⇒ the whole set is translated ⇒ same SD (spread unchanged), but a different mean.
Laps completed are whole numbers ⇒ class boundaries 3.5–8.5, 8.5–13.5, 13.5–18.5 ⇒ mid-values 6, 11, 16. Andrea's mean (10.5) is the better one; for SD either works.
SD vs IQR
| Advantages of SD | Disadvantages of SD |
|---|---|
| much simpler to calculate than IQR | far more affected by extreme values than IQR |
| data need not be ordered | gives more weight to large deviations than small ones |
| easier to use algebraically (advanced work) | |
| uses all data values |
With outliers / skewed data the IQR (and a box plot) may describe the data better than mean & SD.
5. Calculating from Totals & Combined Sets
Ungrouped: use totals n, Σx, Σx². Grouped: use Σf, Σxf, Σx²f. Rearrange the variance formula to find a missing total.
n = 25, Σx = 275, Var(x) = 7. Find Σx².
Combined sets
Treat all values together: add the totals of the two sets, then use the formulae.
Boys (10): Σx = 1650, Σx² = 275 490. Girls (15): Σy = 2370, Σy² = 377 835. SD of all 25 children (3 s.f.)?
120 boys (x): Σx = 7020, Σx² = 424 320. 80 girls (y): Σy² = 352 130. SD of all = 10. Find the girls' mean.
6. Coded Data — adding / subtracting
Amber (x): 12 17 11 9 16 | Buti = x − 1: 11 16 10 8 15 | Chen = x + 3: 15 20 14 12 19.
All three: mean 13 / 12 / 16, but Var = 9.2, SD ≈ 3.03, range = 8, IQR = 6.5 — identical.
Adding/subtracting a constant translates the data: mean shifts, all measures of spread (variance, SD, range, IQR) are unchanged.
ungrouped: Σx²n − x̄² = Σ(x − b)²n − (Σ(x − b)n)²
grouped: Σx²fΣf − x̄² = Σ(x − b)²fΣf − (Σ(x − b)fΣf)²
8 values of x: Σ(x−10)² = 1490, Σ(x−10) = 100. 12 values of y: Σ(y+5)² = 5139, Σ(y+5) = 234. Find Var of all 20.
Number of brothers x for 20 girls; table gives x − 1.
| x − 1 | 0 | 1 | 2 | 3 | 4 | total |
|---|---|---|---|---|---|---|
| f | 2 | 4 | 8 | 5 | 1 | Σf = 20 |
| (x−1)f | 0 | 4 | 16 | 15 | 4 | 39 |
| (x−1)²f | 0 | 4 | 32 | 45 | 16 | 97 |
7. Coded Data — multiplying (ax − b)
Multiplying stretches the set (changes spread); adding just translates it (no effect on spread).
Taxi: cost y = 4x + 3 ($3 fixed + $4/km). Distances {1, 2, 3} ⇒ costs {7, 11, 15}.
SD(ax − b) = |a| × SD(x) Range, IQR also × |a|
Check with the taxi: Var(x) = ⅔, Var(4x+3) = 32/3 = 16 × ⅔ ✓; SD(x) = ¼ × SD(4x + 3).
Grouped / ungrouped coded totals: Var(x) = 1a² [ Σ(ax − b)²n − (Σ(ax − b)n)² ] (use Σf in place of n and add f for grouped).
SD of brand-name prices is $24. Imitations cost 25% of brand price. Variance of imitation prices?
Σ(3x − 1)² = 9136, Σ(3x − 1) = 53, n = 10. Find Σx².
Challenge from the book: repeat for n = 2, n = 4, then any n (Σ(x − x̄)² = Σx² − 2x̄Σx + n x̄² = Σx² − n x̄²).
8. Full Chapter Cheat-Sheet
- Range = max − min (grouped: least/greatest from class boundaries). IQR = Q₃ − Q₁.
- Ungrouped: median at (n+1)/2 th value; split halves (discard median if n odd) ⇒ Q₁, Q₃ = medians of halves.
- Grouped / CF graph: Q₁ at n/4 (¼Σf), Q₂ at n/2, Q₃ at 3n/4; kth percentile at k% × n; middle 80% = P₉₀ − P₁₀.
- Box plot: min, Q₁, Q₂, Q₃, max on a scale. Positive skew: Q₃−Q₂ > Q₂−Q₁; negative: Q₂−Q₁ > Q₃−Q₂; symmetric ≈ equal.
- Var = Σx²/n − x̄² = Σ(x−x̄)²/n; grouped: Σx²f/Σf − x̄². SD = √Var. Use the exact mean.
- Combined sets: mean = (Σx+Σy)/(nₓ+n_y); Var = (Σx²+Σy²)/(nₓ+n_y) − [(Σx+Σy)/(nₓ+n_y)]².
- Coding: Var(x) = Var(x − b); Var(ax − b) = a² Var(x); Var(x) = (1/a²)Var(ax − b). Mean: x̄ = mean(x−b) + b.
- SD: uses all data, easy algebra, but affected by outliers. IQR: robust to outliers, uses only the middle 50%.