Data Cleaning and Outliers (Foundation)
Data cleaning is the process of checking a data set for errors, such as impossible values, typing mistakes or missing entries, and correcting or removing them before analysis. An outlier is a value that is much higher or lower than the rest of the data and does not fit the general pattern. In GCSE Statistics, spotting and dealing with outliers correctly is an important step before calculating averages or drawing graphs.
Before you start
Make sure you're comfortable with these topics first:
Method
- Look through the data set for values that are impossible or clearly wrong for the context, such as a negative age or a height of 1000 cm.
- Check for likely typing errors, such as a missing decimal point or an extra zero.
- Identify outliers by comparing each value to the general spread of the rest of the data.
- Decide whether an outlier is a genuine but unusual result or a clear error; only remove values that are errors or that you have good reason to exclude.
- Recalculate any averages or statistics using the cleaned data set once errors have been corrected or removed.
- State clearly which values were removed or corrected and why, since this affects how the results should be interpreted.
Common mistakes
MistakeRemoving every value that looks unusual, even when it is a genuine observation that is important to the investigation.
InsteadCheck the original record and context before changing a value. Keep a genuine extreme result and explain its effect instead of deleting it automatically.
MistakeTreating an outlier as proof of a recording error just because it is far from the other values.
InsteadAn outlier may be real or erroneous. Look for an impossible value, a transcription mistake or supporting evidence before deciding whether to correct or exclude it.
MistakeUsing the original number of observations as the denominator after a value has been removed from a mean calculation.
InsteadAfter a confirmed error is removed, count the remaining observations again and divide the corrected total by that remaining count.
Worked examples
Example 1
A nurse records the weights (kg) of 8 patients: 62, 65, 71, 68, 640, 70, 66, 69. (a) Identify the outlier. (b) Suggest a likely explanation. (c) Calculate the mean weight with the outlier removed.
- Compare each value with the rest: 640 kg is far larger than all the other weights (62 to 71 kg), so 640 is the outlier.
- A likely explanation is a data entry error, for example the decimal point was missed and the true value was 64.0 kg.
- Remove the outlier, leaving 7 values: 62, 65, 71, 68, 70, 66, 69.
- Sum the remaining values: 62 + 65 + 71 + 68 + 70 + 66 + 69 = 471.
- Divide by the number of values: 471 divided by 7 = 67.285714...
- Final answer: the outlier is 640 kg, likely a data entry error, and the mean weight of the remaining 7 patients is 67.3 kg (1 dp).
Example 2
An animal rescue records the number of adoptions at nine branches in one month: 14, 18, 16, 21, 17, 15, 19, 161 and 20. The branch report confirms that 161 is genuine because a large adoption event took place. Find the mean to 2 decimal places and explain how the value should be treated.
- The value 161 is much higher than the other branch totals, so it is an outlier in this data set.
- The report confirms that 161 is genuine, so it must not be corrected or removed merely because it is unusual.
- The total is 301 and there are 9 branches, so mean = 301 / 9 = 33.444... .
- The median of the ordered data is 18, showing how much lower a typical branch is than the mean pulled upwards by the event.
- Final answer: keep 161 as a genuine outlier; the mean is 33.44 adoptions (2 d.p.), and the median is 18 adoptions.
Practice questions
Q1[1 mark]A data set of ages is: 12, 13, 12, 14, 13, 99. Which value is most likely an outlier?Show answer
Answer: 99 (far higher than the rest, likely a recording error for an age).
Q2[1 mark]A shop records daily sales in pounds: 340, 355, 360, 348, 2, 352. Which value looks like a data entry error?Show answer
Answer: 2 (a digit was likely missed, for example it should read 320).
Q3[1 mark]Give one reason you might choose to keep an outlier in a data set rather than remove it.Show answer
Answer: It could be a genuine, correct value that shows real variation, so removing it would lose important information.
Q4[2 marks]A data set of test scores out of 100 is: 55, 60, 58, 62, 59, -10. Which value must be an error, and why?Show answer
Answer: -10, because a test score cannot be negative.
Q5[3 marks]The heights (cm) of 6 plants are: 15, 18, 16, 14, 17, 150. Find the mean of the remaining values after removing the outlier.Show answer
Answer: 16 cm (15 + 18 + 16 + 14 + 17 = 80, 80 divided by 5 = 16).
Q6[2 marks]Explain why the median might be a more appropriate average to use on a data set with an outlier, instead of removing the outlier first.Show answer
Answer: The median is not affected much by extreme values, so it can be used on the original data set without needing to identify or remove an outlier.
Exam-style questions
Written in the style of a GCSE Statistics exam paper, with a full mark scheme.
Exam tips
- Check a suspicious value against the original record and the context before deciding whether to correct it, remove it or keep it.
- State whether an unusual value is genuine or an error, then explain how that decision affects the average or graph.
- If a value is removed, recalculate both the total and the number of observations before finding the new mean.
Q1[3 marks]The number of pets owned by 7 students is: 1, 2, 1, 0, 2, 1, 15. (a) Identify the outlier in this data set. (b) Explain why it is unlikely to be a genuine value. (c) State one action the researcher could take.Show mark scheme
Tick each line you got.
Nothing ticked yet - 3 available
Q2[2 marks]A data set of temperatures in degrees C recorded over a week is: 18, 19, 17, 20, 18, -180, 19. State the outlier and explain briefly why it must be an error rather than a real UK summer temperature.Show mark scheme
Tick each line you got.
Nothing ticked yet - 2 available
Q3[5 marks]A researcher records the salaries, in thousands of pounds, of 9 employees: 24, 26, 25, 27, 23, 26, 24, 25, 95. (a) Identify the outlier. (b) Calculate the mean of the original 9 values. (c) Calculate the mean with the outlier removed. (d) Comment on which mean better represents a typical employee's salary.Show mark scheme
Tick each line you got.
Nothing ticked yet - 5 available
See real GCSE Statistics past-paper questions, with official mark schemes
This topic in real past papers
We have tagged some boards' past papers question by question (not every board or year yet). This topic comes up in:
- AQA GCSE Statistics past papers: 2 questions across 2 papers, latest tagged June 2022
- Edexcel GCSE Statistics past papers: 2 questions across 2 papers, latest tagged November 2020
Free printable worksheet
Want more practice on paper? Download the Data Cleaning and Outliers (Foundation) worksheet pack - 26 pages of exam-style questions with a full mark scheme. Free to download, no card or account. Print it for personal and classroom use.
This topic is chapter 1 of GCSE Statistics Foundation Essentials 1, the whole course as one free printable PDF. Its worksheet is also chapter 1 of GCSE Statistics Foundation Topic Workbook 1 and chapter 1 of GCSE Statistics Foundation 10-Minute Tests 1, free printable practice books.
Other versions of this worksheet: