Across a whole summer, ice-cream sales and drowning deaths rise and fall together, almost in lockstep. So does ice cream cause drowning? Of course not — hot weather drives both. Yet this exact mistake, dressed in fancier clothes, gets made in boardrooms and headlines every single day: two numbers move together, and someone declares that one causes the other. Learning to catch this is one of the highest-leverage skills in all of data science, and it costs nothing but a moment's discipline.
What you'll learn
What
Correlation means two variables tend to move together — when one goes up, the other tends to go up (or down). Causation means one variable actually makes the other change. Correlation is a pattern you can measure; causation is a claim about mechanism, and the two are not the same.
Why
Confusing them leads to expensive, embarrassing, sometimes dangerous decisions: launching features that don't work, cutting things that were actually helping, or believing a headline that has the story backwards. Spotting the gap between 'moves together' and 'causes' is what makes your analysis trustworthy.
Where it's used
Every A/B test interpretation, every 'this metric drives that metric' claim, every health or economics headline. Product, marketing, medicine, and policy all live or die on getting this distinction right.
Where this runs in production
Heavy viewers also renew more — but that doesn't prove watching causes renewal; committed fans do both. Netflix runs controlled experiments precisely because correlation alone can't justify a product decision.
Countries with more televisions per person have higher life expectancy. TVs don't extend life — national wealth buys both TVs and better healthcare. Wealth is the confounder hiding behind the correlation.
Rather than trust that a change 'correlates' with more bookings, the company runs thousands of randomised experiments a year — the only reliable way to turn a correlation into a causal claim.
Correlation = 'these two move together' — a measurable pattern. Causation = 'this one makes the other change' — a claim about mechanism. Every correlation has several possible explanations, and 'A causes B' is only one of them. Finding a correlation is the start of an investigation, never the end.
Watch two puppets on a stage bob up and down in perfect sync and you might think one is pushing the other. Look up and you see a single puppeteer working both strings — neither puppet moves the other; the hidden hand moves both. A confounder is that puppeteer. Ice cream and drowning are the puppets; summer heat is the hand pulling both strings. The whole skill is learning to look up for the puppeteer instead of blaming one puppet.
# Observed across a city, month by month: ice_cream_sales ↑↑ correlated with drownings ↑↑ # Tempting: ice_cream -> drownings (absurd) # Reality: summer_heat -> ice_cream # summer_heat -> swimming -> drownings # 'summer_heat' is the CONFOUNDER driving both.
The correlation between ice cream and drowning is completely real and completely non-causal. A confounder (summer heat) independently drives both, manufacturing a pattern between two things that have no direct link at all.
If you compare enough pairs of variables, some will correlate strongly by sheer chance — the number of films an actor appears in and the yearly cheese consumption of a country, and so on. These 'spurious correlations' look impressive and mean nothing. A strong correlation with no plausible mechanism is a red flag, not a discovery.
Click each explanation to see how it works and how to test it. A correlation between A and B is consistent with all four — your job is to rule out the impostors before claiming cause.
Someone says: 'Umbrella sales and rainfall are correlated, so buying umbrellas causes rain.'
Start by checking the direction. Does buying an umbrella make the sky rain? No mechanism could work that way — the arrow is backwards.
Your task
This is a reasoning drill in code form. For each observed correlation, decide the best explanation from a fixed list and fill it in. No math — you're practising the four-question reflex. Run it to check your labels.
confounder reverse coincidence
Write your solution in the editor on the right, then hit Run.
What is the difference between correlation and causation?
What is a confounder?
A study finds people who eat breakfast weigh less. Which is the safest conclusion?
What's the flaw in this reasoning?
Two lists move in the same direction. Print 'positive' if both increase together (each list sorted ascending), else 'not positive'. Given x and y already sorted ascending, this is a simple check: print 'positive'. (The point is recognising co-movement, not computing a coefficient.)
What's the most reliable way to establish causation here?
Explain the difference between correlation and causation with an example.
Correlation means two variables tend to move together — it's a pattern I can measure directly from data. Causation means one variable actually makes the other change, which is a much stronger claim about mechanism. The classic example is that ice-cream sales and drowning deaths are strongly correlated across the year, but ice cream plainly doesn't cause drowning — hot summer weather independently drives both. That example captures why the distinction matters: a correlation can be completely real and completely non-causal. In practice I treat a correlation as the start of an investigation, not a conclusion. It tells me two things are worth looking at together, but before I claim one causes the other I have to rule out reverse causation, a confounding third variable, and plain coincidence.
You find a strong correlation between using a product feature and higher retention. Why can't you conclude the feature causes retention, and what would you do?
I can't conclude causation because the users who adopted the feature chose to — this is observational, self-selected data. The most likely problem is confounding: highly engaged users are both more likely to discover and use the feature and more likely to retain anyway, so engagement drives both and inflates the apparent effect. There's also possible reverse causation, where users who were already going to stick around are the ones who explore features. The correlation looks the same under all of these. To actually establish causation I'd run a randomised experiment — an A/B test — where I randomly assign some users to get the feature (or have it defaulted on) and compare retention against a control group. Randomisation balances engagement and every other confounder across the two groups on average, so a retention difference can be credibly attributed to the feature itself. Until I have that, I'd report the relationship as a correlation and explicitly flag that it's not yet causal.
What are the possible explanations for an observed correlation between two variables A and B, and how do you tell them apart?
There are four broad explanations. First, A genuinely causes B. Second, B causes A — reverse causation, where the arrow runs the opposite way to what I assumed. Third, a confounder C independently causes both A and B, creating a link between them with no direct connection at all. Fourth, it's coincidence — with enough variables compared, some correlate by pure chance. Telling them apart starts with reasoning: I ask whether each direction has a plausible mechanism, and I brainstorm candidate confounders — is there some third factor, like wealth, age, motivation, or seasonality, that could drive both? A strong correlation with no believable mechanism points toward coincidence or a spurious relationship. But reasoning only narrows it down; the decisive tool is a randomised controlled experiment, because randomisation balances all confounders — even ones I didn't think of — so that a remaining difference is attributable to the treatment. When an experiment isn't possible, I stay tentative and lean on careful confounder control, and I'm explicit that the causal claim is uncertain.
Common Mistakes to Avoid
1) Jumping from 'A and B move together' straight to 'A causes B' without ruling out the alternatives. 2) Ignoring reverse causation — assuming the arrow points the way you expected. 3) Forgetting to hunt for a confounder, the hidden third cause behind both variables. 4) Treating a strong correlation as proof; strength without a plausible mechanism is often coincidence. 5) Making costly decisions from observational data when a quick randomised test could settle the question.
Ask the AI Tutor
Try these prompts in the AI Tutor panel: • 'Give me a correlation and ask me to name a possible confounder.' • 'ELI5: reverse causation with a fresh example.' • 'Quiz me: for each headline, is it correlation or causation?' • 'Explain how a randomised experiment rules out confounders.' • 'Interview mode: I claim a feature boosts retention — challenge my reasoning.'
Glossary
Correlation — a measurable tendency of two variables to move together (positive or negative). Causation — one variable actually making another change. Confounder — a hidden third factor that drives both correlated variables. Reverse causation — the causal arrow running opposite to what's assumed (B causes A). Spurious correlation — a real-in-the-sample correlation with no genuine mechanism; coincidence. Randomised controlled experiment (A/B test) — randomly assigning a treatment to isolate a causal effect. Control group — the subjects who don't receive the treatment, used for comparison.
Recommended Resources
• Site: Tyler Vigen's 'Spurious Correlations' — a gallery of absurd real correlations that makes the lesson stick. • Read: the opening of any explainer on randomised controlled trials to see how experiments break confounding. • Practice: find a 'X boosts Y' headline this week and name one confounder that could explain it instead. • Next in DSM: you now have the full Foundations toolkit — reading data, quality, bias, and statistics. Next you'll put it all together on a real dataset in your first guided project.
Recap
✓ Correlation is a measurable pattern of two variables moving together; causation is a claim that one makes the other change. ✓ A correlation has four possible explanations: A→B, B→A (reverse), a confounder C→both, or coincidence. ✓ A confounder is a hidden third cause that drives both variables — like summer heat behind ice cream and drowning. ✓ A strong correlation with no plausible mechanism is likely spurious, not a discovery. ✓ Causation is established with a randomised controlled experiment, which balances confounders across groups. Next up: your first Foundations Project. You've now built the whole Foundations toolkit — reading data, dataset anatomy, data quality, bias, and core statistics. Next you'll act like a junior data scientist: take a real dataset from first glance to a single honest, defensible insight.
Run your code to see the output here.