Problem
A ride-sharing platform wants to know whether self-driving cars raise revenue. A ride-level A/B test fails: autonomous cars serve more customers per hour, which takes riders away from the control group (a spillover). Randomizing whole cities fixes the spillover but is expensive, so only one city gets the feature. A single treated city is not comparable to the others, and a before/after comparison cannot separate the launch from other changes.
Example from the article: Miami gets self-driving cars in 2013. The data is simulated: 46 U.S. cities observed yearly in 2002–2019, with made-up revenue.
Solution in brief
Build a synthetic Miami: a weighted average of untreated cities that tracks Miami's revenue before 2013 as closely as possible. After the launch, the gap between real and synthetic Miami is the effect. Non-negative weights that sum to one prevent overfitting and keep the counterfactual readable. A permutation test over the other cities gives a p-value.
Questions this case answers
- How to estimate the causal effect of an intervention applied to a single aggregate unit when randomization is impossible because of spillovers and cost
- How to test the significance of an effect estimated from one treated unit and many untreated units observed over time
- How to estimate the effect of a feature launched in one city when an A/B test is impossible?
- How to build a counterfactual for a single treated unit from many untreated ones?
Tools and methods
- Synthetic control — counterfactual for a single treated unit from a constrained weighted average of controls
- Permutation (placebo) test — treats every control city as if it were treated
- Covariate balance check — compares treated and control units
- CausalML —
create_table_onefor the balance table - scikit-learn / statsmodels — unconstrained and naive regressions
Google or a one-time email code. No password.