In more detail
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 (40 / 8), the median is 4.5 (the average of the two middle values, 4 and 5) and the mode is 4. With an odd count the median is simply the middle value; with an even count it is the mean of the two middle ones. A data set can have several modes, or none when every value occurs once. Outliers pull the mean but not the median, so incomes and house prices are quoted as medians.
Why it matters
"Average" on its own usually means the mean, but a report can quote whichever of the three flatters its case. In skewed data the mean and median can be far apart, and one extreme value moves the mean a lot. The mode is the only one of the three that works for categories, such as the most common shoe size sold or the most frequent survey answer.
Example
Ten salaries: 28,000, 31,000, 34,000, 36,000, 39,000, 42,000, 45,000, 48,000, 52,000 and 400,000.
- Mean: 755,000 / 10 = 75,500
- Median: (39,000 + 42,000) / 2 = 40,500
Nine of the ten people earn less than the mean. Removing the 400,000 salary drops the mean to 39,444 but moves the median only to 39,000.
Common confusion
The plain mean counts every value equally. When values stand for groups of different sizes (class averages, prices paid for different quantities), you need a Weighted average instead.