Invalid values in the data
Be able to identify values that are impossible or incorrect (e.g., a 200-year-old employee) and reason about the cause.
Prerequisites
- BData in everyday liferequired
Everyday explanation
Look at this table of employees:
| name | age | height (cm) | favourite colour |
|---|---|---|---|
| A | 11 | 145 | blue |
| B | 200 | 150 | green |
| C | 12 | 1.48 | red |
| D | 11 | 152 |
Three problems: B is 200 years old, C is 1.48 cm tall, D has no colour.
- Impossible values (200 years old) — someone made a typo.
- Wrong unit (1.48 is metres, not cm).
- Empty values — the question was skipped.
Intuition
How errors happen: carelessness during data entry, wrong units, a broken sensor, or an unclear question.
What to do? Never just delete silently. Choose and write down what you did:
- correct it if you know the right value (1.48 m → 148 cm),
- remove the row if the value is unusable,
- or leave it empty and calculate without it.
An algorithm trained on the table assumes that everything in it is true. If you write 200 years, the model learns that 200-year-olds exist. Garbage in, garbage out.
Mastery means
- Identifies values that are impossible or incorrect
- Formulates a reasonable explanation for how the error occurred
Sign in to do the exercises and build your mastery up.
Sources
- CS Unplugged (CC BY-SA 4.0) — CC BY-SA 4.0