The first interactive web laboratory for Judea Pearl's causal inference framework. Learn, visualize, and experiment with structural causal models, do-calculus, causal discovery algorithms, and counterfactual reasoning — all in-browser with zero dependencies.
Build structural causal models with a drag-and-drop DAG editor. Define structural equations, check d-separation, identify confounders/mediators/colliders, and enumerate paths. Preset models include confounding, mediation, collider, front-door, IV, and the Napkin problem.
Pearl's 3 rules of do-calculus with step-by-step derivations. Visualize graph surgery (removing incoming edges for the do-operator). Automatic identification via back-door and front-door criteria.
Run the PC algorithm on simulated data with adjustable sample size, significance level, and noise. Watch the constraint-based skeleton discovery, v-structure orientation, and Meek's rules. Compare true DAG vs discovered graph with SHD, precision, recall metrics.
Interactive demonstration of how confounding creates paradoxes. Adjust confounder strength and watch the apparent treatment effect reverse. Includes Berkeley admissions and drug trial presets.
Estimate causal effects with unobserved confounders using 2SLS. Visual walkthrough of two-stage least squares. Monte Carlo simulations (100 runs). Weak instrument diagnostics with Stock-Yogo threshold.
Pearl's Ladder Rung 3: twin network model for computing probabilities of causation (PN, PS, PNS). Drug treatment, hiring bias, and legal liability scenarios. Visualize the abduction-action-prediction workflow.
"Correlation does not imply causation" — but causal inference tells us what does.
- MIT Technology Review 2026 lists World Models as the #1 AI trend — causal reasoning is the backbone
- Judea Pearl won the Turing Award for this work
- Causal AI is the frontier connecting AI safety, scientific reasoning, and robust decision-making
- This bridges statistics, philosophy, computer science, and epidemiology
- Single HTML file (~94KB), zero dependencies
- Canvas-based graph rendering
- Pure JS causal graph algorithms (d-separation, Bayes-Ball, topological sort)
- PC algorithm with partial correlation CI tests
- 2SLS instrumental variable estimation
- Monte Carlo simulation engine
- Dark theme with responsive design
MIT — Built with Claude Code as part of the Daily Webapp series.