Three ways to say "typical", and they can disagree.
Direct answer
The mean is the sum divided by the count. The median is the middle value when sorted. The mode is the most frequent value. Use the median when data has outliers, because the mean gets pulled toward extreme values.
Example
Values: 2, 3, 3, 4, 100
- Mean = 112 ÷ 5 = 22.4
- Median = 3
- Mode = 3
The 100 pulls the mean up. The median stays near the typical value.
In Python
import statistics as st
data = [2, 3, 3, 4, 100]
print(st.mean(data), st.median(data), st.mode(data))
Which to use
| Situation | Use |
|---|---|
| Symmetric data | mean |
| Skewed or outliers | median |
| Categories | mode |
Where Teyro fits
Teyro's Data Science for Beginners course turns this into short lessons you can play in a few minutes a day. It has 50 lessons, and you can start free.
The bottom line
Always look at the data's shape before choosing an average.


