Understanding AI · lesson 12 of 60 · about 5 minutes
When Patterns Lie
Two things rising together doesn't mean one causes the other. Learn the trap AI falls into.
What you'll learn
- Tell correlation from causation
- Spot a hidden third cause
- Explain why AI finds links without knowing why
Together isn't the same as because
Ice cream sales and sunburn both go up together. Does ice cream cause sunburn? No: hot sunny days cause both. When two things move together, that's a correlation. It doesn't prove one causes the other.
AI doesn't know why
AI finds links in data, but it has no idea why they exist. If a hiring AI notices past hires mostly played one sport, it may start favouring that sport, even though the sport says nothing about doing the job.
A link in data is a clue, not an explanation.
Two numbers rising together on four days. Both are caused by the sunshine.
sunny_hours = [2, 4, 6, 8]
ice_creams = [20, 40, 60, 80]
sunburns = [1, 2, 3, 4]
for s, i, b in zip(sunny_hours, ice_creams, sunburns):
print(s, i, b)Output
2 20 1
4 40 2
6 60 3
8 80 4Tip
When you hear that one thing goes with another, ask: could something else be causing both?
Now try it yourself
This lesson is free in Codiqo, with 6 questions on what you just read. You can only learn to code by writing code, so it ends with a short program you write yourself, which we run and check straight away.