Mean, median & mode

Three measures of center, each answering "where is the middle of the data?" a little differently. On symmetric data they agree; on skewed data they pull apart — and the gap between them tells you something.

What it is

A measure of center is a single number that summarizes where a column of values typically sits. There isn't one right answer, because "typical" can mean different things. The three classic answers are the mean, the median, and the mode.

The mean is the arithmetic average: add up every value and divide by how many there are. The median is the middle value once the data are sorted — half the values fall below it, half above. The mode is simply the value that shows up most often. For a clean, symmetric, bell-shaped column the three land on essentially the same spot. The interesting cases are when they don't.

The formula

The mean of n values is their sum divided by the count:

x̄ = (1/n) · Σ xᵢ   for i = 1 … n

The median is the value at probability p = 0.5 — the middle of the sorted data. With an odd count it's the single middle value; with an even count it's the average of the two middle values:

n odd:   median = v[(n+1)/2]
n even:  median = ( v[n/2] + v[n/2 + 1] ) / 2     (v sorted ascending)

The mode has no arithmetic — it's just the most frequent value:

mode = the value xᵢ with the highest count of occurrences

The median is the p = 0.5 quantile, so it follows the same quantile definition Stratum uses everywhere else. The mode is the only one of the three that also works on categorical data — you can't average colors or city names, but you can ask which one appears most.

How to read it

MeasureAnswersSensitive to outliers?
MeanThe balance point — the average valueYes — one extreme value moves it
MedianThe middle — the typical valueNo — robust to extremes
ModeThe most common valueNo — works on categories too

The crucial difference is robustness. The mean is sensitive: a single very large value pulls it toward the tail. The median doesn't care how far away an extreme value is, only that it's on one side — so it stays anchored to the bulk of the data. That's why incomes, house prices, and response times are reported as medians: their long right tails would make the mean misleading.

Comparing the two is itself a quick read on shape. On right-skewed data (a long tail of large values) the mean > median. On left-skewed data the mean < median. When mean and median sit on top of each other, the distribution is roughly symmetric.

A worked example. Five employees earn 40, 45, 50, 55, and 210 thousand. The mean salary is (40+45+50+55+210)/5 = 80. But four of the five people earn less than that — the single 210 has dragged the average up above almost everyone. The median is the middle value, 50, which describes the typical employee far better. Mean > median (80 > 50) is the signature of right skew. If you reported only the mean, you'd overstate what a typical person earns by 60%.

Which one to use

  • Symmetric, outlier-free data → the mean is the natural summary, and it feeds directly into the standard deviation, t-tests, and regression.
  • Skewed data or outliers → lead with the median; it's the honest center.
  • Categorical data → only the mode applies. "Most common category" is the only center a non-numeric column has.
  • Best practice → report the mean and the median together. The gap between them is free information about the shape.
How Stratum computes it. Stratum's Summary report gives the mean and median for every numeric column, side by side, so the mean-versus-median gap is immediately visible. For categorical columns it reports the describe-family of Mode, Mode Count, and Mode % instead, since averaging text is meaningless. The median uses the same quantile definition as every quartile and percentile in the app — see the conventions page for the exact rule.

The mean tells you the balance point, the median tells you the typical value, and the mode tells you the most common one. On well-behaved data they agree and any of them will do. The moment they part ways, that disagreement is the finding — your data are skewed, and which "average" you quote starts to matter.