Chapter 14 · Statistics and data analysis

Outliers and Their Effect on Mean and Median

Spot a value that sits far from the rest of a data set, then compare the mean and median with and without it to describe its effect.

12 min read

Seven students timed their trip to school. Here are the times in minutes, from least to greatest:

12,14,15,15,16,18,5012, 14, 15, 15, 16, 18, 50

Six of the times sit close together, from 12 to 18 minutes. One time, 50 minutes, sits far away from all the others.

A list of numbers that all measure the same thing is a data set. A value that is far from the rest of the values in a data set is an outlier.

In this lesson you can see every value in the list, and you identify an outlier by looking: it is a value that clearly stands apart while the others stay close together. Then you work out exactly what that outlier does to the numbers that summarize the data set.

To describe what an outlier does, you need two measures of center. A measure of center is one number that stands for a typical value of a data set.

  • The mean is the fair-share value: the amount each value would be if you shared the total out equally. To find it, add all the values, then divide the sum by the number of values. This works for any data set with at least one value, so you never divide by zero.
  • The median is the middle value when the values are in order from least to greatest. If the number of values is odd, one value sits in the middle, with the same number of values before it and after it. If the number of values is even, two values sit in the middle, and the median is the mean of those two values.
mean=sum of all the valuesnumber of values\text{mean} = \dfrac{\text{sum of all the values}}{\text{number of values}}

Key concept

An outlier and its effect

An outlier is a value that is far from the rest of the values in a data set. When you can see every value in the list, you identify an outlier by looking: it clearly stands apart while the other values stay close together.

To describe an outlier's effect, calculate the mean and the median twice: once with every value, and once with the outlier removed. The effect on each measure is the difference between the two results.

State what actually changed, in which direction, and by how much. Those amounts depend on the data set, so find them by calculating, not by guessing.

Worked example

A high outlier in travel times

Seven students timed their trip to school, in minutes: 12,14,15,15,16,18,5012, 14, 15, 15, 16, 18, 50. Identify the outlier. Then find the mean and the median with the outlier and without it, and describe the outlier's effect.

  1. The values are already in order from least to greatest, so look at the gaps. The six values from 12 to 18 are all within 6 minutes of each other. The value 50 is 32 minutes above the nearest other value, 18. It clearly stands apart from the rest, so 50 is the outlier.

    18−12=650−18=3218 - 12 = 6 \qquad 50 - 18 = 32
  2. Find the mean of all 7 values. Add the values to get the total number of minutes, then divide by 7, because the mean shares the total equally among 7 values. The mean is 20 minutes.

    12+14+15+15+16+18+507=1407=20\dfrac{12 + 14 + 15 + 15 + 16 + 18 + 50}{7} = \dfrac{140}{7} = 20
  3. Find the median of all 7 values. Because 7 is odd, one value sits in the middle: the 4th value, shown in bold, with 3 values before it and 3 values after it. The median is 15 minutes.

    12,14,15,15,16,18,5012, 14, 15, \mathbf{15}, 16, 18, 50
  4. Remove the outlier and find the mean again. The total drops by 50 minutes, and only 6 values remain, so divide by 6 this time, not 7. The mean without the outlier is 15 minutes.

    140−506=906=15\dfrac{140 - 50}{6} = \dfrac{90}{6} = 15
  5. Find the median of the 6 remaining values. Because 6 is even, two values sit in the middle: the 3rd and 4th values, shown in bold, with 2 values before them and 2 values after them. The median is the mean of those two values, which is 15 minutes.

    12,14,15,15,16,1815+152=302=1512, 14, \mathbf{15}, \mathbf{15}, 16, 18 \qquad \dfrac{15 + 15}{2} = \dfrac{30}{2} = 15
  6. Compare each measure with the outlier and without it. The mean is 20 with the outlier and 15 without it, so the outlier makes the mean 5 minutes greater. The median is 15 both times, so the outlier does not change the median of this data set.

    20−15=515−15=020 - 15 = 5 \qquad 15 - 15 = 0

Answer

The outlier is 5050 minutes. With it, the mean is 2020 minutes and the median is 1515 minutes. Without it, the mean is 1515 minutes and the median is still 1515 minutes. So this outlier raises the mean by 55 minutes and leaves the median unchanged.

Why did the mean move while the median stayed the same in the travel times?

The mean uses the size of every value. The outlier adds 50 minutes to the total, far more than any other value adds, and the mean shares that total equally among all 7 values. That lifts the fair share from 15 minutes to 20 minutes, even though six of the seven students took less than 20 minutes.

The median depends only on the value or values in the middle of the ordered list. Removing 50 changed the number of values from 7 to 6, so the middle moved from the 4th value to halfway between the 3rd and 4th values. Those two values are both 15, so the median stayed at 15.

If those two values had been different, the median would have changed as well. The next example shows a median that does change.

Worked example

A low outlier in library visits

A school library counted its visitors on each of 8 days: 86,74,95,29,82,80,90,8886, 74, 95, 29, 82, 80, 90, 88. Identify the outlier. Then find the mean and the median with the outlier and without it, and describe the outlier's effect.

  1. Put the values in order from least to greatest so you can see the gaps and find the middle. The seven values from 74 to 95 are within 21 visitors of each other, since 95 minus 74 is 21. The value 29 is 45 visitors below the nearest other value, since 74 minus 29 is 45. It clearly stands apart, so 29 is the outlier.

    29,74,80,82,86,88,90,9529, 74, 80, 82, 86, 88, 90, 95
  2. Find the mean of all 8 values. Add them to get the total number of visitors, then divide by 8, the number of values. The mean is 78 visitors.

    29+74+80+82+86+88+90+958=6248=78\dfrac{29 + 74 + 80 + 82 + 86 + 88 + 90 + 95}{8} = \dfrac{624}{8} = 78
  3. Find the median of all 8 values. Because 8 is even, two values sit in the middle of the ordered list: the 4th and 5th values, 82 and 86. The median is the mean of those two values, which is 84 visitors.

    82+862=1682=84\dfrac{82 + 86}{2} = \dfrac{168}{2} = 84
  4. Remove the outlier and find the mean again. The total drops by 29 visitors, and 7 values remain, so divide by 7. The mean without the outlier is 85 visitors.

    624−297=5957=85\dfrac{624 - 29}{7} = \dfrac{595}{7} = 85
  5. Find the median of the 7 remaining values. Because 7 is odd, one value sits in the middle: the 4th value, shown in bold. The median is 86 visitors.

    74,80,82,86,88,90,9574, 80, 82, \mathbf{86}, 88, 90, 95
  6. Compare each measure with the outlier and without it. The mean is 78 with the outlier and 85 without it, so the outlier makes the mean 7 visitors less. The median is 84 with the outlier and 86 without it, so the outlier makes the median 2 visitors less.

    85−78=786−84=285 - 78 = 7 \qquad 86 - 84 = 2

Answer

The outlier is 2929 visitors. With it, the mean is 7878 visitors and the median is 8484 visitors. Without it, the mean is 8585 visitors and the median is 8686 visitors. So this outlier lowers the mean by 77 visitors and lowers the median by 22 visitors.

Each measure with the outlier and without it
Data setMeasureWith the outlierWithout the outlierEffect of the outlier
Travel times, outlier 5050 minutes
Mean
2020 minutes
1515 minutes
Raises it by 55 minutes
Travel times, outlier 5050 minutes
Median
1515 minutes
1515 minutes
No change
Library visits, outlier 2929 visitors
Mean
7878 visitors
8585 visitors
Lowers it by 77 visitors
Library visits, outlier 2929 visitors
Median
8484 visitors
8686 visitors
Lowers it by 22 visitors

Look at the direction of each change in the mean. The outlier 50 is greater than every other travel time, and the mean with it (20 minutes) is greater than the mean without it (15 minutes). The outlier 29 is less than every other visitor count, and the mean with it (78 visitors) is less than the mean without it (85 visitors).

That direction is no accident. The mean of a group of values is never greater than the greatest value in the group, so a value above all the others is above their mean. Sharing it out with them raises the fair share. In the same way, a value below all the others lowers the mean.

The median behaved differently in the two data sets: no change in one, and a change of 2 visitors in the other. In both data sets the mean changed by more than the median did. That is what happened in these two lists. It is not a rule for every list. To know an outlier's effect on a data set, calculate both measures with the outlier and without it.

Takeaway. In a data set with every value listed, an outlier is a value that clearly sits far from the rest. To describe its effect, calculate the mean and the median with the outlier and without it, then compare. An outlier above all the other values makes the mean greater than it is without the outlier, and an outlier below all the others makes the mean less. The median may stay the same or change, so recalculate it and report exactly what happened.