What it is
Correlation means that two variables move together: when one is high, the other tends to be high as well (positive correlation) or low (negative correlation). How close the points lie to a straight line is measured by the correlation coefficient r, a number between −1 and 1.
Causation means that a change in one variable produces a change in the other. If Y changes when you change X, X is a cause of Y.
Suppose six months gave these values:
| Month | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Temperature (°C) | 4 | 8 | 14 | 19 | 22 | 26 |
| Ice creams sold (thousands) | 11 | 13 | 31 | 38 | 52 | 57 |
| Drownings | 0 | 2 | 1 | 4 | 3 | 6 |
The correlation between ice cream sales and drownings is r ≈ 0.81, between temperature and ice cream sales r ≈ 0.99, and between temperature and drownings r ≈ 0.88. Ice cream sales and drownings move together, but the ice cream does not cause the drownings: warm weather increases both ice cream eating and swimming. Temperature is a confounder, a third variable that affects both.
When X and Y correlate there are several possible explanations, and the data alone do not say which holds:
- X causes Y. Regular endurance training lowers the resting heart rate.
- Y causes X. People who take many painkillers are often in pain, but it is the pain that causes the pills.
- A third variable affects both. Ice cream and drowning, or shoe size and reading ability in children, where age affects both.
- Chance. With few points, or when many variables are compared with each other, strong correlations can arise by coincidence.
r measures straight-line relationships only. The points (−2, 4), (−1, 1), (0, 0), (1, 1) and (2, 4) lie on the curve y = x², so x determines y completely, yet r = 0.
Why it matters
- News and studies. A headline like “pupils who eat breakfast get better grades” usually rests on a link in observed data. The same questions apply: could it be the other way round, is there a third factor, could it be chance?
- Predicting and intervening. A link is enough to predict. A month’s ice cream sales give a good guess at the number of drownings with the least-squares line and regression prediction. The coefficient of determination R² = r² tells how much of the variation the line captures, here 0.81² ≈ 0.66. But banning ice cream would not change the number of drownings. To intervene, you need causation.
- Showing a cause. In a randomised experiment, chance decides who gets the treatment. Confounders, measured or not, are then spread evenly between the groups on average, and a difference in outcomes can be attributed to the treatment. In an observational study, where you only see what happened, measured confounders can be adjusted for, but unmeasured ones cannot. The cause must also come before the effect, and there should be a plausible mechanism.
- Other measures of association. For two yes/no variables the correlation is the phi coefficient. Health studies often report a link as a relative risk, and there too an observational study shows a link, not a cause.
The regression calculator takes two lists, plots the points and gives r and R².
Common misconceptions
- “A strong correlation proves a cause.” It shows that the variables move together. All four explanations above remain possible.
- “No correlation means no relationship.” The curve y = x² above has r = 0. r measures straight-line relationships, and a single outlying point can also pull r far from the value the other points give.
- “r = 0.8 means 80%.” r = 0.8 means neither that 80% of the points lie on the line nor that x explains 80% of the variation in y. The share of variation explained is r² = 0.64.
- “The same r means the same picture.” Anscombe’s quartet is four data sets of 11 points each with the same means, the same regression line y ≈ 3 + 0.5x and r ≈ 0.82. The pictures are a straight line with scatter, a curve, a straight line with one outlier, and a vertical column with one outlier. Plot the points before reading r.
- “Two quantities that both grow over time are related.” They often correlate strongly, whether or not they have anything to do with each other.
Common questions
How do you show that something is a cause?
A correlation is not enough, however strong. Where it can be done, you compare outcomes between groups formed by
chance, in a randomised experiment. Where it cannot, several kinds of evidence are weighed together: the cause
comes before the effect, the link appears in different studies and groups, it grows stronger with a larger dose,
and there is an explanation of how one could affect the other.
What is a confounder?
A third variable that affects both X and Y and so produces a link between them. Temperature in the ice cream
example is a confounder. The link between shoe size and reading ability in children becomes much weaker when
children of the same age are compared.
Can a correlation reverse when the data are split up?
Yes. This is Simpson’s paradox: a link that shows in each group separately can vanish or reverse when the groups
are combined, if the groups differ in size or in some other factor. It is a reason to ask which groups were mixed
together.
Does it matter which variable is x and which is y?
Not for r: the correlation between x and y is the same as between y and x. The regression line does change, and
the data do not say which way a cause works.
How large must a correlation be to count as strong?
There is no threshold that holds everywhere. An r of 0.9 can be weak in a physical measurement and strong in a
study of human behaviour. The number of points matters too: with 6 points, r = 0.8 can arise by chance; with 600
points it is very unlikely. Look at the points and at how many there are.