A covariate Z takes K values (strata) with score s from −1 to 1. It changes the chance of treatment, P(X = 1 | Z) = 1/[1 + exp(1 − γs)], and the untreated outcome, C0 = 1 + δs + σε; the treatment adds τ + ηs, so C1 = C0 + τ + ηs and the average causal effect is θ = τ. Within a stratum, treatment is as good as random, so (16.6) holds. The naive difference in means compares strata as well as treatments; the stratified estimator compares treated and untreated within each stratum and averages with the stratum sizes (the plug-in version of (16.7)); the regression estimator (16.8) fits Y = β0 + β1X + β2s.
Strata are equally likely. A stratum in which one arm is empty cannot be compared; the stratified estimator then leaves it out and renormalises the weights (it estimates the effect in the strata where both treatments occur). The limits in panel (b) are exact population values; the simulation uses the seeded generator.
code/ch16_causal_inference.py (conf_model, conf_sim, conf_estimates; Figure 16.S2).