Prefer to click through the interactive model?
Descriptive statistics — study guide
The same fragments the interactive model serves, read in order. One source, two views.
Turning a pile of numbers into three questions
A sample is a list of numbers you actually hold, and descriptive statistics is the exact arithmetic for answering three questions about it: where does it center, how spread out is it, and how much would one strange reading change the answer. None of the three questions requires guessing or eyeballing a picture — each has a formula, and the formula gives the same number every time it is applied to the same list.
The fragments here work through one running sample, the eight values 2, 4, 4, 6, 8, 10, 12, 14, computing every quantity by hand so the arithmetic stays checkable at every step. That includes a question easy to skip past: whether the number you compute from a sample is even estimating the right thing about the larger population the sample came from, which is where a sample's variance quietly needs a different divisor than a full population's does.
These are the numbers other people, and other systems, will read off your sample without ever seeing the raw list — a mean without a spread, or a spread without knowing how one outlier would have changed it, promises more certainty than the arithmetic actually earned.
Three ways to name the center
Take the sorted sample 2, 4, 4, 6, 8, 10, 12, 14. The sample mean is the sum of every value divided by the count: (2 + 4 + 4 + 6 + 8 + 10 + 12 + 14) / 8 = 60 / 8 = 7.5. It is the only one of the three center measures that uses every value's actual size, which is exactly why one very large or very small value can drag it around.
The median is the middle of the sorted list. With an even count of values there is no single middle entry, so the median is the average of the two values that sit on either side of the midpoint: here that is (6 + 8) / 2 = 7. The mode is simply whichever value occurs most often; in this sample 4 appears twice and every other value appears once, so the mode is 4.
All three claim to describe "the center," and all three land somewhere different — 7.5, 7, and 4 — because each one is measuring a different property of the same list: total size for the mean, sorted position for the median, repetition for the mode. Reporting only one of them, without saying which, quietly picks which property of the data you want a reader to notice.
Splitting the sorted list in half, twice
Quartiles split a sorted sample into quarters the same way the median splits it in half, and the method has to be stated precisely, because more than one method exists and they can disagree. This uses the exclusive method: sort the data, find the median, and split the list into a lower half and an upper half — leaving the median itself out of both halves whenever the count is odd. With an odd count, a different convention, such as one that includes the median in each half, can return a different pair of numbers from the exact same list.
The running sample has an even count, 8, so the split is exact and no value has to be excluded. The lower half is 2, 4, 4, 6, whose own median is (4 + 4) / 2 = 4; that is the first quartile, Q1 = 4. The upper half is 8, 10, 12, 14, whose median is (10 + 12) / 2 = 11; that is the third quartile, Q3 = 11.
The interquartile range, IQR, is the distance between them: Q3 - Q1 = 11 - 4 = 7. It describes how spread out the middle half of the sample is, ignoring whatever sits below Q1 or above Q3 entirely — a spread measure that never even looks at the sample's most extreme values.
Why the divisor is one less than you'd guess
Measuring spread starts the same way it does for a full population: subtract the mean from every value, square each deviation so the negatives stop canceling out the positives, and add the squares up. For the running sample, the mean is 7.5, and the eight deviations are -5.5, -3.5, -3.5, -1.5, 0.5, 2.5, 4.5, 6.5. Squaring each one gives 30.25, 12.25, 12.25, 2.25, 0.25, 6.25, 20.25, 42.25, and those sum to 126.
A population's variance divides that sum by its count. A sample's variance divides it by one less than the count instead — here, 126 / (8 - 1) = 126 / 7 = 18 rather than 126 / 8. The name for this adjustment is Bessel's correction, and the reason for it is that the sample mean was itself computed from these same eight numbers, which spends one piece of information before the spread gets measured: once the mean and seven of the eight deviations are fixed, the eighth deviation is no longer free to be anything, since all eight have to sum to zero like a tape measure that was itself cut using the very same eight boards it now measures: one board's length is no longer free information, since the other seven already determine it, so only seven independent measurements are left to work with. Dividing by that smaller count of genuinely free values, 7, is what keeps the result an unbiased estimate of the wider population's variance.
The sample standard deviation is the square root of that number, √18 ≈ 4.24, which restores the original units instead of leaving them squared. Divide by the full count 8 instead of 7 and every sample variance you compute comes out systematically too small — a small bias, but a real and avoidable one, which is why n - 1 is the standing convention whenever the numbers in front of you are a sample rather than the whole population.
What one wild point does to each measure
Take the running sample and change one value: replace the largest reading, 14, with 140, as if a sensor glitched or a decimal point landed in the wrong place. The mean reacts immediately. The sum of the sample becomes 2 + 4 + 4 + 6 + 8 + 10 + 12 + 140 = 186, and dividing by 8 gives a new mean of 23.25 — more than triple the original 7.5, moved that far by a single value.
The median does not move at all. Sorted, the sample is still 2, 4, 4, 6, 8, 10, 12, 140, and the two middle values are still 6 and 8, exactly where they were before the swap, so the median is still (6 + 8) / 2 = 7. The value that changed was already the largest in the sample; pushing it further out changes nothing about which values sit in the middle.
The reason is what each statistic actually measures. The mean weighs every value by its size, so a value that grows without bound pulls the mean without bound right along with it. The median only cares about a value's rank — its position once everything is sorted — so a value can move arbitrarily far in either direction and the median will not notice, as long as it does not cross past whichever value currently sits next to the middle like a lineup ordered by height, where moving the tallest person onto a stepladder changes nothing about who is standing in the middle. That is the concrete, numeric case for reaching for the median instead of the mean whenever a sample might contain one reading you do not fully trust.
The five numbers that summarize a sample
Gather five landmarks from the running sample in its original form, with no outlier present: the minimum 2, the first quartile Q1 = 4, the median 7, the third quartile Q3 = 11, and the maximum 14. Together these are the five-number summary, a term popularized by the statistician John Tukey, who built much of the case for treating a handful of computed landmarks as a serious substitute for scanning a raw list.
Each landmark answers a different question the raw list does not answer directly. The minimum and maximum mark where the sample starts and ends. Q1 and Q3 mark the boundaries of the middle half, the same pair that produced the interquartile range of 7. The median marks the center in a way that ignores every value's exact size. Read together, the five numbers work like a route described by its start, its quarter-mark, its halfway point, its three-quarter mark, and its end, rather than by narrating every step of the trip, describing the shape of the whole sample without repeating every one of its eight entries.
Five numbers instead of eight is already a real compression, and the ratio only grows more favorable as a sample grows into the hundreds or thousands: a reader handed the five-number summary knows where a sample starts, ends, and centers, and how tightly its middle half clusters, without ever seeing the underlying list at all.
Where these numbers show up next
An agent pipeline evaluated across many runs ends up reporting exactly the pairing built here: a mean score, and how far that score tends to wander run to run, before anyone even gets to asking how the evaluation itself decides pass from fail. A mean alone hides whether every run landed close to it or whether a handful of very good runs are quietly covering for a long tail of bad ones — the same gap between "what's typical" and "how far things wander" that separates a mean from a spread here.
An RC car's sensors hand back the same kind of raw material: a stream of distance readings, wheel-speed counts, numbers that arrive one at a time and need summarizing before anything downstream reasons about them. A single bad reading — a reflection, a slipped wheel — behaves exactly like a 140 swapped into an otherwise ordinary sample, and whether a control loop built on that stream inherits the damage depends on whether it was built on a mean or a median in the first place.
None of that gets explained here — the evaluation harness and the sensor readings are the arguments being made elsewhere, not this one. What travels forward is the arithmetic: a mean and a median can each be exactly correct and still tell two different stories about the same numbers, and knowing which one you are looking at is not optional.