Math for Causal Inference
All simulators

The Front Door

Smoking, tar and cancer with a hidden genotype: the front-door formula recovers the effect until its assumptions are broken.

Day 54: The Front-Door Criterion
GenotypeSmokingTarCancernaive P(Y|X=1) − P(Y|X=0)0.260front-door formula0.080true effect 0.080
naive bias
0.180
front-door bias
0.000

Smoking (X), tar (M), cancer (Y) and an unobserved genotype (U). All probabilities are exact. The front-door formula uses only X, M and Y; it matches the truth as long as there is no direct X → Y arrow and U does not affect M. Turn those on to watch it fail.