Median and mode
The median is the middle value of the sorted data (robust to outliers); the mode is the most frequent value (the only centre for nominal data).
- The -th smallest value (sorted order).
- Number of values.
When to use
- Median: skewed quantitative data or data with outliers (incomes, house prices, delays); ordinal data.
- Mode: categorical data ("most common payment method"), or to describe peaks of a distribution (unimodal, bimodal).
How to interpret
Half the values are at or below the median and half at or above it. Mean > median suggests right skew; mean < median suggests left skew (a rule of thumb, not a guarantee). The engine reports all tied modes, and no mode when every value occurs once.
Common mistakes
- Taking the middle of the unsorted list.
- For even , picking one of the two middle values instead of averaging them.
- Reporting a mode for continuous measurements where every value is distinct — use a histogram peak instead.
Example
Values 3, 8, 5, 12, 5, 9. Sorted: 3, 5, 5, 8, 9, 12. With the median is ; the mode is 5 (it appears twice).