Variable Relationships › Causation vs. Correlation: A Critical Distinction

Michael BrenndoerferJune 3, 20254 min read
Machine Learning from ScratchAll chapters
Part 1 of 9Statistics 101
Chapter 6Variable Relationships › Causation vs. Correlation: A Critical Distinction
Reading section 7 of 11 · Causation vs. Correlation: A Critical Distinction · 4 minSection 7 of 11 · 4 min

Book contents

Section 7 of 11 · 4 min read

Variable Relationships › Causation vs. Correlation: A Critical DistinctionOne section · Sections in this chapter7 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Perhaps the most important lesson in studying variable relationships is understanding the difference between correlation and causation. Correlation tells us that two variables move together, but it does not tell us whether one causes the other. This distinction is fundamental to sound statistical reasoning and prevents serious errors in interpretation and decision-making.

When we observe a correlation between variables XX and YY, several scenarios could explain the relationship. First, XX might cause YY. Second, YY might cause XX (reverse causation). Third, both XX and YY might be caused by a third variable ZZ that we haven't measured (confounding). Fourth, the correlation might be purely coincidental, especially when examining many variable pairs (spurious correlation). Without additional information or careful study design, we cannot determine which scenario applies.

Classic examples illustrate the danger of conflating correlation with causation. Ice cream sales and drowning deaths are positively correlated across months, but neither causes the other: both increase during summer when weather is warm. The number of firefighters at a scene correlates with fire damage, but firefighters don't cause damage: larger fires require more firefighters and cause more damage. These examples seem obvious, but similar logical errors occur frequently in data analysis when domain knowledge is insufficient or causal reasoning is neglected.

Establishing causation requires more than observing correlation. Randomized controlled experiments give the gold standard by randomly assigning subjects to treatment and control groups. When experiments are infeasible, causal inference methods such as instrumental variables, regression discontinuity designs, or difference-in-differences can help under specific assumptions. Longitudinal data showing that changes in XX precede changes in YY give suggestive evidence, though temporal precedence alone doesn't prove causation. Strong domain theory explaining a plausible causal mechanism strengthens causal claims.

This distinction has practical consequences. In policy decisions, prescribing interventions based on correlations without understanding causation can be ineffective or harmful. In business, optimizing for correlated metrics rather than causal drivers may waste resources. In science, publishing correlations as causal claims erodes credibility and misinforms the public. Approaching correlations with healthy skepticism and asking "What other factors might explain this relationship?" and "What evidence would demonstrate causation rather than mere association?" helps avoid these pitfalls.

The following example illustrates how a confounding variable can create a spurious correlation between two variables that have no direct causal relationship.

Out[8]:
Visualization
Scatter plot showing spurious correlation between X and Y.
Spurious correlation between X and Y (r ≈ 0.96). The variables appear strongly correlated, which might lead to an incorrect causal interpretation that X causes Y or vice versa.
Two overlaid scatter series showing that both X and Y increase strongly with the confounding variable Z.
Both X and Y are caused by confounder Z. The apparent correlation between X and Y is entirely explained by their common dependence on Z. When Z increases, both X and Y tend to increase, creating a correlation despite no direct causal link between them.