NOETRION

Browse by topic

← All articles
LESSON 4 OF 4 · Python & data foundations
STATISTICS · 6 MIN READ

Mean or median? A five-number example with an outlier

See why one unusual value can shift the average and how to choose a useful summary.

Suppose five tasks took 10, 11, 12, 12, 55 minutes. What is a typical task time?

Calculate both summaries

The mean adds all values and divides by five: (10 + 11 + 12 + 12 + 55) / 5 = 20. The median is the middle sorted value: 12.

The mean is 20 minutes even though four of the five tasks took 12 minutes or less. The single 55-minute task pulls the mean upward. The median stays near the experience of most tasks.

from statistics import mean, median

minutes = [10, 11, 12, 12, 55]
print(mean(minutes))    # 20
print(median(minutes))  # 12

Which one should you report?

Use the median when you want a robust description of a typical observation in skewed data. Use the mean when the total amount matters: the five tasks consumed 100 minutes, and the mean describes that total spread across five tasks.

Neither number tells the whole story. For this small dataset, reporting median 12 minutes, range 10–55 minutes makes the unusually long task visible.

Practice

Change 55 to 15 and recompute both values. Which summary moves more? Then imagine that 55 was a valid, unusually difficult task. Would deleting it answer the same question? Keep the value unless you have a defensible reason to exclude it.

Check your understanding

For 10, 11, 12, 12, 55, which is the median?

Choose one answer