Sub topic 11
Outliers and Skew: Mean Versus Median
This chapter assumes you can already compute a mean and a median by hand and know what range means. If the median of an even-sized list still feels shaky, review the median chapter first. Here you will learn how one extreme value moves each statistic, how to read skew from the gap between mean and median, and how GRE questions use both ideas.
What an outlier is
An outlier is a value far from the rest of the data set. The GRE rarely defines it formally. It usually appears as one number that is much larger or smaller than its neighbors, such as a single 52 in a list of values between 3 and 6.
You do not need a cutoff rule for most GRE problems. You need to know which statistics react to an extreme value and which ignore it.
Why the mean reacts and the median does not
The mean uses every value's size, because it is the sum divided by the count. If one value grows by some amount, the sum grows by that same amount, and the mean grows by that amount divided by n.
The median uses only the position of values in sorted order. It looks at the middle one or two entries. Pushing the largest value from 52 to 5,000 changes nothing about which entries sit in the middle.
Consider the lists below.
- List 1: 3, 4, 5, 6, 7. Mean = 25 / 5 = 5. Median = 5.
- List 2: 3, 4, 5, 6, 52. Mean = 70 / 5 = 14. Median = 5.
Only the last value changed, by +45. The sum rose by 45, so the mean rose by 45 / 5 = 9. The median stayed at 5.
import statistics
def summarize(label, data):
print(label, data)
print(" mean ", statistics.mean(data))
print(" median", statistics.median(data))
print(" range ", max(data) - min(data))
print(" pstdev", round(statistics.pstdev(data), 2))
summarize("Without outlier:", [3, 4, 5, 6, 7])
summarize("With outlier: ", [3, 4, 5, 6, 52])The output shows the pattern.
- The mean goes from 5 to 14.
- The median stays at 5.
- The range goes from 4 to 49.
- The population standard deviation goes from 1.41 to 19.03.
Sensitivity of each statistic
The table summarizes how each measure responds when you add one extreme value to a data set.
| Statistic | Reaction to one extreme value | Why |
|---|---|---|
| Mean | Moves toward the extreme value | Every value's size enters the sum |
| Median | Moves little, at most to a neighboring value | Only the middle position matters |
| Mode | Usually unchanged | It depends on frequency, not size |
| Range | Can change by a lot | It is defined by the two extreme values |
| Standard deviation | Usually increases a lot | A large deviation becomes much larger once squared |
A statistic that barely reacts to extremes is called resistant. The median and mode are resistant. The mean, range, and standard deviation are not.
The median can still move. Suppose the extreme value is added to a list of n values. The new list has n + 1 entries, and the median shifts by at most one position in the sorted list. For the list 3, 4, 5, 6, adding 52 gives 3, 4, 5, 6, 52. The median changes from 4.5 to 5. That is small compared with the mean, which changes from 4.5 to 14.
Adding an outlier versus changing a value
GRE problems use two different operations, and the effects differ.
- Adding an extreme value. The count rises by one. The mean moves toward the new value, and the median shifts by about half a position.
- Changing an existing value. The count stays the same. If one value changes by d, the sum changes by d and the mean changes by d / n. The median changes only if the edited value crosses the middle of the sorted list.
For example, start with 3, 4, 5, 6, 52 and change 52 to 5.5. The sorted list is 3, 4, 5, 5.5, 6. The median is still 5, but the mean falls from 14 to 23.5 / 5 = 4.7.
Now change 3 to 100 instead. The sorted list becomes 4, 5, 6, 52, 100, and the median rises to 6. The edited value crossed the middle, so the median had to change.
Skew: what the gap between mean and median tells you
Skew describes a lopsided distribution. The side with the long tail names the skew.
- Right skew (positive skew). A long tail of large values. The mean is pulled above the median.
- Left skew (negative skew). A long tail of small values. The mean is pulled below the median.
- Symmetric. The two sides mirror each other. The mean and median are equal.
The mean is pulled toward the tail because the tail contains the extreme values, and extremes affect the mean more than the median. The list 3, 4, 5, 6, 52 is right skewed, with mean 14 and median 5. A left skewed example is 1, 8, 9, 9, 10. The mean is 37 / 5 = 7.4 and the median is 9, so the mean is below the median.
import statistics
right = [3, 4, 5, 6, 52]
left = [1, 8, 9, 9, 10]
for name, data in [("right", right), ("left", left)]:
mean = statistics.mean(data)
median = statistics.median(data)
if mean > median:
verdict = "mean above median: right skew"
elif mean < median:
verdict = "mean below median: left skew"
else:
verdict = "mean equals median: no skew signal"
print(name, mean, median, verdict)Be careful with the direction of the logic.
- A symmetric data set always has mean equal to median.
- Mean equal to median does not prove the data set is symmetric. The list 1, 2, 3, 10, 11 hmm has mean 5.4 and median 3, so choose a different check: the list 1, 2, 6, 9, 12 has mean 6 and median 6, yet it is not a mirror image around 6. On the GRE, treat "equal" as consistent with symmetry, not as proof of it.
Decision guide: which measure to report
The diagram shows how to choose between mean and median when a question asks which measure better describes a typical value.
Incomes and house prices are classic right skewed data. A few very large values pull the mean above what most people earn or pay, so the median is the better summary.
Effect on spread
Outliers also distort the measures of spread.
- Range. The range depends only on the largest and smallest values. One outlier can make it enormous.
- Standard deviation. Each deviation is squared before averaging, so a value far from the mean contributes a very large term. In the example above, the deviation of 52 from the mean 14 is 38, and its squared contribution of 1,444 makes up most of the total of 1,810.
When two data sets differ by one extreme value, the one with the outlier has the larger range and the larger standard deviation. Removing an outlier makes the data tighter, so range and standard deviation both fall. The mean moves toward the remaining values. In the list 3, 4, 5, 6, 52, removing 52 moves the mean from 14 to 4.5 and the median from 5 to 4.5.
Common GRE patterns
Quantitative comparison questions often ask you to compare a mean and a median without computing everything.
Take the data set 10, 12, 13, 15, 50.
- Quantity A: the mean of the data set.
- Quantity B: the median of the data set.
The sum is 100, so the mean is 20. The median is 13. Quantity A is greater. You could also see this without arithmetic: one large value sits far above the rest, so the data is right skewed and the mean exceeds the median.
Other recurring patterns:
- "Which statistic is unchanged?" If the largest value increases and the list's order is not disturbed, the median and mode stay the same, while the mean and range change.
- "Which statistic must increase?" Increasing the largest value always increases the mean and the range. It does not have to change the median.
- Table or description of skew. A graph with a long right tail means mean above median.
- Replacing an outlier. Replacing an extreme value with one close to the mean shrinks the range and standard deviation.
Quick checks before you answer
- Sort the list first, so you can see whether an extreme value sits at an end.
- For a changed value, compute the change in the mean as the change in the value divided by n.
- For an added value, remember that the count also changes.
- Compare mean and median for the direction of skew, not for its size.
- Remember that the mode may not exist or may not be unique, and it ignores how large the outlier is.
Exercise
The list 2, 3, 3, 4, 38 has five values. (a) Find the mean and median. (b) Is the data right skewed or left skewed? (c) If 38 is replaced by 8, what are the new mean and median?
Show answer
(a) The sum is 2 + 3 + 3 + 4 + 38 = 50, so the mean is 10. The sorted middle value is 3, so the median is 3. (b) The mean is above the median, so the data is right skewed. (c) The list becomes 2, 3, 3, 4, 8. The sum is 20, so the mean is 4. The median is still 3. The mean fell by 30 / 5 = 6 and the median did not change.
Exercise
A data set has mean 40 and median 52. Without knowing the individual values, which kind of skew is most likely, and what kind of values probably explain the gap? Then say what happens to the range and standard deviation if the smallest value is removed.
Show answer
The mean is below the median, so the data is most likely left skewed. A few unusually small values form a long left tail and pull the mean down. Removing the smallest value, which is the one defining the lower end, decreases the range. The standard deviation also decreases, because the largest deviation from the mean has been removed.