Confounding — The Central Villain of Causal Inference

If you remember one thing about why causal conclusions go wrong, make it confounding. A confounder is a lurking variable that influences both the treatment and the outcome, manufacturing a correlation that looks causal but isn't. It's the reason observational data is so treacherous, the reason randomized experiments are the gold standard, and the single concept that explains most spurious causal claims in business, science, and ML. This post makes confounding concrete and shows why it's so hard to defeat.

Post 2 reduced causal inference to “make the treated and untreated groups comparable.” This post is about the main thing that makes them not comparable: confounding. It’s the villain the rest of the series is organized against — experiments prevent it, observational methods try to adjust it away, causal graphs help you spot it. Understanding confounding deeply is most of understanding causal inference.

What a confounder is

A confounder is a variable that causally influences both the treatment and the outcome. Its presence creates a correlation between treatment and outcome that is not due to the treatment causing the outcome — a fake causal signal.

The canonical examples make it vivid: - Ice cream and drowning correlate, but ice cream doesn’t cause drowning. Hot weather is the confounder: it causes both more ice-cream sales and more swimming (hence drownings). Control for weather and the correlation vanishes. - A feature and retention: users who adopt your new feature retain better — but engagement is the confounder. Already-engaged users both adopt new features and retain; the feature may have caused nothing. The treated (adopters) and untreated groups differ in engagement, so they’re not comparable (post 2), and the retention gap reflects the pre-existing difference, not the feature. - A drug and recovery in observational data: healthier or wealthier patients may both receive the drug and recover more — so the drug looks effective when the confounder (health, wealth) drives both.

The structural signature is always the same: the confounder sits “upstream,” with causal arrows pointing to both the treatment and the outcome, so it makes them move together without any treatment→outcome link. This is exactly why the treated and untreated groups end up different in ways that matter — the confounder sorted units into treatment and affected their outcomes. Confounding is the formal name for “the groups weren’t comparable,” and it’s the most common reason causal claims from observational data are wrong.

Why confounding is so dangerous

Confounding is uniquely treacherous for reasons worth internalizing:

So confounding isn’t just “a thing to watch for” — it’s a problem that produces believable falsehoods, requires knowing and measuring the right variables, can never be fully ruled out in observational data, and punishes both under- and over-adjustment. That combination is why causal inference is hard.

How the field fights confounding

The entire structure of causal inference is a set of strategies against confounding, which is why it’s the organizing villain of the series:

The unifying insight: causal inference is the science of dealing with confounding. Randomize it away if you can; carefully adjust for it if you can’t; use graphs to know what to adjust for; and stay honest that in observational data, unmeasured confounding is a doubt you can reduce but never eliminate. Every method and every caveat in the rest of the series traces back to this one villain.

The throughline: a confounder causally influences both the treatment and the outcome (hot weather → ice cream and drowning; engagement → feature adoption and retention), manufacturing a real but non-causal correlation — it’s the formal reason the treated and untreated groups aren’t comparable (post 2). It’s uniquely dangerous because it produces confident, plausible, wrong conclusions (looks like a finding, not an error), can only be adjusted away if you know and measure it (unmeasured confounders are unfixable and never fully ruled out — observational causal inference’s permanent weakness), and punishes over-adjustment too (mediators, colliders). The field is organized against it: randomization eliminates all confounders at once (post 4 — the gold standard), adjustment reconstructs comparability for measured confounders under the unprovable “no unmeasured confounding” assumption (post 6), causal graphs show which variables to adjust (post 5), and natural experiments exploit accidental randomization (post 7). Causal inference is the science of dealing with confounding.

Key takeaways

Further reading

Sources & References