Chapter 14 · Statistics and data analysis

Mean, Median, Mode, Range and Missing Values

Calculate the mean, median, mode and range of a data set, then use a known mean to work backwards and find a missing value.

15 min read

In this lesson, a data set is a list of numbers that all measure the same thing, such as the scores a class earned on one quiz. Each number in the list is a value. A long list of values is hard to take in at once, so you describe it with a summary statistic: a single number, calculated from the data, that tells you something about the whole list.

This lesson uses four summary statistics, and each one answers a different question about the data. You will calculate all four, then use one of them to find a value that is missing.

Four summary statistics
StatisticQuestion it answersHow to calculate it
Mean
If the total were shared equally, what would each value be?
Add all the values, then divide the sum by the number of values.
Median
What number is in the middle once the values are in order?
Order the values from least to greatest, then find the middle.
Mode
Which value appears most often?
Count how many times each value appears.
Range
How far apart are the least and greatest values?
Subtract the least value from the greatest value.

Start with the mean, which you can think of as an equal share. Take the values 22, 44 and 99. Their sum is 2+4+9=152 + 4 + 9 = 15. Share that 1515 equally among the 33 values, and each one gets 15÷3=515 \div 3 = 5. So the mean is 55. The data set 5,5,55, 5, 5 has the same sum as 2,4,92, 4, 9, with the differences leveled out.

To write this for any data set, let nn stand for the number of values. A data set has at least one value, so nn is a whole number with n≥1n \ge 1. That means you never divide by zero.

mean=sum of the valuesn\text{mean} = \dfrac{\text{sum of the values}}{n}

The other three statistics each have a detail to watch.

  • Median. Once the values are in order, the middle depends on nn. If nn is odd, exactly one value sits in the middle, and it is the median. If nn is even, two values share the middle, and the median is the number halfway between them, which is the mean of those two values.
  • Mode. When no value repeats, you say the data set has no mode. Otherwise the mode is the value that appears most often, and if two or more values tie for most often, each of them is a mode.
  • Range. The greatest value is never smaller than the least value, so the range is never negative. A range of 00 means all the values are equal.

Worked example

Four statistics, odd number of values

Find the mean, median, mode and range of the data set 12,4,13,7,412, 4, 13, 7, 4.

  1. Order the values from least to greatest. The median needs this order, and it also puts the least value first, the greatest value last and equal values side by side.

    4, 4, 7, 12, 134,\ 4,\ 7,\ 12,\ 13
  2. Find the mean. There are 5 values, so add all five and divide the sum by 5. Dividing shares the total of 40 equally among the 5 values.

    4+4+7+12+135=405=8\dfrac{4 + 4 + 7 + 12 + 13}{5} = \dfrac{40}{5} = 8
  3. Find the median. Because 5 is odd, exactly one value sits in the middle of the ordered list: the 3rd value, which has two values before it and two after it.

    4, 4, 7, 12, 13median=74,\ 4,\ \boxed{7},\ 12,\ 13 \qquad \text{median} = 7
  4. Find the mode. The value 4 appears twice and every other value appears once, so 4 appears most often.

    mode=4\text{mode} = 4
  5. Find the range. Subtract the least value, 4, from the greatest value, 13, to measure how far apart they are.

    13−4=913 - 4 = 9

Answer

The mean is 88, the median is 77, the mode is 44 and the range is 99.

Worked example

Four statistics, even number of values

Find the mean, median, mode and range of the data set 14,6,9,2,14,614, 6, 9, 2, 14, 6.

  1. Order the values from least to greatest, because the median depends on this order.

    2, 6, 6, 9, 14, 142,\ 6,\ 6,\ 9,\ 14,\ 14
  2. Find the mean. Share the total equally: add the 6 values and divide the sum by 6. The division ends after one decimal place, so 8.5 is an exact value, not a rounded one.

    2+6+6+9+14+146=516=8.5\dfrac{2 + 6 + 6 + 9 + 14 + 14}{6} = \dfrac{51}{6} = 8.5
  3. Find the median. Because 6 is even, no single value sits in the middle. The 3rd and 4th values, 6 and 9, share the middle, so take the number halfway between them, which is their mean. The result is not one of the data values, and a median does not have to be.

    6+92=152=7.5\dfrac{6 + 9}{2} = \dfrac{15}{2} = 7.5
  4. Find the mode. The values 6 and 14 each appear twice, while 2 and 9 each appear once. Two values tie for most often, so both are modes.

    modes: 6 and 14\text{modes: } 6 \text{ and } 14
  5. Find the range. The least value is 2 and the greatest value is 14, so subtract to see how far apart they are.

    14−2=1214 - 2 = 12

Answer

The mean is 8.58.5, the median is 7.57.5, the modes are 66 and 1414, and the range is 1212.

Now run the mean backwards. The mean is the equal share, so multiplying it by the number of values rebuilds the total. In the first example, the mean is 88 and n=5n = 5, and 8×5=408 \times 5 = 40, which is exactly the sum 12+4+13+7+412 + 4 + 13 + 7 + 4.

This lets a mean reveal a hidden value. Suppose you can see only four of those five values, 1212, 44, 77 and 44, and you are told that the mean of all five is 88. The five values must add to 8×5=408 \times 5 = 40. The four you can see add to 12+4+7+4=2712 + 4 + 7 + 4 = 27. So the hidden value is 40−27=1340 - 27 = 13, the value that was covered up.

Key concept

The mean ties the sum to the count

The mean is the sum of a data set shared equally among its nn values, where nn is a whole number and n≥1n \ge 1. In symbols, mean=sum÷n\text{mean} = \text{sum} \div n. Since nn is not zero, multiplying both sides by nn gives a second way to write the same relationship: the sum equals the mean times nn.

So one relationship works in both directions. When you know every value, divide the sum by nn to find the mean. When you know the mean and nn but exactly one value is missing, multiply the mean by nn to find the total, then subtract the values you know. What is left is the missing value. Remember that nn counts the missing value too.

sum of the values=mean×n\text{sum of the values} = \text{mean} \times n

Worked example

A missing value from a known mean

You have taken four of five quizzes. Each quiz is scored from 00 to 2020 points. Your scores so far are 1414, 1717, 1212 and 1818 points. What score do you need on the fifth quiz so that the mean of all five scores is exactly 1616 points?

  1. Name the unknown. Let x be the score on the fifth quiz, in points. A quiz score is at least 0 and at most 20, so x must be too. The data set has 5 values in all: the four known scores and x.

    n=5n = 5
  2. Find the total that the mean requires. Since the number of values, 5, is not zero, the sum equals the mean times the number of values.

    16×5=8016 \times 5 = 80
  3. Add the four scores you know, because they make up part of that total.

    14+17+12+18=6114 + 17 + 12 + 18 = 61
  4. Write an equation. The known scores and x together must make the required total of 80 points.

    61+x=8061 + x = 80
  5. Subtract 61 from both sides. Taking the same number away from both sides keeps them equal, and it leaves x alone on the left.

    61+x−61=80−61⇒x=1961 + x - 61 = 80 - 61 \quad \Rightarrow \quad x = 19
  6. Check the result. A score of 19 is at least 0 and at most 20, so it is a possible score. Put it back into the data set: the five scores add to 80, and 80 divided by 5 is 16, the mean you wanted.

    14+17+12+18+195=805=16\dfrac{14 + 17 + 12 + 18 + 19}{5} = \dfrac{80}{5} = 16

Answer

You need 1919 points on the fifth quiz for the mean of your five scores to be exactly 1616 points.

You can now sum up a data set with four numbers: the mean is the equal share, the median is the middle of the ordered values, the mode is the value that appears most often, and the range is the greatest value minus the least value. The mean is tied to the total by sum=mean×n\text{sum} = \text{mean} \times n, so a known mean and a known count let you recover one missing value.

Next, you will find these same four statistics from data shown in charts and graphs.