Technique Masterclasses

Statistics 1

Deep Dive: Measures of Location and Dispersion

CODEX Deep-Dive — Measures of Location and Dispersion: Mean, Coding, and Standard Deviation (WST01, spec 2.2/2.3)

Provenance (2026-09-29): Read/checked for this document — research/veridian/WST01-verified-facts.md in full, grepped specifically for "measures of location", "dispersion", "quartile", "interpolation", "percentile", "standard deviation", "variance", "coding", "mean", "median", "mode" and "skew" (§1 spec table of contents, §2a formula-booklet contents, §5 Section 2's full trap catalogue, §6 the "show that" cross-cutting note, §7 topic-richness ranking, §8 flagged issues, and the dedicated 2026-09-12 per-lesson audit entry for measures-of-location-and-dispersion.ts); the live lesson file content/veridian/curriculum/wst01/measures-of-location-and-dispersion.ts in full; the three existing WST01 technique-hub documents in this folder (codex-formula-and-method-bank.md, forge-exam-technique-guide.md, signal-frequency-and-boundaries.md), each grepped for this topic; content/veridian/question-bank/wst01.ts (grepped — the one item that surfaces is a box-plot/outlier recalculation question that belongs to spec 2.1/2.4, not this lesson's own 2.2/2.3 territory, so no direct duplicate exists there yet); and, for boundary-checking only, outliers-boxplots-comparing-distributions.ts and reading-and-comparing-distributions.ts (grepped for "median", "skew" and "interpolat" to confirm exactly which adjacent content those two sibling lessons already own, so this document doesn't re-teach it under a different name). No new PDF fetches, web searches, or primary-source downloads were performed for this document — every specific factual claim below traces to one of those already-verified sources, cited by name and, wherever the source allows it, by series and question number. All arithmetic in every micro-example below was computed independently with exact-fraction arithmetic (Python's fractions.Fraction) and cross-checked by a second method (the computational variance formula against the definitional Σf(x−x̄)² form) before being written in.

Scope — what this adds, and what it deliberately does not repeat

The live lesson already derives the coding-variance-squares-the-constant result twice (a plain-language concept-ladder and a full formal proof), works a complete real-anchored coding chain (assumed mean 255, scale factor 0.5), works a full marked-solution on mean/SD/interpolation for a 60-package grouped-masses table with two distinct malformed-SD-formula wrong paths, works a combining-two-groups chain-drill built on a real quoted standard deviation of 2, and carries ten trap-taxonomy items and five MCQs covering practically every confirmed error this topic has produced. codex-formula-and-method-bank.md already tabulates every relevant formula with its memorise/given/technique status. signal-frequency-and-boundaries.md already gives this section's series-count ranking. None of that is reproduced here.

This document instead does four things the existing material doesn't: (1) states the underlying arithmetic formally, including deriving the computational variance formula from its definitional one — asserted as equivalent everywhere else in this repo, but never actually proved; (2) covers real, distinct data-shape sub-cases the spec explicitly allows (a bare list with no table at all; a discrete frequency table with no midpoint assumption; a grouped table with unequal class widths) that the live lesson's own single running example — a grouped table with every class the same width — doesn't exercise; (3) extends the already-confirmed interpolation machinery to two things spec 2.2/2.3 names but no existing WST01 file computes: the median of a grouped table by interpolation rather than by rank, and an interpercentile range wider than the IQR; (4) assembles every real exam angle this specific topic has actually been tested from into one synthesis, with an honest count of exactly how many of the fully-read examiner-report series confirm it.

1. The formal model

1.1 Mean — three data shapes, one idea. For a bare list of nn values, xˉ=Σx/n\bar{x} = \Sigma x / n. The moment the data arrives as a frequency table, each value xx carries a count ff, so the sum becomes Σfx\Sigma fx and the denominator Σf\Sigma f (the total count of data values, whatever number of rows that total is split across): xˉ=Σfx/Σf\bar{x} = \Sigma fx / \Sigma f. For a grouped table, no exact value is known for any single data point inside a class — only which class it fell into — so the class midpoint stands in for every value in that class, on the explicit modelling assumption (spec 1.1's own territory) that values are spread evenly enough across the class for its centre to represent it fairly. Median and mode, the other two named statistics under spec 2.2, are defined here for completeness rather than left implicit: the median is the middle value by rank once the data is ordered (position (n+1)/2(n{+}1)/2 for a plain list); the mode is simply the most frequently occurring value, or the modal class for grouped data. Both are named in the spec's own list; §4 below states plainly why neither gets a dedicated exam-trap treatment in this document, the way mean/SD/interpolation do.

1.2 Variance — deriving the computational form from the definitional one. The live lesson states both forms of variance as "algebraically identical" without deriving the link; that derivation is short, real, and worth having explicitly. Starting from the definitional form and expanding the square:

Σf(x−xˉ)2=Σf(x2−2xxˉ+xˉ2)=Σfx2−2xˉ Σfx+xˉ2 Σf.\Sigma f(x-\bar{x})^2 = \Sigma f\left(x^2 - 2x\bar{x} + \bar{x}^2\right) = \Sigma fx^2 - 2\bar{x}\,\Sigma fx + \bar{x}^2\,\Sigma f.

Since xˉ=Σfx/Σf\bar{x} = \Sigma fx / \Sigma f, the middle term is −2xˉ(xˉ Σf)=−2xˉ2 Σf-2\bar{x}(\bar{x}\,\Sigma f) = -2\bar{x}^2\,\Sigma f, which combines with the last term to give −xˉ2 Σf-\bar{x}^2\,\Sigma f. So Σf(x−xˉ)2=Σfx2−xˉ2 Σf\Sigma f(x-\bar{x})^2 = \Sigma fx^2 - \bar{x}^2\,\Sigma f, and dividing both sides by n=Σfn=\Sigma f:

Σf(x−xˉ)2n=Σfx2n−xˉ2.\frac{\Sigma f(x-\bar{x})^2}{n} = \frac{\Sigma fx^2}{n} - \bar{x}^2.

This is a standard algebraic identity, not itself a claim sourced to any exam board — it is included because the live lesson asserts the equivalence but never shows why it holds, and a student who can rebuild the computational formula from the definitional one on demand is protected against exactly the kind of memory slip the malformed-SD-formula trap (§3 below) is built from.

1.3 Coding, and one boundary case worth naming. The live lesson's own concept-ladder already proves Var(bX−ab)=b2Var(X)\text{Var}(bX-ab) = b^2\text{Var}(X) formally — not repeated here. One boundary case is worth naming explicitly because it's easy to lose sight of inside the general rule: if the coding scale factor b=1b=1 (a pure shift, Y=X−aY=X-a, no rescaling at all), then Var(Y)=12 Var(X)=Var(X)\text{Var}(Y) = 1^2\,\text{Var}(X) = \text{Var}(X) exactly — sliding every value by the same constant changes nothing about how spread out they are. This is the b=1b=1 special case of the general squared-constant rule, not an exception to it, and it's a useful self-check: if a coding scheme ever turns out to be additive-only, the variance step should need no correction at all.

1.4 Interpolation as one formula, three named statistics. The live lesson's own mechanism block already writes the interpolation formula generically, Q=L+position−Ffclass×hQ = L + \frac{\text{position}-F}{f_{\text{class}}} \times h, without restricting "position" to a quartile's own n/4n/4 or 3n/43n/4. That genericness is the real point spec 2.3 is making by naming "range and interpercentile ranges" (plural, unqualified) rather than "the IQR" specifically: the same interpolation machinery that locates Q1Q_1 and Q3Q_3 locates any percentile, by setting position =(p/100)×n= (p/100) \times n (or (n+1)(n{+}1), under the same tolerated-either-convention rule already confirmed for quartiles) for the pp-th percentile. The median itself is nothing but the special case p=50p=50 — position n/2n/2 — of this identical formula. §2.4 and §2.5 below compute both of these genuinely, because neither appears worked anywhere else in this repo's WST01 material.

2. Real, distinct sub-cases, each with a short micro-example

2.1 Mean and SD from a bare list — no table at all. Spec 2.2's own guidance states plainly that data "may be discrete, continuous, grouped or ungrouped," and the plain-list case is the one the live lesson never actually computes (it moves straight to frequency and grouped tables). Five values: 4,7,7,9,134, 7, 7, 9, 13. Σx=40\Sigma x = 40, xˉ=40/5=8\bar{x}=40/5=8. Σx2=16+49+49+81+169=364\Sigma x^2 = 16+49+49+81+169=364. Computational form: Var=364/5−82=72.8−64=8.8\text{Var}=364/5-8^2=72.8-64=8.8. Cross-checked against the definitional form directly: deviations −4,−1,−1,1,5-4,-1,-1,1,5, squares 16,1,1,1,2516,1,1,1,25, sum 4444, ÷5=8.8\div 5 = 8.8 — the two forms agree exactly, as §1.2's derivation guarantees they must. σ=8.8≈2.97\sigma=\sqrt{8.8}\approx2.97 (3 s.f.).

2.2 Mean and SD from a discrete (ungrouped) frequency table. A genuinely different case from a grouped table: the values themselves are exact (no midpoint assumption is needed), only their counts are compressed into a table. Twenty students' number of siblings: x=0,1,2,3x=0,1,2,3 with f=6,8,4,2f=6,8,4,2 (Σf=20\Sigma f=20). Σfx=0+8+8+6=22\Sigma fx = 0+8+8+6=22, xˉ=22/20=1.1\bar{x}=22/20=1.1. Σfx2=0+8+16+18=42\Sigma fx^2=0+8+16+18=42, Var=42/20−1.12=2.1−1.21=0.89\text{Var}=42/20-1.1^2=2.1-1.21=0.89; cross-checked definitionally (weighted squared deviations sum to 17.817.8, ÷20=0.89\div20=0.89 — matches exactly). σ=0.89≈0.943\sigma=\sqrt{0.89}\approx0.943.

2.3 The mean-from-a-table trap, generalised to unequal class widths. The live lesson's own trap-taxonomy makes a precise, narrow claim about its wrong-shortcut error (using Σ(width×f)/Σf\Sigma(\text{width}\times f)/\Sigma f in place of Σfx/Σf\Sigma fx/\Sigma f): for a table where every class shares the same width, that wrong shortcut always collapses to exactly that one constant width, "no matter what the actual frequencies are" — a mathematical fact, and a self-evident giveaway once spotted. Real grouped WST01 tables are not required to have equal widths, and the unequal-width case is genuinely worse: a mass table with classes 00–55 (f=4f=4), 55–1515 (f=10f=10), 1515–2020 (f=6f=6) has Σf=20\Sigma f=20, correct mean =xˉ=(4×2.5+10×10+6×17.5)/20=215/20=10.75=\bar{x}=(4\times2.5+10\times10+6\times17.5)/20 = 215/20=10.75; the wrong shortcut gives (5×4+10×10+5×6)/20=150/20=7.5(5\times4+10\times10+5\times6)/20 = 150/20=7.5 — a number that does not equal any single class width, sits comfortably inside the data's own 00–2020 range, and so passes a plausibility check that would catch an out-of-range answer. This variant of the trap is not itself separately confirmed in the reviewed examiner-report archive as a distinct tested angle — it is this document's own extension of the confirmed equal-width finding, flagged as such — but it demonstrates the underlying mechanism (mixing up a class's width with its midpoint) more starkly than the equal-width case can, precisely because the wrong number no longer advertises itself as suspicious.

2.4 The median of a grouped table, by interpolation, not by rank. Spec 2.2 lists the median among the location statistics a lesson must be able to calculate for data that "may be... grouped," yet every WST01 median treatment already in this repo (reading-and-comparing-distributions.ts, outliers-boxplots-comparing-distributions.ts) teaches the rank-based median — the (n+1)/2(n{+}1)/2-th ordered value — for raw or stem-and-leaf data, never the interpolated median of a genuinely grouped table. That's a real, spec-implied sub-case with no worked example anywhere yet. Exam-mark grouped table: classes 00–2020, 2020–4040, 4040–6060, 6060–8080, 8080–100100 with f=3,9,18,15,5f = 3, 9, 18, 15, 5 (n=50n=50); cumulative frequencies 3,12,30,45,503, 12, 30, 45, 50. Median position =n/2=25=n/2=25, which falls inside the 4040–6060 class (F=12F=12 before it, f=18f=18 within it, h=20h=20): median =40+25−1218×20=40+14.44‾=54.4=40+\frac{25-12}{18}\times20 = 40+14.4\overline{4}=54.4 (3 s.f.). Using the alternative (n+1)/2=25.5(n{+}1)/2=25.5 convention (same class): 40+25.5−1218×20=40+15=55.040+\frac{25.5-12}{18}\times20=40+15=55.0 exactly — a genuinely different final value from the same data, extending the live lesson's own confirmed nn-vs-(n+1)(n{+}1) finding to a second statistic beyond the quartiles it was originally confirmed for. No worked example testing this exact combination (grouped median specifically, by interpolation) was found in the reviewed archive — flagged honestly in §4, not presented as confirmed exam content, only as a genuine and previously unworked application of an already-confirmed method.

2.5 Interpercentile ranges beyond the IQR. Spec 2.3's own wording names "range and interpercentile ranges" as the dispersion statistics, and every worked WST01 example located in the reviewed archive computes the IQR (P25P_{25} to P75P_{75}) specifically and nothing wider. A fresh grouped table — ages, classes 00–10,1010, 10–20,…,4020, \ldots, 40–5050, f=4,10,20,10,6f=4,10,20,10,6 (n=50n=50); cumulative 4,14,34,44,504,14,34,44,50 — gives the 1010th and 9090th percentiles by the identical interpolation formula: position for P10P_{10} is 0.10×50=50.10\times50=5, which falls in the 1010–2020 class (F=4F=4, f=10f=10, h=10h=10): P10=10+5−410×10=11P_{10}=10+\frac{5-4}{10}\times10=11. Position for P90P_{90} is 0.90×50=450.90\times50=45, falling in the 4040–5050 class (F=44F=44, f=6f=6, h=10h=10): P90=40+45−446×10=41.7P_{90}=40+\frac{45-44}{6}\times10=41.7 (3 s.f.). The 1010–9090 interpercentile range is 41.7−11=30.741.7-11=30.7 (3 s.f.). This is the direct generalisation of the confirmed IQR method — same formula, same tolerated position conventions — but no citation anywhere in the reviewed archive confirms a WST01 question naming a specific interpercentile range other than the IQR by name; flagged in §4 rather than claimed as tested.

3. Synthesis — every real exam angle this specific topic has actually been tested from

Confirmed in the archive, one row per distinct angle, all traced to WST01-verified-facts.md §5 Section 2 and the dedicated per-lesson audit:

Series & questionReal angle testedWhat the source shows (paraphrased; short quote attributed)Where taught in this repo
Jan 2023 Q1(c)Mean from a grouped frequency table, wrong denominator/numeratorER: some candidates divided by the number of classes rather than Σf\Sigma f, or substituted class-width×frequency for the numeratorLive lesson, commonWrongPath (a); this document §2.3 (unequal-width extension)
Jun 2022 Q3(e)Coding: decoding a variance three distinct wrong ways (constant not squared; squared but multiplied not divided; not decoded at all), real anchors 255 and 0.5ER, paraphrased: candidates left the assumed mean folded in, or used 0.50.5 instead of 0.520.5^2, or used 0.520.5^2 the wrong way roundLive lesson's full worked-chain and trap-taxonomy (all three variants)
Jan 2023 Q1(d)Two distinct malformed standard-deviation formulae in one sitting; a /(n−1)/(n{-}1) "sample SD" form credited as a genuine alternative on this one seriesER's own two malformed shapes (summarised, not quoted verbatim, by the facts bank itself); mark scheme confirms the n−1n{-}1 alternativeLive lesson's marked-solution commonWrongPath (b) i/ii, and reference-card note
Jan 2021 Q6(c)Recovering Σx2\Sigma x^2 for a group from its given mean and SD, forgetting to square the SDER: candidates "forgot to square the standard deviation of 2"Live lesson's chain-drill and trap-taxonomy item
Jan 2023 Q1(e)nn vs (n+1)(n{+}1) interpolation-position convention landing in different classesER: candidates who "worked with nn rather than n+1n{+}1" were more often successfulLive lesson's mechanism block; this document §2.4 (extended to the median)
Oct 2021 Q3(b)"Show that the IQR == [given value]" reverse-engineered instead of genuinely interpolatedER, paraphrased: some candidates invented two values with the target gap between them rather than interpolating either quartileLive lesson's trap-taxonomy (named, not fully drilled — full treatment in show-that-answer-discipline.ts)
Jun 2024 Q1(b)Stem-and-leaf diagram read in the wrong direction, silently swapping which value is Q1Q_1 vs Q3Q_3ER, paraphrased: reading a back-to-back diagram's mirrored side in plain print order swapped the two quartilesOwned by reading-and-comparing-distributions.ts (spec 2.1) — adjacent, not this lesson's own core skill

Honest frequency statement, no invented likelihoods. The facts bank's own frequency audit (signal-frequency-and-boundaries.md) confirms Section 2 as a whole (spec 2.1–2.4) tested in 6 of the 6 fully-read examiner-report series (Jun 2019, Jan 2021, Oct 2021, Jun 2022, Jan 2023, Jun 2024) — the only section confirmed in every one. But that combined count spans four spec sub-points, not just this lesson's own 2.2/2.3 core (mean, coding, standard deviation, interpolation). Narrowed to that specific core, this document finds a directly-cited, distinct exam angle in 4 of those 6 series — Jan 2021, Oct 2021, Jun 2022, Jan 2023 — with a fifth (Jun 2024) contributing only an adjacent, differently-tagged trap (the stem-and-leaf misread above, which affects which numbers a student reports as Q1Q_1/Q3Q_3 but is diagnosed in the source as a spec-2.1 reading error, not a 2.2/2.3 calculation error), and the sixth (Jun 2019, the one series added by the later spot-check pass) surfacing nothing new specific to this topic in that pass. Both statements are true at once and are kept separate deliberately, exactly as this repo's other CODEX deep-dives already do for their own topics.

4. Open flags — where the real evidence currently runs out

Sources

research/veridian/WST01-verified-facts.md — §1 (spec text for 2.2/2.3, verbatim), §2a (formula-booklet contents, confirming mean/SD/IQR are not printed and must be memorised), §5 Section 2 (every examiner-report finding cited above), §6 (the cross-cutting "show that" note, for Oct 2021 Q3(b)), §7 (topic-richness ranking), §8 (coverage-gap flags), and the 2026-09-12 per-lesson audit entry for measures-of-location-and-dispersion.ts. content/veridian/curriculum/wst01/measures-of-location-and-dispersion.ts (live lesson, read in full). content/veridian/technique-hub/wst01/codex-formula-and-method-bank.md, forge-exam-technique-guide.md, and signal-frequency-and-boundaries.md (all three, grepped for this topic). content/veridian/question-bank/wst01.ts (grepped; no direct-duplicate item found). content/veridian/curriculum/wst01/outliers-boxplots-comparing-distributions.ts and reading-and-comparing-distributions.ts (grepped only, to confirm the median/skew/stem-leaf boundary lines drawn in §1.1, §2.4 and the synthesis table).