The eight cards on the left are eight people's test scores. The mean, the median and the histogram on the right are wired to all eight, so change one score and all three update.
Start with the scores as they are
The scores are 62, 65, 71, 78, 84, 85, 88 and 93. The mean is 78.25 and the median is 81.
With eight people there are two scores in the middle, 78 and 84. The median sits halfway between them, at 81.
Change the 62 to 0
Change Score 1 from 62 to 0. One person now sits far away from everyone else.
The mean drops from 78.25 to 70.5 — down 7.75. The median stays at 81.
In the histogram, one bar now stands on its own at the far left. That one outlying score weighs heavily on the mean and, this time, not at all on the median.
Why they differ
The mean adds everything up and divides by the number of people. Turning 62 into 0 takes 62 off the total. Shared across eight people, that takes 62 ÷ 8 = 7.75 off the mean.
The median puts the scores in order and looks at the middle. At 0, that score is still the lowest one. The two in the middle are still 78 and 84, so the median stays at 81.
So the median did not hold because the value was extreme. It held because the middle of the order did not change. Even a value at one end will move the median if it crosses over to the other side of the middle.
So which one is right?
Both. They describe different things.
The mean reflects every single score. It is the one to use when you care about the total, or the amount per person.
The median tells you where the middle of the group sits. It is less easily swayed by a few extreme values.
When the two are far apart, that is a hint that something at one end is far from the rest.
Try it yourself
Leave Score 1 at 0, and this time change a score in the middle: 78 (Score 4) to 70.
The mean drops by just 1, from 70.5 to 69.5. The median drops by 3.5, from 81 to 77.5.
This time the median moved more. The middle pair changed from 78 and 84 to 71 and 84.
Try another score near the middle, such as 84 (Score 5), and see whether the median moves. To get the original scores back, reload the page.