Median
In cases where we suspect outliers to be present in our data, we may want to use the median as our measure of central tendency. Unlike the mean, the median is robust to outliers. Think of income in the US; the top 1% is much higher than the rest of the population, so this will skew the mean to be higher and distort the perception of the average person's income.
The median represents the 50th percentile of our data; this means that 50% of the values are greater than the median and 50% are less than the median. It is calculated by taking the middle value from an ordered list of values; in cases where we have an even number of values, we take the average of the middle two values. If we take the numbers [0, 1, 1, 2, 9] again, our median ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access