Mean and Median

Category: Statistics   Level: 301

median = middle value; mean = balance point = (∑ x)/n

The median is the middle value once the data is sorted. The mean is the point where a dot plot balances, so a far-out value pulls the mean toward it and leaves the median alone.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Sort the data and plot it

Seven values, sorted from small to large, sit above the number line. Each dot is one value, and repeats stack up.

data: 2, 3, 3, 4, 5, 6, 12

Step 1: Sort the data and plot it

Step 2: Find the median in the middle

Count in from both ends. Three values sit below the middle one and three sit above it, so the median is 4.

median = 4

Step 2: Find the median in the middle

Step 3: Balance the beam at the mean

Add the values and divide by 7. A fulcrum at 5 holds the beam level, as if every dot weighed the same.

mean = 35/7 = 5

Step 3: Balance the beam at the mean

Step 4: Check that the pulls cancel

Measure how far each dot sits from the mean. The total distance on the left equals the total on the right, which is why the beam balances.

3 + 2 + 2 + 1 = 8 = 1 + 7

Step 4: Check that the pulls cancel

Step 5: See the outlier pull the mean

The lone 12 sits far out, so it pulls the mean right of the median. Move it to 100 and the mean jumps; the median does not even blink.

mean = 5 > median = 4

Step 5: See the outlier pull the mean

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render mean-median-balance --out /tmp/mean-median-balance

Source: svgmath/diagrams/statistics.py