All concepts

Mean, Median & Mode

Summarize a dataset's center with one number: mean, median, or mode.

Maths · Beginner · ~4 min

In plain English

The five numbers you'd give someone who has three seconds to understand a column: the middle, the spread, and the extremes.

Why it's worth your time

Every real modelling bug shows up here first — in a mean that doesn't match the median, or a max that shouldn't exist.

If you remember three things

  • Mean follows outliers; median doesn't
  • Mean far from median means the distribution is skewed
  • Always look at the distribution, never just the summary

Overview

Descriptive statistics reduce a column of numbers to a single measure of center. The mean is the arithmetic average, the median is the middle of the sorted values, and the mode is the most frequent value. Which one you should trust depends on the shape of the data and whether outliers are present.

In an interview

Mean, median, and mode all answer 'where's the center?' The mean averages every value and gets pulled toward outliers; the median is the middle value and shrugs them off; the mode is the most common value and is the only one that works for categories. On skewed data, prefer the median.

Production defaults

First move
describe() on every column before any modelling. It costs one line and catches most data bugs
Skewed data
report the median and IQR, not the mean and standard deviation
Plot it
a histogram tells you things no summary statistic will

What breaks

  • The mean looks wrong — Sentinel values. -999, 0 and 1970-01-01 masquerading as data will pull any average.
  • Summary looks fine, model doesn't — Summaries hide multimodality. Two populations in one column average to a number describing neither.

Watch it explained

Finding mean, median, and mode | Descriptive statistics | Probability and Statistics | Khan Academy — Khan Academy, 3:55

Related