Mistake Master
Summary Statistics for One Quantitative Variable
Move One Value and Watch Which Summaries Flinch
You'll learnwhich summaries an extreme value can drag and which ones ignore it, by changing a single commute and recomputing all five on screen.
Twenty one-way commutes, in minutes, built so the mean and the median are both exactly 30. Then one person moves house and their commute goes from 41 minutes to 95. Nobody else's changes. The mean climbs to 32.7, the standard deviation nearly triples, the range more than triples — and the median and the interquartile range do not move at all. That single edit is the whole topic: it sorts every summary in this course into the ones a far-out value can drag and the ones it cannot, and it explains why a skewed data set is reported with a median and an IQR rather than with a mean and a standard deviation. Every number on the screen is computed from the twenty values, so a drawn shape and the sentence describing it cannot disagree. Twelve short steps; press Next for each one.
Read all 12 steps as text
Twenty one-way commutes
Twenty people, one-way commute times in minutes. The dots are the twenty values, and the boxplot underneath is the same twenty drawn a second way on the same axis.
Read the shape while it lands: a mound in the high twenties and low thirties, thinning out to 19 minutes at one end and 41 at the other.
Mean and median are both exactly thirty
These particular values are symmetric — pair the shortest with the longest, the second-shortest with the second-longest, and every pair sums to 60 minutes. So the mean and the median are both exactly 30, and there is nothing yet to choose between them.
The shaded band runs one standard deviation either side of the mean: 5.86 minutes each way. The two measures of spread — that and an interquartile range of 7 minutes — are the same order of size.
One commute moves from 41 to 95
One person moves house. Their commute goes from 41 minutes to 95. Nobody else's changes — nineteen of the twenty values are untouched.
Watch the two rules while it travels. One of them follows the dot and one of them does not.
The mean climbs, the median does not
The green mean rule has slid right to 32.7. The white median rule has not moved by any amount at all.
The mean is a total shared out among everybody, so 54 extra minutes over 20 commutes raises it by \(54 \div 20 = 2.7\). The median is a position: with 20 values it is the average of the 10th and 11th, and those are still 30 and 30.
This is what resistant means. A resistant summary is one a single far-out value cannot drag, and the median is resistant precisely because it counts values rather than adding them.
The band nearly triples; the box does not
Run the same edit and watch the spread instead of the centre. The shaded band swells from ±5.86 minutes to ±15.58. The box does not move a pixel.
The reason is in the two definitions. The standard deviation adds up every value's squared distance from the mean, so the moved commute enters twice over — once as a deviation of about 62 minutes, and again by dragging the mean everything else is measured from. The IQR reads two numbers only, \(Q_3 - Q_1\), and both are averages of the 5th and 6th values of a half.
The range is the least stable of the three: it is the two extremes, so it went from 22 minutes to 76.
What a standard deviation actually is
Back to the original twenty. The standard deviation is
and the plain-language reading is roughly how far a commute sits from the mean, in minutes. Find each deviation, square them, divide by \(n-1\), take the square root to get back to minutes.
Two things it can never be: negative, because it is built from squares; and zero, unless every single value is identical.
A typical distance, not a boundary
The word doing the work is typical. The band on screen is \(\bar{x} \pm s\), from 24.14 to 35.86 minutes, and 6 of the 20 commutes are outside it — they are drawn in red.
A standard deviation is not a limit the data have agreed to respect; roughly a third of a mound-shaped data set normally sits further out than one \(s\). 14 of these 20 are inside, which is what "typical" buys you.
What the quartiles split
\(Q_1\) is the median of the lower half of the ordered data and \(Q_3\) is the median of the upper half. With \(n = 20\) each half holds ten values, so each quartile is the average of the 5th and 6th of its half: \(Q_1 = 26.5\) and \(Q_3 = 33.5\) minutes.
What they split the data into is a matter of counting, and the screen counts it. 5 of the 20 commutes sit at or below \(Q_1\) — a quarter. 15 sit at or below \(Q_3\). Subtract, and the box between them holds 10 of the 20: the middle half, not three quarters of the data.
And the interquartile range is what you get by subtracting: \(\text{IQR} = Q_3 - Q_1 = 7\) minutes. That is a single distance, in minutes — "the IQR is from 26.5 to 33.5" is the location of the box, not its width.
Move everybody forty minutes later
Here is the cleanest demonstration that an IQR is a width rather than a place. Add 40 minutes to every one of the twenty commutes — a ferry leg, a new office, anything that hits everyone equally.
The box slides bodily to the right. Watch its width while it goes.
A shift moves the centre, not the width
The median goes 30 → 70, \(Q_1\) goes 26.5 → 66.5, \(Q_3\) goes 33.5 → 73.5. And the IQR is still 7 minutes, because both quartiles moved by the same 40. So is the range, and so is the standard deviation: no two values are any further apart than they were.
Multiplying is a different matter. Double every commute and the center doubles and so does every measure of spread — IQR 7 → 14, standard deviation 5.86 → 11.72.
The rule worth carrying: adding a constant shifts the center and leaves the spread alone; multiplying scales both.
The fence multiplies, it does not add
The 1.5 IQR rule flags a value as a potential outlier if it lies more than \(1.5 \times \text{IQR}\) beyond a quartile. Both fences are drawn on the axis, and the arithmetic is done in the order it is written: multiply first.
Drop the IQR and you get \(Q_3 + 1.5 = 35\), and the difference is not cosmetic: the wrong fence flags 6 of these twenty commutes, the right one flags 1. A fence that is a multiple of the data's own spread adapts to the data; a fence that adds 1.5 minutes to a quartile does not.
What a flag means also has a limit. It marks a value as worth investigating. Removing it needs a reason from outside the data — a mistyped entry, a stopwatch left running — never the fact that it is far out.
Shape picks the pair; keep the pair together
One value moved and everything in this topic sorted itself into two columns. Not resistant: the mean, the standard deviation, the range. Resistant: the median, the interquartile range.
So the choice of summary is not a preference. Roughly symmetric with no far-out values: report the mean with the standard deviation. Skewed, or carrying an outlier: report the median with the IQR. A median reported with a standard deviation is a small error that reads as not knowing why either was chosen.
Two readings to carry out of here. \(s\) is a typical distance from the mean, in the data's units, not a bound and not a range. The IQR is a single distance, \(Q_3 - Q_1\) — and the outlier fence is 1.5 times that distance beyond a quartile.