Problem
An A/B test says a treatment works on average, but not for whom. An online shop that gives every new visitor a discount pays for it also where customers would have bought anyway, and pop-ups could deter some customers. Hand-made splits are easy for categorical variables, but for a continuous one like time of day it is unclear where to cut, and trying every cut-off finds spurious differences.
Example from the article: a shop randomizes a discount among 100,000 new visitors (50% treated) and sees spend rise by $1.95 on average, then asks which visitors drive that effect.
Solution in brief
Turn the unobservable individual effect into an observable target: a transformed outcome whose expected value equals the individual effect. Fit a regression tree on it, so each leaf holds an average effect for one segment. Build the tree on one half of the data and compute leaf averages on the other half ("honest" trees). Then standard A/B-test standard errors are valid inside each leaf.
Questions this case answers
- How to estimate heterogeneous treatment effects from a randomized experiment, with valid confidence intervals, when the individual effect is never observed
- How to choose subgroup boundaries for a treatment effect on continuous and categorical covariates without overfitting to spurious differences
- How to find which customers respond to a discount more or less than average after an A/B test?
- How to estimate individual-level treatment effects with standard errors, not just point predictions?
Tools and methods
- Causal tree (single-tree causal forest) — segments users by treatment effect and gives a standard error per segment
- Transformed outcome with propensity score — turns effect estimation into an ordinary prediction task
- Honest sample splitting — separate data for tree structure and for leaf estimates
- EconML (
CausalForestDML) — implementation with one estimator - scikit-learn (
LogisticRegression,DecisionTreeRegressor) — propensity model and the naive tree
Google or a one-time email code. No password.