Chapter 10 · Statistics: samples and populations

Missing Values and Outliers

Use a known mean, median, mode or range to find a missing data value. Then identify outliers and describe how they change the measures of center.

20 min read

Suppose you know the mean of your five quiz scores but can remember only four of the scores. You can still find the fifth one. In this lesson you use the mean, median, mode and range in two new ways.

First, you work backward: one value is missing, a measure is given, and you find the value. Second, you study an outlier, a value that is much greater or much less than the rest of the data, and see what it does to the measures of center: the mean, the median and the mode. Each of these is one number that stands for a typical value of the data.

A quick reminder:

  • Mean: the sum of the values divided by the number of values.
  • Median: the middle value when the values are in order, or the mean of the two middle values when the count is even.
  • Mode: the value that appears most often. A data set can have more than one mode.
  • Range: the greatest value minus the least value. It measures spread, not center.

Key concept

A measure is a rule you can use in both directions

Each measure is made from the data by a fixed rule. If one value is missing, call it xx, write the rule with xx in the data set, and find the value or values of xx that fit. If one value is far from the rest, use each rule with that value and without it, then compare the results.

For the mean, the rule is sum divided by number of values: the total is shared equally among the values. So the mean times the number of values gives the sum back, as the equation shows. The number of values counts the missing value too.

sum of all values=mean×number of values\text{sum of all values} = \text{mean} \times \text{number of values}

Worked example

Find a missing value from the mean

A student has taken 55 quizzes, each out of 2020 points. The mean score is 1212 points. Four of the scores are 1414, 99, 1111 and 1010 points. What is the fifth score?

  1. Name the unknown: let x be the fifth score, in points. The mean is the sum of all 5 scores divided by 5, so write that rule as an equation.

    14+9+11+10+x5=12\frac{14 + 9 + 11 + 10 + x}{5} = 12
  2. Add the four known scores to make the equation shorter. Work left to right: 14 + 9 = 23, then 23 + 11 = 34, then 34 + 10 = 44.

    44+x5=12\frac{44 + x}{5} = 12
  3. Multiply both sides by 5. Multiplying both sides of an equation by the same nonzero number keeps them equal, and here it undoes the division by 5. The left side is now the total of all 5 scores.

    44+x=12×5=6044 + x = 12 \times 5 = 60
  4. Subtract 44 from both sides. Subtracting the same number from both sides keeps them equal, and it leaves x by itself.

    x=60−44=16x = 60 - 44 = 16
  5. Test the answer in the rule for the mean. Also make sure it is a possible score: 16 is between 0 and 20.

    14+9+11+10+165=605=12\frac{14 + 9 + 11 + 10 + 16}{5} = \frac{60}{5} = 12

Answer

The fifth quiz score is 1616 points.

The mean works backward neatly because it comes from a sum. The median, range and mode do not, so go back to what each one depends on.

  • Median: it depends on the order of the values. Put the values in order with xx in its place, then write what the middle is.
  • Range: it depends only on the two end values. If the given range is greater than the range of the known values, xx must be a new greatest value or a new least value. That leaves two candidates, so you need one more clue to choose.
  • Mode: it depends on how often each value appears. Take 5,8,2,8,5,x5, 8, 2, 8, 5, x with exactly one mode, 55. In the known values, 55 and 88 each appear twice, which is a tie. If x=5x = 5, then 55 appears three times and is the only mode. If x=8x = 8, the mode is 88. Any other xx leaves at least two values tied for most often. So x=5x = 5.

The table gives one short example for each measure.

Working backward from each measure
Given measureWhat to doShort example
Mean
Find the total: mean ×\times number of values, counting xx. Subtract the sum of the known values.
5,9,x5, 9, x with mean 88: total 8×3=248 \times 3 = 24, known sum 5+9=145 + 9 = 14, so x=24−14=10x = 24 - 14 = 10.
Median
Order the values with xx in its place. Use the middle value, or the mean of the two middle values for an even count.
In order: 2,6,x,142, 6, x, 14 with median 99: 6+x2=9\frac{6 + x}{2} = 9, so 6+x=186 + x = 18 and x=12x = 12.
Mode
If the given mode is the only mode but is tied for most often among the known values, xx must equal it.
3,7,7,3,9,x3, 7, 7, 3, 9, x with only mode 77: x=7x = 7 makes three 77s and two 33s.
Range
When xx is the greatest or the least value, write greatest −- least == range with xx in it.
4,9,6,x4, 9, 6, x with range 77, xx the greatest: least is 44, so x−4=7x - 4 = 7 and x=11x = 11.

Worked example

Use two clues: range and median

Five numbers are 1212, 77, 1515, 99 and xx. Their range is 1010 and their median is 1212. Find xx.

  1. Start with the range, which is the greatest value minus the least value. The known values run from 7 up to 15, so their range is 8. If x were anywhere from 7 to 15, the range would stay 8. The given range is 10, so x must be greater than 15 or less than 7.

    15−7=88<1015 - 7 = 8 \qquad 8 \lt 10
  2. Case 1: x is the greatest value. The least value is still 7, so write the range rule with x in it. Then add 7 to both sides; adding the same number to both sides keeps them equal. The result fits this case because 17 is greater than 15.

    x−7=10⇒x=10+7=17x - 7 = 10 \quad\Rightarrow\quad x = 10 + 7 = 17
  3. Case 2: x is the least value. The greatest value is still 15. Add x to both sides, then subtract 10 from both sides; each move does the same thing to both sides, so they stay equal. The result fits this case because 5 is less than 7.

    15−x=10⇒15=10+x⇒x=15−10=515 - x = 10 \quad\Rightarrow\quad 15 = 10 + x \quad\Rightarrow\quad x = 15 - 10 = 5
  4. Use the median to choose between 17 and 5. Test x = 17 by putting all five values in order. With 5 values, the median is the 3rd value. It is 12, which matches the given median.

    7, 9, 12, 15, 17median=127,\ 9,\ 12,\ 15,\ 17 \qquad \text{median} = 12
  5. Test x = 5 the same way. The 3rd value is 9, which does not match the given median of 12, so 5 is ruled out.

    5, 7, 9, 12, 15median=9≠125,\ 7,\ 9,\ 12,\ 15 \qquad \text{median} = 9 \ne 12

Answer

The missing number is 1717. The data set 7,9,12,15,177, 9, 12, 15, 17 has range 17−7=1017 - 7 = 10 and median 1212, so both clues fit.

Now turn to unusual values. An outlier is a data value that is much greater or much less than the other values in its data set. The word much is vague, so this lesson uses one common check built from the quartiles, which you already know how to find:

  • Order the data. Split it at the median into a lower half and an upper half. When the count is odd, the median is in neither half.
  • Q1Q_1, the first quartile, is the median of the lower half. Q3Q_3, the third quartile, is the median of the upper half.
  • The interquartile range is IQR=Q3−Q1\text{IQR} = Q_3 - Q_1. It is the spread of the middle half of the data.

The check uses two boundary values called fences. The lower fence is 1.5×IQR1.5 \times \text{IQR} below Q1Q_1, and the upper fence is 1.5×IQR1.5 \times \text{IQR} above Q3Q_3, as the next two equations show. Under this fence check, a value is an outlier when it is less than the lower fence or greater than the upper fence. A value on a fence or between the fences is not an outlier.

lower fence=Q1−1.5×IQR\text{lower fence} = Q_1 - 1.5 \times \text{IQR}
upper fence=Q3+1.5×IQR\text{upper fence} = Q_3 + 1.5 \times \text{IQR}

Worked example

Identify an outlier and describe its effect

Seven students timed their trips to school, in minutes: 15,37,13,19,15,18,1615, 37, 13, 19, 15, 18, 16. Use the fence check to decide whether any time is an outlier. Then find the mean and the median with and without that time, and describe its effect.

  1. Order the times from least to greatest and find the median. With 7 values, the median is the 4th value, because 3 values lie on each side of it.

    13, 15, 15, 16, 18, 19, 37median=1613,\ 15,\ 15,\ 16,\ 18,\ 19,\ 37 \qquad \text{median} = 16
  2. Split the data at the median. The count is odd, so the median, 16, is in neither half. The lower half is 13, 15, 15 and the upper half is 18, 19, 37. Q1 is the median of the lower half and Q3 is the median of the upper half. Each half has 3 values, so each median is the 2nd value of its half.

    Q1=15Q3=19Q_1 = 15 \qquad Q_3 = 19
  3. Find the IQR by subtracting Q1 from Q3: 19 - 15 = 4 minutes. Then use the two fence equations. Multiply before you subtract or add: 1.5 times 4 is 6. The lower fence is 9 minutes and the upper fence is 25 minutes.

    15−1.5×4=15−6=919+1.5×4=19+6=2515 - 1.5 \times 4 = 15 - 6 = 9 \qquad 19 + 1.5 \times 4 = 19 + 6 = 25
  4. Compare the times with the fences. The least time, 13, is greater than the lower fence, 9, so no time is an outlier at the low end. The times from 13 to 19 all lie between the fences. Only 37 is greater than the upper fence, 25, so 37 minutes is an outlier.

    13>937>2513 \gt 9 \qquad 37 \gt 25
  5. Find the mean with and without 37. The six other times add to 13 + 15 + 15 + 16 + 18 + 19 = 96, and 96 + 37 = 133. Divide each sum by the number of values in it: 7 with the outlier and 6 without it.

    1337=19966=16\frac{133}{7} = 19 \qquad \frac{96}{6} = 16
  6. Find the median with and without 37. With it, the median is 16, from the first step. Without it, six values are left: 13, 15, 15, 16, 18, 19. The count is even, so the median is the mean of the 3rd and 4th values.

    15+162=312=15.5\frac{15 + 16}{2} = \frac{31}{2} = 15.5

Answer

The time 3737 minutes is an outlier. Including it raises the mean from 1616 to 1919 minutes, a change of 33 minutes. It raises the median only from 15.515.5 to 1616 minutes, a change of 0.50.5 minute.

Trip times in minutes: how the longest time changes each measure
Data usedMeanMedianMode
The six times without 3737
96÷6=1696 \div 6 = 16
15.515.5
1515
All seven times, with 3737
133÷7=19133 \div 7 = 19
1616
1515
Seven times, if 3737 were 5858 instead
154÷7=22154 \div 7 = 22
1616
1515

Read down the table. The mean climbs as the longest time grows: 1616, then 1919, then 2222. In the last row the total is 96+58=15496 + 58 = 154. The median moves from 15.515.5 to 1616 and then stays there. The mode stays at 1515.

Here is why each measure of center acts this way:

  • The mean uses the size of every value, so an extreme value shifts the total, and all the values share that shift. Including a value greater than every other value always raises the mean. Including a value less than every other value always lowers it.
  • The median uses only the order of the values. As long as the outlier is not a middle value, making it more extreme does not change the median. Taking it away shifts the middle by half a position, which is why the median went from 1616 to 15.515.5.
  • The mode uses only how often each value appears. Here 3737 appears once and 1515 appears twice, so the mode is 1515 with or without the outlier.

With the outlier, the mean of 1919 minutes is as long as or longer than six of the seven trips, so here it no longer describes a typical trip well. The median of 1616 minutes is still the middle trip.

Takeaway. A measure follows a rule, and you can use that rule in both directions.

  • Missing value: write the rule with xx in the data set, find the value that fits, and test it. For the mean, the total counts xx too.
  • Outlier: find the fences from Q1Q_1, Q3Q_3 and the IQR, using the lower and upper halves of the ordered data (the median is in neither half when the count is odd). Then find each measure of center with and without the outlier.

The mean uses the size of every value, so an outlier greater than every other value raises it, and one less than every other value lowers it. The median uses only order, so an outlier that is not a middle value can become more extreme without changing the median.