Correlation isn't causation, but how do you figure out what actually causes what? Directed Acyclic Graphs (DAGs) give you a rigorous visual language for causal reasoning. Explore the three fundamental variable types and see how controlling the wrong variable can introduce bias instead of removing it.
A Directed Acyclic Graph (DAG) is a causal diagram where nodes represent variables and directed edges (arrows) represent causal relationships. 'Acyclic' means no variable can cause itself: no feedback loops.
DAGs make your causal assumptions explicit and testable. They tell you exactly which variables to control for (and which to avoid) to get an unbiased estimate of a causal effect.
Judea Pearl's causal hierarchy: (1) Association: seeing patterns in data; (2) Intervention: predicting what happens if you change a variable; (3) Counterfactuals: reasoning about 'what would have happened'. A causal DAG plus the right adjustments lets you answer level-2 questions from observational data; level 3 needs stronger assumptions (structural equations).
Two variables are d-separated by a conditioning set Z if every path between them is blocked. A chain or fork node (like a confounder) blocks its path when it IS in Z; a collider blocks its path when neither it nor any of its descendants is in Z. d-separation implies conditional independence in every distribution compatible with the DAG.
To estimate the causal effect of X → Y, you need to block all back-door paths: paths that go from X to Y via arrows entering X. A valid adjustment set Z satisfies:
A hidden variable that causes both treatment and outcome: the most common source of spurious correlation.
Try checking "Summer": the dashed spurious association between Ice Cream and Drowning disappears from the graph.
Control for variable
Ice cream sales and drowning deaths look positively correlated, but only because Summer drives both. This is the classic confounder pattern.
The back-door path Ice Cream ← Summer → Drowning is open. You must control for Summer (or any sufficient adjustment set blocking this path) to get the true causal effect.
Adding too many controls can block causal paths or open collider paths, introducing bias instead of removing it.
Controlling for a mediator blocks the indirect causal effect. Your estimate becomes "direct effect only", which is valid only if that's your goal.
Selecting on a collider (e.g., studying only successful people) creates spurious correlations between its causes, even if they are truly independent.
Save your progress
Sign in to track which visual guides you've completed.