Skip to content
IGCSE·Tuition
Computer Science · Lessons

Assess data quality in an automated system

An automated system can run perfectly and still make a poor decision because one reading was wrong.

On this page
  1. What can go wrong with a reading?
  2. Worked example
  3. The mistake to watch for
  4. Check yourself
  5. Where this leads next

A decision is only as good as the data behind it. Data quality means asking whether a reading is accurate, present, up to date and sensible for the setting before the system acts on it.

This lesson extends explaining a simple decision model and completes the reasoning inside automation and emerging systems. Scenario questions often add a faulty sensor and ask what goes wrong and how to prevent it.

What can go wrong with a reading?

  • Inaccurate: the value is off from the true one, for example a sensor that drifts.
  • Missing: no value arrives, or a placeholder code arrives instead.
  • Out of date: the value is old, so it describes the room as it was, not as it is.
  • Impossible: the value cannot be real, such as a classroom at 99 °C.
  • Wrong place: the sensor measures somewhere unrepresentative, such as beside a heater.

Worked example

A greenhouse sensor sends 25, 26, 99, 26, 25 (°C). The fan rule is “ON if the average of the readings is above 35”. A range check accepts only values from 0 to 60.

Without the check: 25 + 26 + 99 + 26 + 25 = 201, and 201 ÷ 5 = 40.2. Since 40.2 > 35, the fan switches ON for no real reason.

With the check:

total ← 0
count ← 0
FOR i ← 1 TO 5
   value ← GetReading()
   IF value >= 0 AND value <= 60
      THEN
         total ← total + value
         count ← count + 1
   ENDIF
NEXT i
average ← total / count
ivaluein range 0 to 60totalcount
125true251
226true512
399false512
426true773
525true1024

The average is 102 ÷ 4 = 25.5. Since 25.5 is not above 35, the fan stays OFF. The check kept one impossible value from changing the decision.

The system should also record that a value was rejected, so someone can check the sensor.

The mistake to watch for

A common slip is to say “the system will fix the data by itself”.

Mistaken answer: “The processor will notice 99 is wrong because it is a computer.”

The student assumed the processor understands the situation.

A processor only does what its rules say. Unless a check is written, 99 is accepted like any other number. The correction is to name a specific check, such as a range check, and say what the system does with a rejected value.

Check yourself

1. A sensor sends 12, 14, -999, 13, 15, where -999 means “no reading”. Valid range is 0 to 50. Find the average of the accepted values.

Show answer

Accepted: 12, 14, 13, 15. Total = 12 + 14 + 13 + 15 = 54. Count = 4. Average = 54 ÷ 4 = 13.5. Including -999 would give -945 ÷ 5 = -189, which is meaningless.

2. Give one problem with a reading that arrives ten minutes late in a system that needs updates every second.

Show answer

The reading is out of date. The processor would decide using conditions that may no longer be true, so the actuator could do the wrong thing.

3. Why should the limits of a range check not be set too tight?

Show answer

A tight range could reject real events, such as a genuine rise in temperature, so the system would ignore exactly the readings it needs to act on.

Where this leads next

The last lesson in the module is about keeping your notes tied to the right year: labelling 2029-only additions. To rehearse bad-data traces, use the Python reasoning sandbox with short loops like the one above.

Teachers in Computer Science tuition often ask you to break a rule deliberately, so you learn to see the weak point before an exam question points it out.

Questions people ask

What makes sensor data poor quality?

A reading can be inaccurate, missing, out of date, impossible for the situation or taken from the wrong place. Each problem can make the processor apply a rule to something that is not true. Naming the specific problem scores better than saying the data is bad.

How can a system protect itself from a bad reading?

It can check that each value falls inside a sensible range, ignore or flag values outside it, and use an earlier valid reading or an alert instead. These are checks on the data, not changes to the rule. Say which check suits which problem.

Is an unusual reading always an error?

No. A real event can produce an unusual value, such as a fire raising the temperature sharply. A range check should only reject values that are impossible for the setting. Choose limits carefully and decide what happens to rejected values.

Updated:

Your next step

If you can trace a rule but struggle to say how bad data changes the outcome, a one-to-one teacher can build small broken-sensor cases with you until the reasoning becomes automatic.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. You agree the teacher’s hourly rate before the trial, and ongoing lessons continue at that same rate. The schedule is arranged with your teacher after the trial.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service