Inverse Propensity Weighting for Causal Effects

hard
Unit 22 · Causal Inference & A/B Testing0/0 to milestone

Users who opted into a new feature spend more, but they were also more engaged to begin with. Inverse propensity weighting reweights the observed users so the treated and untreated groups look alike on the confounders.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
solution.py · Python 3.13
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Inverse Propensity Weighting for Causal Effects · TechGradify