Statistics From Zero · Lesson 7 of 22
Ice Cream Doesn't Cause Sunburn
In one sentence: Two things moving together (correlation) doesn't mean one causes the other: there may be a hidden third thing behind both, the cause may run backwards, or it may be pure coincidence.
The idea
Two things are correlated when they tend to move together. When one goes up, the other tends to go up too (a positive correlation), or tends to go down (a negative correlation).
Correlation is easy to measure and very tempting to over-read. The moment we see two things moving together, our brains write a story in which one causes the other. Sometimes that story is right. Often it isn't, and the whole skill of this lesson is knowing what else could be going on.
Uncle Gary bans ice cream
Aunt Linda, who keeps a spreadsheet of everything, notices something over the summer. On days when the ice cream van outside the house sells the most, the pharmacy down the road sells the most after-sun lotion.
Uncle Gary reads the spreadsheet, concludes that ice cream causes sunburn, and bans it from the house "for the children's safety". The children are 34 and 37.
Linda points out that both numbers go up on hot, sunny days. Ice cream doesn't cause sunburn. The sun causes both. Gary says he'll "look into it" and keeps the ban, because it's his ice cream now.
The sunshine is a confounding variable: a hidden third thing that pushes both numbers at once, making them look connected when neither affects the other.
Four reasons two things move together
When you see a correlation between A and B, run through all four before believing any of them:
- A third thing causes both. Sunshine drives ice cream and sunburn. Towns with more fire stations have more fires, because bigger towns have more of both.
- B causes A, not the other way round. This is reverse causation. People in hospital are much more likely to be seriously ill than people at home. That doesn't mean hospitals make you ill. Being ill sends you to hospital.
- Coincidence. Compare enough things with enough other things and some pairs will move together by pure chance. Over a few years, almost any two rising numbers (cheese eaten per person, PhDs awarded, a city's population) will look correlated simply because both went up.
- A actually causes B. Sometimes it really does. Smoking causes lung cancer. But you only get to say so once the other three have been ruled out.
Measuring correlation
Statisticians measure how tightly two things move together with the correlation coefficient, usually written r. It runs from minus 1 to 1:
| r | What it looks like |
|---|---|
| 1 | A perfect straight line going up. One number tells you the other exactly |
| About 0.7 | A clear upward trend with plenty of scatter |
| About 0.3 | A weak trend you'd struggle to see by eye |
| 0 | No straight-line connection at all |
| Minus 0.7 | A clear downward trend |
| Minus 1 | A perfect straight line going down |
Two warnings. First, r only measures straight-line relationships. Pub attendance might drop on very cold nights and on very hot nights, with a busy sweet spot in the middle: a strong connection, but r could be close to 0. Second, r says nothing about cause. A correlation of 0.9 between ice cream and sunburn is exactly as non-causal as a correlation of 0.3.
What different correlations look like
How you actually prove a cause
The cleanest way is an experiment with random assignment. Split people into two groups by coin flip. Give one group the thing (a drug, a diet, a new teaching method) and the other group nothing, or a fake version. Because the coin decided who went where, the hidden third things (age, money, motivation, sunshine) end up roughly balanced between the groups. If the groups then differ, the thing itself is the most likely reason.
When an experiment isn't possible (you can't randomly assign people to smoke for 30 years), researchers have to work much harder to rule out the other explanations, and you should be correspondingly more careful about believing them.
Why anyone outside class cares
Markets are full of correlations, and almost all of them are some mix of a third thing and coincidence. Search through enough indicators and some will line up beautifully with past prices, then stop working the moment you use them. That's why every test on this site compares a strategy with a control group: a random stock bought on the same days. It's the trading version of the coin-flip experiment.
Try it yourself
Two questions.
1. At Kevin's university, students who sit in the front row get noticeably higher marks than students at the back. Kevin moves to the front row. Should he expect his marks to go up?
2. Uncle Gary owns 20 pairs of socks. Over a season, he notices that his football team won much more often when he wore the green pair. Should he wear the green socks for every match from now on?
Show the answer
1. Probably not by much. The most likely explanation is a third thing: students who choose the front row tend to be the ones who are more motivated, attend more lectures and do the reading. Moving Kevin's chair doesn't move his motivation. There might be a small real effect (you hear better, you get distracted less), but the only way to measure it would be to assign seats at random and compare.
2. This is coincidence. Gary compared 20 pairs of socks against the results, so one of them was always going to look lucky. Even if no sock does anything, the chance that at least one of 20 looks "significantly" lucky by the usual test is about 64%. Lesson 8 explains why. The green socks will not help, but they're unlikely to hurt either, so Linda has decided to let this one go.
The words your lecturer uses
| Lecturer says | It means |
|---|---|
| Correlation | Two things tend to move together |
| Correlation coefficient (r, Pearson's r) | A number from minus 1 to 1 for how tightly they move together in a straight line |
| Scatter plot | A chart with one dot per observation, used to see a correlation by eye |
| r squared | The share of the ups and downs in one thing that a straight line through the other can account for |
| Causation | One thing actually makes the other happen |
| Confounding variable (lurking variable) | A hidden third thing that drives both (the sunshine) |
| Reverse causation | The cause runs the opposite way to what you assumed |
| Spurious correlation | A correlation with no real connection behind it, just coincidence or a third thing |
| Randomised controlled trial (RCT) | An experiment where a coin flip decides who gets the treatment. The gold standard for proving a cause |
| Observational study | Watching what happens without assigning anything. It can show correlation, but proving a cause is much harder |
Three things to remember
- Correlation means two things move together. It never, on its own, tells you why.
- Before believing "A causes B", check for a hidden third thing, a cause running backwards, and plain coincidence.
- The best way to prove a cause is an experiment where chance decides who gets what.
Part of Statistics From Zero, a free beginner course by WrongStat. Not a substitute for your lecturer, but hopefully a good translator.