Statistics
Intermediate 13 min read Statistics

Correlation vs Causation

The most dangerous word in analytics is 'because'

Correlation is association; causation is direction + no confounds + mechanism. Spurious correlation, confounders, reverse causality and Simpson's paradox are the analyst's occupational hazards.

correlationcausationconfoundersSimpson's paradoxspurious correlationexperiments
Prerequisites: Probability Basics
Before we start

What you will learn

  • Explain why correlation is not causation
  • Identify confounders, reverse causality and spurious correlations
  • Describe when causal claims are justified (randomized or quasi-experimental)
Introduction

What is this?

Correlation quantifies association — how two variables move together. Causation means one produces the other, which requires the association to survive controls for confounders, direction to be established, and a mechanism to exist. Observational data alone cannot prove causality, so analysts must treat 'because' as a hypothesis, not a finding, unless the design supports it.

Motivation

Why do you need it?

  • Executives routinely infer strategy from correlated charts; wrong 'causes' waste millions.
  • Confounders (weather, season, platform mix) fake relationships that vanish under controls.
  • Simpson's paradox hides real group patterns inside aggregate trends.
  • Knowing the limits protects your credibility when a chart looks too convenient.
Think about it

Mental model

Imagine

Fire engines and fires

Think of

Correlation vs causation

More fire engines strongly correlate with more fire damage — but nobody claims engines cause damage. The confounder (fires) drives both. Correlation is a radar contact; causation needs the whole air-traffic picture.

Mechanics

How it works

  • Measure association (Pearson r, partial r) between two variables.
  • List plausible confounders that drive both; isolate in models or experiments.
  • Check direction: does X precede Y in time? Reverse causality is common (usage 'predicts' retention).
  • Seek a mechanism — the 'why' that ties X to Y plausibly.
  • For causality: randomize, or use quasi-experimental designs (diff-in-diff, IV, regression discontinuity).

Confounder structure of a spurious correlation.

X (ads)
C (season)
Y (sales)
r(X,Y) ≠ 0
Hands-on

Examples

Simpson's paradox in action

Simpson's paradox in action
import pandas as pd
df = pd.DataFrame({
"group": ["A"]*20 + ["A"]*80 + ["B"]*80 + ["B"]*20,
"method": ["old"]*20 + ["new"]*80 + ["old"]*80 + ["new"]*20,
"success": [8]*20 + [50]*80 + [80]*80 + [10]*20, # per-method counts sketchy mental model
})
# Aggregate looks like Old > New, but per group reversal emerges
g = df.groupby(["group","method"])["success"].mean()
print(g.unstack())
# Aggregate:
agg = df.groupby("method")["success"].mean()
print(agg) # Old apparently better in aggregate, wrong within both subgroups

Each group prefers one method, yet the pooled average reverses it — Simpson's paradox: confounded aggregation.

Real world

In production

  • Experiment-first culture for any 'X drives Y' product claim.
  • Cohort controls by signup month so growth isn't confused with launch timing.
  • Correlation heatmaps used for hypothesis generation, then tested causally.
Guidelines

Best practices

  • Label observational findings 'associated with', never 'drives'.
  • Control for the top confounders in designs and models.
  • Look at subgroups before believing a headline aggregate (Simpson).
  • Push any operational claim toward a randomized test when it can run.
Watch out

Common mistakes

  • Presenting r=0.8 dashboards as confirmation of a marketing strategy.
  • Missing the cohort/period confounder in 'since we launched X, Y jumped'.
  • Reversing causality: 'higher engagement users churn less' → engagement 'prevents' churn.
  • Bernice's paradox-class errors: averaging before segmenting.
When things break

Debugging tips

  • A claim reverses in a subgroup? Simpson's paradox — segment the analysis.
  • Suspect a confounder? Add it as a control and watch the effect shrink.
  • Direction unclear? Compare timing: the cause should precede the outcome.
  • Publish an annotated chart noting observation vs experiment so readers don't over-read.
Interviews

Interview checkpoint

Test yourself

Quick quiz

0/2
1

Which study design provides the strongest causal evidence?

2

Controlling for a confounder in regression makes an association causal.

Go deeper

Official documentation