Interactive statistics

56 free interactive lessons: from mean and median to A/B tests and Bayes. Drag the charts and build intuition. No sign-up.

Module 1: Descriptive statistics

Mean, median and mode

Imagine you run a pizzeria, "Mama John's", with seven employees — cooks, a cashier, couriers. Time to post a job opening, and you want to state the "typical salary". Only "typical" can mean different things, and the measure you pick changes both the wording of the posting and the candidate's expectations. Let's work through a live example: drag the points right on the chart and try the buttons beneath it.

medianmodemean30333535373942
Mean: 35.9 k Median: 35 k Mode: 35 k

On the line: the salaries of seven employees, in thousands of dollars. They sit close together. Above them, three markers: the mean, the median and the mode. Drag any point (with a finger or a mouse) — and notice that all three markers move together with the data.

What it means

The average company salary is almost always higher than what most people earn: the top inflates it. One director's paycheck is enough for the mean to drift up, even though nothing changed for the rest of the staff.

That is why the "typical" income is more honestly shown by the median: it stands in the middle of the row, and lone rich outliers cannot move it. And the gap between the mean and the median is itself a handy signal: the larger it is, the more skewed the data.

Where it shows up

At the scale of a whole country this is critical: when household incomes or housing prices are discussed, statistical agencies publish the median next to the mean — otherwise a few billionaires or a couple of luxury mansions would drag the mean so far up it would stop describing an ordinary family's life. So in salary news look for the word "median".

And the rule is wider than salaries: service response times, call durations, order sizes — wherever rare large values drag the mean along, the median is more honest. We'll meet this skew again when we get to distribution shapes.

Definitions
Meanxˉ=xiN\bar{x} = \dfrac{\sum x_i}{N}
The sum of all values divided by their count. It uses the size of every number, so one large value noticeably pulls the mean toward itself.
In plain words: split the total evenly among everyone — every value contributes.
Median
The value exactly in the middle of the row sorted in ascending order (with an even count, the average of the two central ones). It relies only on the order of values, not their size, so it is robust to outliers.
In plain words: the value from the middle of the row — rare extreme points don't move it.
Mode
The value that occurs more often than the rest. There can be one mode, several, or none — if all values are distinct.
In plain words: the most frequent value in the set.
Next →
Enjoying the materials?

This site is built by the DataSlice Telegram channel: data analytics in plain words — real cases, metrics, careers. The channel is in Russian.

Open the Telegram channel