KatInterview

Calculating A/B Test Sample Size and Duration for Conversion CTR

Statistics & ExperimentsModel answer
EasyModel answerStatistics & ExperimentsA/B TestingPower AnalysisSample Size

Last updated

Perform a statistical power analysis to derive required sample size and experiment duration for an A/B test, analyzing the impact of changing MDE and real-world practical constraints.

Scenario

You are an analytics lead designing an experiment to evaluate a redesigned visual element on a online reservation platform. The core metric is the Click-Through Rate (CTR) of the main call-to-action button.

Baseline Metrics & Parameters

  • Baseline CTR ($p_1$): 5.0%
  • Minimum Detectable Effect (MDE): A relative lift of 10% (i.e., detecting an absolute change from 5.0% to 5.5%).
  • Significance Level ($\alpha$): 0.05 (two-tailed)
  • Statistical Power ($1 - \beta$): 0.80
  • Daily Eligible Users: 20,000 active unique users per day.
  • Traffic Allocation: 50/50 split between Control and Treatment.

Tasks

  1. Compute the required sample size per group using the two-sided two-proportion $z$-test formula.
  2. Calculate the theoretical minimum runtime (in days) to gather sufficient sample size.
  3. Explain the mathematical relationship between the MDE and required sample size, including the trade-offs of targeting a smaller MDE.
  4. Address practical considerations that could influence runtime beyond the mathematical minimum.