sciandu
Data & AI

Data & AI

Correlation & causation

Ice cream sales and sunburn rise together, yet neither causes the other. Why a link does not mean a cause.

What you need first

On days when a lot of ice cream is sold, there are also a lot of sunburns. That is measurable and true. So should ice cream be banned to protect people's skin? Of course not. Both numbers rise for the same reason: it is a sunny, hot day. Cases like this reveal perhaps the most important tool of data literacy: the difference between a link and a cause.

When two quantities move together

Correlation means two quantities visibly move together. When one rises, the other usually rises too, which is called a positive correlation. When one falls while the other rises, it is a negative correlation. This becomes visible in a scatter plot: each point stands for one observation, and the closer the cloud of points hugs an imagined straight line, the trend line, the stronger the link. The strength can even be given as a number between −1 and 1: values close to −1 or 1 mean a tight link, values close to 0 mean almost none.

Scatter view
Temperature (°C)Sales10
Strong positive correlation

But correlation is not causation: the ice cream does not warm the weather, summer drives both.

Explore the scatter plot and its trend line: the closer the points sit to the line, the stronger the correlation.

The hidden third variable

The most common fallacy: 'A and B are linked' turns into 'A causes B'. Often, however, a third quantity is behind it, driving both. With ice cream and sunburn it is the weather. Another example: children with bigger shoes read better. Sounds absurd, but it is true, because older children have bigger feet and more reading practice. The third variable is age. Whoever overlooks it draws completely wrong conclusions from completely correct data.

Reverse direction and pure chance

Even when a cause really is involved, the question of direction remains. Does exercise make people healthy, or do healthy people simply exercise more? Probably both to some degree, and the data alone will not tell you. And sometimes there is nothing behind it at all: search through enough series of numbers and you will always find two that happen to move in step by pure chance. One curious example from the USA is famous: for ten years, cheese consumption per person rose and fell almost in step with the number of fatal accidents in which people got tangled in their bedsheets while asleep. Nobody suspects a cause here, and that is exactly the point: the more comparisons you run, the more of these chance hits appear.

How real causes are found

To prove a cause, watching is not enough, you have to intervene. The strongest tool for this is the experiment with random assignment: participants are split into two groups by lot, the suspected cause is changed for one group only, and the results are compared. Chance ensures that hidden third variables are spread equally across both groups. This is how new medicines are tested, for example. Where experiments are impossible or unethical, as with smoking, it takes many different studies, plausible mechanisms and great care before anyone may speak of a cause.

Exercises

0 of 6 solved

Time to try it yourself. You can't break anything, every attempt counts.

Ice cream sales and sunburns rise on the same days. What is the best explanation?

What can a correlation alone NOT show?

On days with 200 scoops of ice cream sold there are about 6 sunburns, on days with 400 about 16. Following this pattern, how many sunburns do you expect on a day with 300 scoops sold?

Children with bigger shoes read better on average. The hidden third variable that drives both is .

The strength of a link is given as a number between −1 and 1. The further from 0, the stronger. Which of these three numbers shows the strongest link: 0.3 or −0.8 or 0.6? Give it with its sign.

Match each observation in the scatter plot to the right term.

The points hug the line closely
The points scatter widely around the line
One quantity rises while the other falls

Where this leads