Why We Shouldn’t Condition on Posttreatment Variables in Experiments

Anja Kilibarda24 Nov 2025

Problem

Analysts add post-assignment variables to experiment regressions, or cut the data by them, to explain how a treatment works (a mediator) or to drop users who did not engage. Randomization makes treatment and control identical except for the treatment. Conditioning on something the treatment changed breaks that, so the estimate stops being causal and may lead the team to drop a feature that works.

Example from the article: a Facebook experiment shows a Ray-Ban Meta ad to a random group and holds out the rest. After adding post-campaign awareness from a survey to the regression, the treatment coefficient turns negative, although the ad raised purchases.

Solution in brief

Estimate the effect from the randomized comparison alone and keep post-assignment variables out of the model and out of the sample filters. If a post-treatment variable was used, describe the result as an association. To study mechanisms, use an instrumental variable or randomize treatments that act through different pathways.

Questions this case answers
  • How to estimate the causal effect of a randomized treatment on an outcome without conditioning on variables the treatment itself changes
  • How to test which causal pathway carries a treatment effect when the mediator cannot be randomized directly
  • How to avoid biased treatment effect estimates when analysing an A/B test with a regression that includes a post-treatment variable?
  • How to test through which mechanism (awareness, consideration) a treatment works without breaking randomization?

Tools and methods

  • Treatment-effect regression — outcome regressed on the treatment indicator only, which recovers the average treatment effect (ATE) under standard assumptions
  • Instrumental variables (IV) regression — estimates the effect through a mediator when a valid instrument exists
  • Implicit mediation design — random assignment to treatments that work through different pathways
  • Monte Carlo simulation — illustrates how the bias grows with confounding
Continue reading — it's free

Google or a one-time email code. No password.