Math for Causal Inference
All simulators

Horvitz–Thompson vs Hájek

Monte Carlo of two IPW estimators; shift the outcome level and only the normalised (Hájek) version stays stable.

Day 44: IPW & Hájek Estimators of the ATE
-10123estimated ATE, 1,200 samples
Horvitz–Thompson
sd 3.497
bias -0.132
Hájek
sd 0.485
bias 0.049
effective sample size
167
of n = 300
sd ratio HT ÷ Hájek
7.20
Horvitz–ThompsonHájek (normalised weights)

Weighting by 1/e(x) recreates a randomised comparison. Horvitz–Thompson divides by n; Hájek divides by the sum of the weights, so adding a constant to every outcome cannot move it. Raise the outcome level and watch HT spread out while Hájek stays put. True effect +1.