A-level Mathematics

11.6 Outliers, data cleaning and critiquing presentation — Learn

Prerequisites: quartiles and the interquartile range from Section 11.5; reading axes and chart labels.

By the end of this section you can: recognise an outlier using the interquartile-range rule; decide whether to keep, correct or remove an unusual value and say why; clean a data set that has missing values or errors; and criticise a statistical diagram or a published claim.

1. What an outlier is

An outlier is a value that is unusually far from the rest of the data. It may be a genuine extreme value, or it may be a recording error. The first job is to notice it. The second job is to decide what it means.

2. The interquartile-range rule

A common rule flags a value as a possible outlier when it lies outside the fences

Q1−1.5×IQRandQ3+1.5×IQR.Q_1 - 1.5 \times \text{IQR} \qquad \text{and} \qquad Q_3 + 1.5 \times \text{IQR}.

A value below the lower fence or above the upper fence is a possible outlier. The rule is a signal to look, not a proof that the value is wrong.

Some contexts use a different rule, such as a value more than two standard deviations from the mean. Always state the rule you use.

Example 1. The data are 12,14,15,16,17,18,19,20,21,22,4512, 14, 15, 16, 17, 18, 19, 20, 21, 22, 45. Find any outliers using the interquartile-range rule.

The lower quartile is Q1=15Q_1 = 15 and the upper quartile is Q3=21Q_3 = 21, so

IQR=21−15=6.\text{IQR} = 21 - 15 = 6.

The fences are

15−1.5(6)=6and21+1.5(6)=30.15 - 1.5(6) = 6 \qquad \text{and} \qquad 21 + 1.5(6) = 30.

The value 45 is above 30, so 45 is a possible outlier.

3. Deciding what to do with an outlier

When you find a possible outlier, ask:

Then choose one of three actions, and write down which one you chose and why:

Removing an outlier only because it weakens your argument is not honest.

Example 2. Two values in a data set of 80 are recorded as 999. Every other value is between 10 and 60. The original records are lost. Write the value 999 out of the data set and record the change.

The value 999 is impossible here, and the true value cannot be recovered. Remove the 2 values and report that 2 of the 80 values were removed as errors, leaving 78. A reader can then judge the effect on the mean.

4. Cleaning data

Data cleaning is the process of finding and dealing with values that are wrong or missing.

Problem What to do
A missing value Find it if possible. Otherwise leave it out and say how many are missing.
An impossible value Check the source. Correct it if you can, otherwise remove it.
Inconsistent units Convert every value to one unit before calculating.
A duplicate record Remove the duplicate, unless two items really share a value.
A typographical error Correct it when the true value is clear from the source.

Whatever you do, record it. A reader must be able to see how many values were changed and how the conclusion was affected.

Example 3. A data set of journey times is in minutes, but 5 of the 30 values were recorded in seconds. Explain how to clean the data.

Convert the 5 values from seconds to minutes by dividing by 60. Then all 30 values share one unit, and the mean and standard deviation can be calculated. Say in your answer that the conversion was made.

5. Critiquing a presentation

A diagram can be correct and still mislead. Look for:

Example 4. A company claims that its profits "rose sharply". The bar chart shows bars of height 96, 98 and 100, and the vertical axis starts at 95. Explain the problem.

The change from 96 to 100 is about four per cent, which is small. Starting the axis at 95 makes the bars look very different in height, so the chart exaggerates the rise. Starting the axis at 0 would show three almost equal bars.

Watch out. Three mistakes are common.

Removing an outlier without a reason. An outlier that is genuine is part of the data. Remove only a value that is an error, and say so.

Keeping an impossible value. A value the context forbids, such as a negative mass, must be corrected or removed. It cannot be left in place.

Comparing bar heights across unequal classes. For grouped continuous data, compare areas, not heights. A wide class has a tall-looking frequency even when its frequency density is small.

Re-check: after cleaning, report the number of values removed or changed, and the original total, so the effect is visible.

You should now be able to

Settings

Colour scheme

Applies to every book you read here.

Reading theme

Applies to every book you read here.