Confounders, Mediators and Colliders: How to Tell Them Apart

Three kinds of variable that sit between a program and its outcome.

A confounder causes both the program and the outcome, a mediator is a step the program works through, and a collider is caused by both. They look alike in a data table and behave in opposite ways once you adjust for them, which is why evaluators need to tell them apart before choosing what to control for.

At a Glance

ConfounderMediatorCollider
Where it sitsBefore the programBetween program and outcomeAfter both program and outcome (or their causes)
ArrowsVariable points to program and to outcomeProgram points to variable, variable points to outcomeProgram and outcome (or their causes) both point to variable
What it doesCreates a false effect or hides a real oneCarries part or all of the real effectCreates a false link when you filter or adjust on it
Adjust for it?Yes, if you can measure itNo, if you want the total effect. Yes, if you want to study the mechanismNo. Do not filter or control on it
If you get it wrongBiased effect estimateEffect looks smaller than it isA new bias appears that was not there
Small exampleHousehold wealthWater treated at homeVisiting the clinic

The confounding variables entry explains why confounding matters. This page shows the neighbors a confounder is often mistaken for.

Frequently Asked Questions

What is the difference between a confounder and a mediator?

A confounder sits before the program and pushes both who takes part and the outcome, so it can fake or hide an effect. A mediator sits after the program and is one of the steps through which the program works. You adjust for a confounder to remove bias. You leave a mediator alone when you want the total effect, and you examine it when you want to know how the program works.

What is a collider variable?

A collider is a variable that is caused by two other variables, here usually the program and something that affects the outcome. Looking only at people who share the collider's value, for example only people who visited a clinic, can create a false link between the program and the outcome even when none exists.

Should I control for every variable I have?

No. Adjusting for a mediator removes part of the real effect, and adjusting for a collider adds bias that was not there. Choose what to adjust for by drawing the causal pathways first, using what you know about the program and context.