Design and power an A/B test
StripeData Scientist · Technical ScreenLast updated
This question evaluates a data scientist's competency in experimentation design, including metrics selection and guardrails, statistical power and sample-size calculation, sequential monitoring and ramp strategies, operational checks for randomization and contamination, and choosing credible quasi-experimental alternatives.
You plan to launch a targeting model via email: treat = users above a score threshold receive an email; control = withheld. (1) Choose a primary success metric and two guardrails (e.g., unsubscribe rate, complaint rate) and justify them. (2) Given a baseline 7-day purchase rate of 5% and an expected relative lift of 8%, compute the minimum per-arm sample size for a two-sided test with α=0.05 and 80% power; show your formulas/assumptions (continuity-corrected normal approximation is fine). (3) Propose a ramp plan with sequential monitoring that controls type-I error (e.g., group-sequential or alpha-spending); specify interim looks and stopping rules. (4) Describe pre-experiment checks (randomization, covariate balance, holdout contamination) and how you'd handle interference and seasonality around weekends. (5) If legal or traffic constraints prevent pure A/B, propose a credible quasi-experimental design (e.g., regression discontinuity on the score threshold or staggered difference-in-differences), and list the assumptions you would test and the plots you'd include in your slides.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.