TL;DR:
Two things moving together does not mean one causes the other.
A third variable, such as hot weather, can drive both ice cream sales and sunburns.
A randomized experiment is the standard way to test whether one thing causes another.
Over a year, months with higher ice cream sales also have more sunburns. Should the town ban ice cream? Of course not, but explaining exactly why takes care. The example below uses invented numbers, but the reasoning is the real thing.
What correlation measures
The correlation coefficient r is a number between −1 and 1 that tells how closely two quantities follow a straight-line pattern. Near 1 means they rise together, near −1 means one rises as the other falls, and near 0 means no straight-line pattern. It says nothing about why.
It also does not depend on the units. If you recorded ice cream in hundreds of units instead of units, every deviation would shrink by the same factor, and r would come out the same. Before computing it, draw a scatter plot, one dot per month. A strong line-like cloud of dots is what a high r means, and a plot also reveals curves, clusters and odd points that a single number hides.
Worked example: ice cream sales and sunburns
Here are five months of made-up data. Sales are in units sold, and sunburns are cases reported.
Month | Ice cream sold | Sunburn cases |
|---|---|---|
A | 20 | 3 |
B | 35 | 6 |
C | 50 | 8 |
D | 65 | 13 |
E | 80 | 15 |
Means: sales
250 / 5 = 50, sunburns45 / 5 = 9.Deviations for sales:
−30, −15, 0, 15, 30. For sunburns:−6, −3, −1, 4, 6.Sum of products:
180 + 45 + 0 + 60 + 180 = 465.Sum of squares: sales
900 + 225 + 0 + 225 + 900 = 2250, sunburns36 + 9 + 1 + 16 + 36 = 98.Correlation:
r = 465 / √(2250 × 98) = 465 / √220500 ≈ 465 / 469.6 ≈ 0.99.
That is a very strong positive correlation, close to 1. And yet ice cream does not burn skin.
The hidden third variable
Hot, sunny weather makes people buy ice cream and also spend more time in the sun. Weather is a confounding variable: it sits behind both. In a setup like this one, if you compared only days with the same weather, the link between sales and sunburns would mostly vanish. The way to spot a possible confounder is to ask: what could make both of these go up together?
Other ways a link can mislead
Reverse causation. Hospitals have more sick people than shops do. That does not show that hospitals cause illness. The cause runs the other way: illness leads people to hospitals.
Coincidence. With enough pairs of numbers, some will line up by chance, especially in short series.
Selection. If the data only includes certain people, the pattern may not hold for others.
Spot the hidden variable
Practise on pairs like these. Children with larger shoe sizes read better: the hidden variable is age, since older children have bigger feet and more reading practice. The more firefighters at a fire, the bigger the damage: the hidden variable is the size of the fire, which drives both. Cities with more bakeries also have more traffic: both grow with the size of the city. In each case, the pattern is real, but the arrow runs through something else.
Notice also that five points is a very small sample. A correlation near 1 from five months could shift a lot with a sixth month. Strong values of r from few points deserve extra caution.
What an experiment adds
To test whether A causes B, change A on purpose and see whether B changes. In a randomized experiment, a chance process assigns subjects to a group that gets the change and a group that does not. Randomizing spreads out the hidden variables evenly, so a difference between the groups can be put down to the change. For example, to test whether a study method helps, randomly assign students to use it or not, then compare results. When an experiment is not possible or ethical, scientists use careful designs and many lines of evidence, and are cautious in their wording.
A good habit is to finish any correlation claim with the sentence "this does not show that A causes B because …", and fill in the blank with the best alternative explanation you can think of. If you cannot think of one, say so, and still call for a test.
How to check your answer
Direction. Does the sign of
rmatch the picture, rising or falling?Size.
rmust lie between −1 and 1.Arithmetic. Both columns of deviations should add to zero.
Story. Write down two or three possible explanations, including a hidden cause, before concluding anything.
Common mistakes
Saying "A causes B" from a strong
r.Assuming a weak
rmeans no relationship. A curved pattern can havernear 0.Ignoring the possibility of reverse causation.
Reading
r = 0.99as "99 times out of 100". It is not a probability.Extending the pattern far outside the data.
Where you will use it next
Correlation relies on spread, which you can practise in standard deviation by hand, and on drawing the right picture, as in reading a box plot. A related counting skill for experiments is covered in permutations and combinations.
Frequently asked questions
Can correlation ever suggest causation?
It can suggest it, and make a cause worth testing, but it cannot prove it alone. Experiments or strong designs are needed.
Does r = 0 mean the variables are unrelated?
Only that there is no straight-line pattern. They could still follow a curve, such as a U shape.
