Interactive statistics

56 free interactive lessons: from mean and median to A/B tests and Bayes. Drag the charts and build intuition. No sign-up.

Module 7: Relationships & regression

Causality: confounders and colliders

"Correlation ≠ causation" is the slogan everyone repeats. But what do you DO with it? When does controlling for a variable save the conclusion, and when does it ruin it? Let's work through the three basic causal structures on three nodes X, Y, Z. This turns the slogan into a working skill.

XYZ
Observed X–Y relationship: present — spurious (created by Z)
Without the control, a spurious X–Y relationship is visible.

The same move (controlling for Z) gives opposite results in different structures: for a confounder it saves you, for a collider it hurts, for a mediator it kills the effect. That is why "control for everything" is a mistake.

The first structure — the confounder: Z affects both X and Y. Then a relationship appears between X and Y even though X does not affect Y. Heat (Z) raises both ice cream sales (X) and drownings (Y). Without controlling for Z, a spurious relationship is visible.

Predict

Press "control for Z" with the "confounder" structure. What happens to the spurious X–Y relationship?

What it means

The practical skill: before "adding a control", draw the arrows. Is the variable a common cause? Control for it. A common consequence (a collider)? Absolutely not. A link in the effect? Depends on the question. Mindlessly controlling for "everything" is as dangerous as controlling for nothing.

The classic collider in product work is analyzing "active users only" or "survivors only": selecting on a consequence breeds paradoxical relationships (this IS the survivorship bias from the traps module).

Where it shows up

In medicine, causal diagrams decide which factors go into a treatment-effect model: age and severity are confounders (control), while a treatment complication is a collider (do not control).

The famous "paradoxes" (why talent and looks seem at odds among movie stars) are collider effects born of selection, not real relationships.

Definitions
Confounder
a common cause of X and Y. Creates a spurious relationship; it must be controlled for.
Collider
a common consequence of X and Y. Controlling for a collider creates a spurious relationship — it must not be controlled for.
Mediator
the intermediate link X → Z → Y. Controlling for a mediator blocks the real effect.
Causal diagram (DAG)
a graph of "cause → effect" arrows; it tells you what to control for and what not to.
When the method lies (assumptions)

Any causal conclusion from observational data rests on an ASSUMED diagram of arrows, which cannot be verified from the data alone. Got the diagram wrong — got wrong what to control for.

Controlling removes only the ACCOUNTED-FOR confounders. There may always remain an unknown one — which is why an experiment beats any observational adjustment.

Next →
Enjoying the materials?

This site is built by the DataSlice Telegram channel: data analytics in plain words — real cases, metrics, careers. The channel is in Russian.

Open the Telegram channel