Data integrity characteristic: reasonableness

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Data integrity characteristic: reasonableness

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student record shows an age of 250 years. Which integrity characteristic does this breach?
A Timeliness
B Reasonableness
2. Which statement describes reasonable data?
A Its value is sensible and believable in its context
B It was collected from a source that nobody can question
3. A shop records a customer buying -5 pencils. What is the problem?
A An impossible value that fails a reasonableness check
B A value that is simply out of date
4. A reasonableness check on a 'Year Level' field accepts only 7 to 12. What does it do with a value of 27?
A Flags it as unreasonable
B Accepts it because it is a whole number
5. A house price dataset has one home listed at $2 instead of $2,000,000. How should an analyst treat this outlier?
A Leave it, because every outlier must be correct
B Flag it and investigate, because it looks wrong

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1IF age < 0 OR age > 120 THEN flag AA check that rejects a test mark that is higher than the maximum possible score
2IF mark > 100 THEN reject BIF temp >= -10 AND temp <= 50 THEN accept
3An outlier that looks wrong should be flagged for review, not silently accepted CThe check only tests the lower limit, so an impossible age of 250 is accepted. It needs an upper limit such as age <= 120.
4A reasonableness check tests a value against a sensible range for its context DIF price > 10 * average_price THEN review
5IF age >= 0 THEN accept (age = 250) ENo reasonableness check was applied, so an impossible value was accepted as correct. The value should have been flagged and corrected.
6Weight of a student = 5000 kg, record accepted FA reasonableness check that flags impossible ages that fall outside a believable range

Definitions

reasonableness

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
if age _ 120: print("Unreasonable age")
2.
if ___ < 0: flag = True
3.
SELECT * FROM students WHERE yearLevel ___________ 7 AND 12;
4.
if age < 0 __ age > 120: print("Check this value")
5.
if mark _ 100: print("Impossible mark")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A age = 250
B IF age < 0 AND age > 120 THEN
C flag 'unreasonable age'
D END IF
Question 2
A FOR each mark IN marks
B // marks must be 0 to 100
C IF mark<0 OR mark>1000 THEN
D flag mark
E END IF
F END FOR
Question 3
A def is_reasonable(age):
B if age < 0:
C return False
D return age >= 120
Question 4
A max_age = 1200
B age = 250
C if age > max_age:
D print('Check this age')
Question 5
A price = -15
B if price >= 0:
C print('Impossible price')
D else:
E print('Price is OK')

Answer Key

Data integrity characteristic: reasonableness
Section A: Quick Questions
Q1
B — Reasonableness
Q2
A — Its value is sensible and believable in its context
Q3
A — An impossible value that fails a reasonableness check
Q4
A — Flags it as unreasonable
Q5
B — Flag it and investigate, because it looks wrong
Section B: Match the Pairs
Q1
IF age < 0 OR age > 120 THEN flag → A reasonableness check that flags impossible ages that fall outside a believable range
Q2
IF mark > 100 THEN reject → A check that rejects a test mark that is higher than the maximum possible score
Q3
An outlier that looks wrong should be flagged for review, not silently accepted → IF price > 10 * average_price THEN review
Q4
A reasonableness check tests a value against a sensible range for its context → IF temp >= -10 AND temp <= 50 THEN accept
Q5
IF age >= 0 THEN accept (age = 250) → The check only tests the lower limit, so an impossible age of 250 is accepted. It needs an upper limit such as age <= 120.
Q6
Weight of a student = 5000 kg, record accepted → No reasonableness check was applied, so an impossible value was accepted as correct. The value should have been flagged and corrected.
Section C: Definitions
Q1
reasonableness — Data is reasonable when its value is sensible and believable in its context, so impossible values or odd outliers (like an age of 250) are flagged by reasonableness checks.
Section D: Fill in the Blanks
Q1
if age > 120: print("Unreasonable age")
Q2
if age < 0: flag = True
Q3
SELECT * FROM students WHERE yearLevel NOT BETWEEN 7 AND 12;
Q4
if age < 0 or age > 120: print("Check this value")
Q5
if mark > 100: print("Impossible mark")
Section E: Spot the Error
Q1
B — No age can be both below 0 and above 120, so AND means nothing is ever flagged. A reasonableness check should use OR: IF age < 0 OR age > 120 THEN.
Q2
C — The upper limit is wrong. A mark above 100 is impossible, so the check must use 100 as its limit. A mark of 500 would pass a limit of 1000. It should be mark>100.
Q3
D — The comparison is the wrong way round. Reasonable ages are 120 or less, so the function should return age <= 120. As written, an age of 250 would be accepted as reasonable.
Q4
A — The maximum is set far too high to be believable. An age of 250 would not be flagged. The limit should be a sensible value such as 120.
Q5
B — The condition is reversed. It flags positive prices as impossible. The impossible values are zero or negative, so the check should be if price <= 0:.