AnyLearn
All lessons
AIadvanced

Why Correlation Is Not Enough

The formal machinery that makes causal questions answerable: structural causal models, graphs as assumptions you can inspect, the three ways variables become associated, and why prediction and intervention are different problems.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

Two questions that look alike

A model predicts hospital readmission accurately. Someone asks whether the treatment it flags as predictive actually reduces readmission.

These sound like the same question and they are not, and the difference is not statistical subtlety. It is a difference in what is being asked of the world.

The first is a question about observation: given that I see this patient's record, what should I expect? Correlation answers it fully, and a model with high accuracy has genuinely answered it.

The second is a question about intervention: if I change the treatment, what happens? Nothing in the joint distribution of observed data answers this, because the data was generated under whatever process assigned treatments in the first place, and you are asking about a different process, one where you assign them.

The standard demonstration is that in a hospital dataset, more aggressive treatment correlates with worse outcomes, because sicker patients get more aggressive treatment. A predictive model correctly learns that association. Acting on it would be lethal.

Causal inference is the machinery for stating precisely when the second question can be answered from data, and how.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. Two questions that look alike

A model predicts hospital readmission accurately. Someone asks whether the treatment it flags as predictive actually reduces readmission.

These sound like the same question and they are not, and the difference is not statistical subtlety. It is a difference in what is being asked of the world.

The first is a question about observation: given that I see this patient's record, what should I expect? Correlation answers it fully, and a model with high accuracy has genuinely answered it.

The second is a question about intervention: if I change the treatment, what happens? Nothing in the joint distribution of observed data answers this, because the data was generated under whatever process assigned treatments in the first place, and you are asking about a different process, one where you assign them.

The standard demonstration is that in a hospital dataset, more aggressive treatment correlates with worse outcomes, because sicker patients get more aggressive treatment. A predictive model correctly learns that association. Acting on it would be lethal.

Causal inference is the machinery for stating precisely when the second question can be answered from data, and how.

2. The ladder of causation

Judea Pearl's organising framework separates three levels of question, each strictly stronger than the last.

Association. What does seeing one thing tell me about another? Written P(YX)P(Y \mid X). This is what any predictive model computes, and observational data is sufficient.

Intervention. What happens if I do something? Written P(Ydo(X))P(Y \mid do(X)). The do notation marks the distinction, and it is not the same object as P(YX)P(Y \mid X).

Counterfactuals. What would have happened to this specific unit had things been different? This patient recovered under treatment; would they have recovered without it? Strictly stronger again, because it concerns an individual under a condition that did not occur.

The hierarchy has a hard implication that motivates everything else. A higher rung cannot in general be answered from data at a lower rung alone. No quantity of observational data, and no amount of model capacity, gets you from association to intervention by itself.

What is required is an assumption about the data-generating process, supplied from outside the data. Causal inference is largely the discipline of stating those assumptions precisely enough to check what they buy.

3. Structural causal models

The formal object that carries those assumptions is a structural causal model.

It specifies, for each variable, an equation giving its value as a function of its direct causes plus an independent noise term:

Z  :=  f_Z(U_Z)                  # e.g. patient severity
X  :=  f_X(Z, U_X)               # treatment assigned
Y  :=  f_Y(X, Z, U_Y)            # outcome

The assignment symbol is deliberate. These are not algebraic equations you may rearrange. Writing Y:=f(X)Y := f(X) asserts that X determines Y, and it does not license concluding that Y determines X. Direction is part of the content.

This is what makes intervention definable. To intervene, replace an equation. Setting X to a value x deletes X's assignment entirely and substitutes the constant:

X  :=  x                         # the intervention
Y  :=  f_Y(x, Z, U_Y)            # everything else unchanged

Notice what this severs. X no longer depends on Z, because you are assigning treatment rather than letting severity determine it.

Conditioning does something different. Conditioning on X selects the subset of the population where X happened to take that value, and in that subset severity is still driving treatment. That is exactly the discrepancy the whole field exists to handle.

4. Three ways variables become associated

Draw the model as a graph, with an arrow from each cause to each direct effect. Association between two variables then arises through exactly three structures, and telling them apart is the core diagnostic skill.

Chain: X causes M causes Y. X influences Y through M. The association is real and causal. Conditioning on M blocks it, which is why controlling for a mediator makes a genuine effect vanish.

Fork: Z causes both X and Y. A common cause Z drives both. X and Y are associated with no causal relationship between them. This is confounding. Conditioning on Z blocks it, which is why controlling for confounders works.

Collider: X and Y both cause C. X and Y both cause C. Here X and Y are independent to begin with. But conditioning on C creates an association that was not there.

The collider is the one that surprises people, and it inverts the usual instinct. Suppose talent and luck are independent, and either can get you admitted to a programme. Among admitted people, the untalented ones must have been lucky, so within the admitted group talent and luck are negatively correlated. Conditioning manufactured the association.

The practical consequence is severe: controlling for more variables is not safer. Condition on a collider and you introduce bias that was not present.

5. The three structures

Every association between two variables decomposes into these three patterns, and each responds oppositely to conditioning. Deciding what to control for is deciding which paths to block and which to leave open.

flowchart TD
  A["Association between X and Y"] --> B["Chain: X to M to Y"]
  A --> C["Fork: Z causes both X and Y"]
  A --> D["Collider: X and Y both cause C"]
  B --> E["Causal path; conditioning on M blocks it"]
  C --> F["Confounding; conditioning on Z blocks it"]
  D --> G["No association initially"]
  G --> H["Conditioning on C creates one"]
  E --> I["Control decisions must be graph-specific"]
  F --> I
  H --> I

6. Simpson's paradox

The clearest demonstration that data alone cannot settle a causal question is a numerical pattern where the aggregate and the subgroups disagree.

Treatment A recovery:  overall 78%   small stones 93%   large stones 73%
Treatment B recovery:  overall 83%   small stones 87%   large stones 69%

B looks better overall. A is better in every subgroup. Both readings are arithmetically correct, which means the numbers alone do not tell you which to believe.

The resolution depends entirely on what stone size is in the causal structure.

If stone size is a confounder, affecting both which treatment is given and the recovery rate, then it opens a fork, and you should condition on it. A is better.

If stone size were instead a mediator, something the treatment changes on the way to affecting recovery, conditioning would block part of the real effect, and the aggregate would be the right number.

Same data, opposite conclusions, decided by an assumption the data cannot supply. In the standard kidney-stone version, size is a confounder because surgeons choose treatment based on it, so A is genuinely better.

The general lesson is exactly the field's premise: you cannot decide what to adjust for by looking at the data. You decide it from a causal model, and the model is an assumption you should state and defend.

7. Why randomisation works

Randomised experiments are the gold standard, and the graphical view explains why in one sentence.

Randomising treatment assignment means the treatment is determined by a coin flip and nothing else. In the model, X's equation is replaced: it no longer depends on severity, or on the clinician's judgement, or on anything.

Graphically, this deletes every arrow into X. Every fork through a common cause of X and Y is severed, because those causes no longer influence X.

With no open non-causal paths remaining, the observed association between X and Y is the causal effect. That is the entire justification, and it explains a practical point: randomisation handles unmeasured confounders as well as measured ones, since it removes the arrows regardless of whether you knew about them.

Our path on controlled experiments covers this from the practitioner's side, including the traps that make even a clean test lie.

The reason this path exists is that experiments are frequently unavailable. You cannot randomise smoking, someone's education, a country's policy, or which users adopt a product organically. In those cases you have observational data and must answer a causal question anyway, which requires knowing exactly when that is possible.

8. What the framework provides

Summarising what has been set up, because each piece is used in the next lesson.

ConceptRole
Ladder of causationSeparates prediction, intervention, and counterfactual questions
Structural causal modelEncodes assumptions as assignments with direction
The do-operatorDefines intervention as replacing an equation
Causal graphMakes assumptions visible and checkable
Chain, fork, colliderThe three sources of association
RandomisationDeletes incoming arrows, removing all confounding

Two gotchas that cause the most damage in practice.

Adding covariates is not automatically safer. The instinct to control for everything available is wrong, because conditioning on a collider or a mediator introduces bias rather than removing it. Which variables to adjust for is a decision derived from a graph.

The graph is an assumption, not a finding. Drawing it does not make it true. Its value is that it makes your assumptions explicit and criticisable, which is a genuine improvement over leaving them implicit in a regression specification, and is not the same as having verified them.

The next lesson answers the question this setup makes precise: given a graph, when is a causal effect computable from observational data, and by what formula?

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. What distinguishes P(Y | do(X)) from P(Y | X)?
    • The do-operator is an approximation used when data is scarce
    • They are the same quantity written in different notation
    • Conditioning selects a subpopulation, while the do-operator replaces X's assignment, severing its dependence on its causes
    • P(Y | do(X)) applies only to binary treatments
  2. Why does conditioning on a collider introduce bias?
    • It creates an association between variables that were independent
    • It blocks a genuine causal pathway between treatment and outcome
    • It reduces the effective sample size below what is needed
    • It reverses the direction of the causal arrow
  3. In Simpson's paradox, what determines whether you should trust the aggregate or the subgroup numbers?
    • Whichever grouping has larger sample sizes
    • Whether the subgroup variable is a confounder or a mediator in the causal structure
    • The statistical significance of the difference in each stratum
    • Whether the outcome is binary or continuous
  4. Why does randomisation eliminate confounding, including from unmeasured variables?
    • It increases statistical power enough to detect confounding
    • It balances covariates exactly between treatment groups
    • It replaces the outcome equation with a simpler one
    • It deletes every arrow into the treatment variable, severing all common-cause paths regardless of whether they were known
  5. What is the correct status of a causal graph in an analysis?
    • It is discovered from the data by testing conditional independencies
    • It is an assumption that makes your reasoning explicit and criticisable, not a verified finding
    • It is a visualisation of the fitted regression coefficients
    • It is only needed when a randomised experiment is impossible

Related lessons