Experiments vs Observation (Why Correlation ≠ Causation)

Info sheet · Statistics for Psychology & Neuroscience

Author

Andrew Bell

Published

September 22, 2026

Info sheet 0.2 (draft) · Prerequisites: sampling · Give feedback ↗

Working notes for the author — not shown to students once collapsed; remove before publishing.

What you’ll get from this sheet

By the end you should be able to:

  1. Tell an experiment from an observational study.
  2. Explain why only randomised manipulation licenses causal claims.

Only a manipulated, randomised variable supports a causal claim; in observational data, a lurking third variable can always explain an association — correlation is not causation.

Two kinds of study, two kinds of claim

Studies come in two broad kinds, and the distinction decides what you’re allowed to conclude. In an experiment, the researcher manipulates an independent variable and randomly assigns participants to conditions. Those two ingredients — manipulation and randomisation — are what let us infer causation: random assignment makes the groups equivalent, on average, on everything except the thing we changed, so any difference in the outcome can be pinned on the manipulation.

In an observational study we simply measure variables as they naturally occur — we can’t randomly assign people to be depressed, or to have a particular brain structure, or to drink six coffees a day. Because we didn’t intervene, we’re generally limited to claims about association. This is the deep reason behind the slogan correlation is not causation: whenever two things move together in observational data, a lurking third variable (a confounder) might be driving both.

Why randomisation is the magic ingredient

A confounder is a variable that influences both the thing you measured and the outcome, manufacturing an association that isn’t causal. Stress, say, might raise both coffee intake and anxiety, making coffee and anxiety correlate even if coffee does nothing. Randomisation breaks that link: if you assign coffee doses at random, intake no longer depends on stress (or anything else), so a leftover association must be causal. Flip between an observational study and a randomised experiment and watch what happens to an apparent effect when the true causal effect is actually zero:

In the observational view, turning up the confounder manufactures a convincing slope out of nothing — X and Y march together even though X does nothing. Switch to the experiment and the slope collapses to zero however strong the confounder is, because randomising X severs its link to the confounder. That collapse is the value of an experiment.

Where you can’t randomise — you can’t assign people to smoke, or to a childhood — natural and quasi-experiments exploit accidents of circumstance (a policy change, a lottery) to approximate random assignment, but they always carry more assumptions than a true experiment.

See it in code

rng(1); n = 500;
z = randn(n,1);                       % hidden confounder; true effect of X is 0
x_obs = z + 0.5*randn(n,1);           % observational: X tracks the confounder
y  = 0*x_obs + 1.6*z + randn(n,1);
b = polyfit(x_obs, y, 1);  b(1)       % biased slope

x_exp = randn(n,1);                    % randomised
y2 = 0*x_exp + 1.6*z + randn(n,1);
b2 = polyfit(x_exp, y2, 1);  b2(1)     % ~0 — the truth

The R and Python tabs run live; MATLAB is a static reference.

A study finds that people who drink more coffee report more anxiety, and a headline concludes “coffee causes anxiety.” What’s the flaw, and what would settle it?

The study is observational, so the association could be produced by a confounder — stress or workload might raise both coffee intake and anxiety — or the causation could even run backwards (anxious people drink more coffee to cope). Observational data can’t separate these accounts. Only a randomised experiment, assigning people to different coffee doses so that intake is independent of stress and everything else, licenses the causal claim.

“Controlling for” measured covariates in observational data is not the same as randomising. You can only adjust for confounders you thought of and measured; randomisation balances the ones you never even considered. So an observational study with a long list of covariates is still not an experiment — unmeasured confounding is always the standing threat.

Where this shows up next

That lurking third variable returns as the engine of mediation. And once you’ve settled what you’re comparing, the next design choice is who — the same people across conditions, or different ones.