Ⅵ Counting, Probability & Statistics · Stage 34 — Statistics · 34.4 Quartiles & SpreadAll lessons →
Stage 34 · Statistics

The Shape and Spread of Data: Quartiles & Dispersion

One number says where the data sits — a second says how far it scatters.

Ages 14–18 · Reading the world from data
Two archery squads with the same average score of 80. The box plots tell them apart at a glance: the steady squad's box is narrow, the wild squad's box is wide. A center alone cannot see the difference — the spread can.

Ask two classes their test scores and both might average 80. Are the classes the same? Not at all — one might run a tight band from 76 to 84, the other swing from 62 to 98. The center we met in Lesson 34.3 pins down where the data sits; it says nothing about how widely it scatters. This lesson builds the second half of every honest summary — the spread. We will cut the data into quarters with quartiles, draw the five-number summary as a box plot, flag stragglers with the 1.5·IQR rule, and finally average the squared distances from the mean to get the variance and its square root, the standard deviation — the single number statisticians trust most for spread.

34.4.1 Percentiles: where you stand in the line

"You scored in the 90th percentile." It sounds like a grade, but it is a rank: you beat about 90% of the people who took the test. A percentile answers the question "what fraction of the data falls at or below this value?" The p-th percentile is the value with about p% of the data at or below it.

To find it we need a rule, because data comes in lumps. Sort the n values from smallest to largest, then find the position of the percentile:

The position method (state it, then use it every time)

Sort the data. The p-th percentile sits at position i = n · p%. If i is not a whole number, round it up to the next position and read that value. If i lands exactly on a whole number, average the two values it sits between (positions i and i+1).

Different books round slightly differently; what matters is that you declare your method and stay with it. This is the rule the figures and readouts on this page use, so the box never lies.

Worked example — the 90th percentile of 10 quiz times

Sorted (minutes): 3, 7, 8, 12, 14, 15, 18, 21, 22, 25  (n = 10).

Position of P90: i = 10 · 0.90 = 9, a whole number → average positions 9 and 10: P90 = (22 + 25)/2 = 23.5 minutes. About 90% of the class finished in 23.5 minutes or less.

Position of P25: i = 10 · 0.25 = 2.5, not whole → round up to position 3: P25 = 8 minutes.

Try it SLIDE THE PERCENTILE
Drag p from 0 to 100. The marker lands on the p-th percentile of 20 test scores, computed by GX.percentile — read the rank story underneath.
percentile p

34.4.2 Quartiles and the IQR: the middle half

Three special percentiles slice the sorted data into four equal-sized groups. They are the quartiles:

The three quartiles

Q₁ = P25 — a quarter of the data is at or below it (the lower quartile).
Q₂ = P50 = the median — the halfway value.
Q₃ = P75 — three quarters of the data is at or below it (the upper quartile).

The distance between the outer two is the heart of spread:

IQR = Q₃Q₁   (the interquartile range)

The IQR is the width of the middle half of the data. Because it throws away the bottom quarter and the top quarter, it does not even notice a wild value at either end — it is the robust measure of spread, the spread to quote whenever outliers lurk, just as the median was the robust center in 34.3.

Worked example — quartiles of 10 exam scores

Sorted: 62, 71, 74, 77, 79, 82, 85, 88, 91, 95  (n = 10).

Q₁ = P25: i = 10·0.25 = 2.5 → up to position 3 → Q₁ = 74.
Q₂ = median: average the 5th and 6th values → (79 + 82)/2 = 80.5.
Q₃ = P75: i = 10·0.75 = 7.5 → up to position 8 → Q₃ = 88.

So IQR = Q₃Q₁ = 88 − 74 = 14. The middle half of the class is packed into a 14-point band.

34.4.3 The box plot and the 1.5·IQR rule

Stack five numbers and you can draw a distribution. The five-number summarymin, Q₁, median, Q₃, max — becomes a box-and-whisker plot: a box from Q₁ to Q₃ (so the box is the middle half, its length the IQR), a line inside at the median, and whiskers reaching out to the smallest and largest ordinary values.

"Ordinary," because the box plot also flags stragglers. Build a fence one and a half IQRs beyond each quartile:

The 1.5·IQR outlier rule

Lower fence = Q₁ − 1.5·IQR  ·  Upper fence = Q₃ + 1.5·IQR.

Any value outside the fences is an outlier. It is drawn as its own red dot, and the whisker stops at the most extreme value that is still inside the fence — the whisker no longer chases the straggler.

Try it BUILD A BOX PLOT
Toggle the stray score on. Watch the outlier split off as a red dot and the whisker retreat to the fence. The five marks come from GX.fiveNum.
a stray low score (30)

Notice what the stray value does: it barely nudges the median and IQR (the box hardly moves), yet it stretches the range dramatically. That contrast is exactly what the rest of this lesson sharpens.

34.4.4 Range: the crudest feel for spread

The simplest spread of all just subtracts the ends:

range = maxmin

The range is quick and honest about the full reach of the data, but it leans entirely on the two most extreme values — so a single outlier can blow it up. For our 10 exam scores the range is 95 − 62 = 33; add one stray 30 and the range leaps to 95 − 30 = 65, even though almost nothing about the class changed. The IQR over the same change went only from 14 to 17. Range and IQR answer different questions: range asks "how far apart are the extremes?", IQR asks "how wide is the typical middle?"

Two classes, one average

Class A scores: 76, 78, 80, 80, 82, 84 — mean 80, range 8.
Class B scores: 68, 74, 80, 80, 86, 92 — mean 80, range 24.

Identical centers, very different lives. We need a measure of spread that uses every value, not just the two ends — that is the variance, next.

34.4.5 Variance and standard deviation: distance from the mean

To use all the data, measure how far each value sits from the mean and average those distances. But a plain average of (xᵢ − x̄) always cancels to zero — the mean is the balance point, so the positives and negatives offset exactly. The fix is to square each deviation first. Squaring kills the signs and, as a bonus, punishes far-away values more. Average the squared deviations and you have the variance:

= Σ(xᵢ − x̄)²n

The variance is in squared units (points², centimetres²) — awkward to talk about. So take the square root and return to the data's own units. That is the standard deviation:

s = √ = √Σ(xᵢ − x̄)²n )

Read s as "the typical distance of a value from the mean." Small s means the data huddles near ; large s means it sprawls.

Worked example — variance and sd of 8 values

Data: 2, 4, 4, 4, 5, 5, 7, 9. First the mean: = (2+4+4+4+5+5+7+9)/8 = 40/8 = 5.

Deviations from 5: −3, −1, −1, −1, 0, 0, 2, 4.
Squared: 9, 1, 1, 1, 0, 0, 4, 16; their sum is 32.

= 32 / 8 = 4  (points²),   s = √4 = 2. The values typically sit 2 away from the mean of 5.

⚠ Watch out — the squaring traps

The variance uses squared deviations. Two mistakes bite here: forgetting to square (averaging plain deviations gives 0 every time), and forgetting to divide by n (the sum of squares alone keeps growing as you add data). And keep range and IQR straight — an outlier inflates the range and s far more than it moves the IQR, because IQR ignores the extremes while s squares them.

A note for later: dividing by n gives the population variance σ². When the data is a sample used to estimate a larger population, statisticians divide by n − 1 instead (the "sample variance"); we meet that fix in Lesson 34.5. On this page we divide by n and say "population" so every number is exact.

34.4.6 Comparing stability: when the averages tie

Here is where spread earns its keep. Two archers, two basketball shooters, two suppliers, two investments — whenever the averages tie, the one with the smaller standard deviation is the steadier, more dependable one. Same mean, smaller s ⇒ the values cluster tighter, the surprises are smaller, the performance is more predictable.

Try it SAME MEAN, DIFFERENT SPREAD
Both squads average 80. Each dot plot carries a band from x̄−s to x̄+s. Stretch the wild squad and watch its s grow while its mean stays put. Numbers from GX.mean and GX.dataSd.
wild squad swing ×

The conclusion is the one-liner to carry forward: a center tells you what to expect; the spread tells you how much to trust it. A summary that gives both — say, "mean 80, s = 2.6" — describes a class far better than either number alone.

What to carry forward

The spread toolkit — what each measure does and when to reach for it
MeasureFormulaWhat it capturesRobust to outliers?
Rangemax − minfull reach of the datano
IQRQ₃ − Q₁width of the middle halfyes
Variance s²Σ(xᵢ−x̄)² / nmean squared distance from x̄no
Std. deviation s√s²typical distance from x̄, in data unitsno

And the spine of the lesson: a p-th percentile marks the value with p% at or below it; Q₁, Q₂, Q₃ = P25, P50, P75 cut the data into quarters; the five-number summary draws a box plot and the 1.5·IQR fences flag outliers; and when centers tie, the smaller standard deviation wins for steadiness. Next, Lesson 34.5 uses a sample's x̄ and s to infer the whole population — and meets the bell curve where spread becomes σ.

Exercises

  1. For the data 4, 8, 6, 5, 3, 7, find the range, Q₁, Q₃, and the IQR.
    Show answer
    Sorted: 3, 4, 5, 6, 7, 8 (n = 6). Range = 8 − 3 = 5. Q₁ = P25: i = 6·0.25 = 1.5 → up to position 2 → Q₁ = 4. Q₃ = P75: i = 6·0.75 = 4.5 → up to position 5 → Q₃ = 7. IQR = 7 − 4 = 3.
  2. A test result puts you "at the 80th percentile." In one sentence, what does that mean — and is it the same as scoring 80%?
    Show answer
    It means about 80% of test-takers scored at or below you — a statement about your rank in the group, not your raw score. It is not the same as getting 80% of the questions right; you could be 80th percentile with a raw score of 60% if the test was hard for everyone.
  3. Compute the population variance s² and standard deviation s of 10, 12, 14, 16, 18.
    Show answer
    x̄ = (10+12+14+16+18)/5 = 70/5 = 14. Deviations: −4, −2, 0, 2, 4; squared: 16, 4, 0, 4, 16; sum = 40. s² = 40/5 = 8. s = √8 ≈ 2.83.
  4. For 62, 71, 74, 77, 79, 82, 85, 88, 91, 95 we found Q₁ = 74, Q₃ = 88, IQR = 14. Using the 1.5·IQR rule, would a new score of 52 be flagged as an outlier?
    Show answer
    Lower fence = Q₁ − 1.5·IQR = 74 − 1.5·14 = 74 − 21 = 53. Since 52 is below 53, yes — 52 is an outlier by the rule. (A score of 54 would not be.)
  5. Two machines fill bottles. Both average 500 mL. Machine X has s = 2 mL; Machine Y has s = 9 mL. Which machine should the factory prefer, and why?
    Show answer
    Machine X. Same average fill, but a far smaller standard deviation means its bottles sit much tighter around 500 mL — fewer underfilled (cheating the customer) or overfilled (wasting product) bottles. When centers tie, smaller s = steadier = more dependable.
  6. A student writes: "The variance of 5, 5, 5, 5 is the sum of deviations, which is 0, so s² = 0." Is the answer right, and is the reasoning right?
    Show answer
    The answer is right — all four values equal the mean, so every squared deviation is 0 and s² = 0 (no spread at all). But the reasoning is wrong: the sum of plain deviations is always 0 for any data, so it can never tell you the variance. You must square the deviations first. The variance is 0 here only because each value already equals the mean.

🎯 Quick check

Six questions to lock it in. Tap the answer you think is right.

§ For teachers and parents

This lesson develops measures of spread alongside the five-number summary and box plots, addressing CCSS HSS-ID.A.1 (represent data with plots on the real number line — here, box plots), HSS-ID.A.2 (compare center and spread — IQR and standard deviation — of two or more data sets), and HSS-ID.A.3 (interpret differences in spread accounting for the effect of outliers). The quartile position method (i = n·p%, round up, average on a tie) is stated explicitly and used consistently; popular software packages use slightly different interpolation rules, so a student's hand answer may differ from a calculator by a small amount — the important habit is declaring the method. We divide squared deviations by n (population variance σ²); the n−1 sample variance is introduced in Lesson 34.5 on inference.

eastmath.com · Stage 34 · 34.4 Quartiles & Spread · Reading the world from data