Median
The middle value of a sorted dataset â resistant to outliers in a way the mean is not.
Sorted:24579
Definition
The median is the middle value of a dataset when the values are sorted from smallest to largest.
- Odd number of values: the median is the value exactly in the middle.
- Even number of values: the median is the average of the two middle values.
Odd count
Dataset: 3, 7, 9, 12, 20 (already sorted)
Five values â the middle one is the 3rd: median = 9
Even count
Dataset: 4, 6, 10, 15
Four values â average the 2nd and 3rd:
Always sort first
The median is only meaningful after sorting. has median 9, not 3.
Try it
Find the median of: 5, 1, 8, 3, 6, 2.
Solution
Sorted: 1, 2, 3, 5, 6, 8. Two middle values: 3 and 5. Median .