Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 2.9: How far can you trust a result?

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

65 minutes

The average of 400 pounds

An analyst reports that the average pocket money in a school is 400 pounds a week. Nobody believes it. But a number on a screen looks so sure of itself.

Checking that a result is believable is a skill in its own right. So is checking that cleaning did not damage the data.

Key words

WordWhat it means
Test plana table of tests with data and the answers you expect
Believablemakes sense, given the inputs and what you know
Accurateclose to the true value
Logical reasoningchecking by thinking: are the right inputs used and does the answer make sense?
Biasan unfair lean, such as asking only some of the people
Subject matter experta person who knows the topic well, who can say if a result looks right
Samplea small group of records picked to check
Originalthe data as it was before cleaning

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can check a result is believable and accurate, and check that cleaning has not added errors, by sampling against the original.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Three ways to check a result

MethodWhat you doExample
Logical reasoning: the inputsCheck all the relevant inputs are included, with no bias in how they were chosenDid the survey ask every year group, or only year 7?
Logical reasoning: the resultCheck the result makes sense for the inputsThe mean cannot be bigger than the largest value
Subject matter expertAsk someone who knows the topicA head of year says 400 pounds is nonsense
Test plansRun planned tests with known answersA test with data that has a known mean

The cells students fill in are left blank in this preview.

Try it: does the mean make sense?

Code: python
money = [4, 5, 5, 6, 200]
total = 0
for m in money:
    total = total + m
mean = total / len(money)
print("mean", mean)
print("between smallest and largest:", mean >= min(money) and mean <= max(money))

# The mean passes this test but 44 pounds is still not typical. A check helps, it does not prove.
# Change the 200 to 7 and look again.

Checking that cleaning added no errors

Cleaning changes data, so cleaning can create mistakes. A script meant to fix capitals might also change a year from 7 to 70.

Take a sample of the cleaned rows. Compare each sampled field with the original. Every difference should be one you meant to make.

Worked example: comparing a sample

RowOriginalCleanedDifference you meant?
0" amy REED", 8"Amy Reed", 8Yes: spaces and capitals
2"cy dean", 9"Cy Dean", 9Yes: capitals
4"Bo Jones", 7"Bo Jones", 70No: the year changed by mistake

The cells students fill in are left blank in this preview.

Check

Have a go

Check

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

4 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.