KatInterview

Calculating Experiment Sample Sizes, Multiplicity Corrections, and Duration

Statistics & ExperimentsModel answer
HardModel answerStatistics & ExperimentsA/B TestingSample SizeMultiple Testing

Last updated

Derive sample sizes, adjust for variance misspecification and multiple testing, and design sequential stopping rules for online A/B tests.

You are designing online experiments for a social network platform to evaluate features intended to improve the connection request acceptance rate (baseline $p_0 = 9.0%$). Analyze the following two operational scenarios and provide detailed statistical justification for your design choices:

Scenario A: Two-Arm AB Test

  • Baseline Rate ($p_0$): $9.0%$
  • Target Minimum Detectable Effect (MDE): $+0.5$ percentage points (absolute increase to $9.5%$)
  • Parameters: Two-sided $\alpha = 0.05$, Power ($1-\beta$) = $0.80$, equal $1:1$ split.
  • Traffic: $10$ million eligible active users daily.
  1. Compute the required per-arm sample size ($n$) and discuss calendar runtime constraints.
  2. Evaluate the impact if the empirical standard deviation turns out to be $20%$ higher than the standard binomial assumption. What happens to statistical power if the sample size remains fixed at the value derived in step 1?

Scenario B: Three-Arm Experiment (Control vs. Two Treatments)

  • Design: Shared Control ($C$) vs. Variant 1 ($T_1$) and Variant 2 ($T_2$).
  • Target MDE: $+0.3$ percentage points (absolute) for either variant against control.
  • Familywise Error Rate (FWER): $\alpha = 0.05$, Power = $0.80$.
  • Allocation: $20%$ Control, $40%$ Variant 1, $40%$ Variant 2.
  1. Compare Bonferroni, Holm, and Dunnett procedures for controlling FWER in this setup. Justify which method is most appropriate.
  2. Compute the total required sample size ($N$) under your chosen correction method and calculate the split per arm. Discuss the efficiency of a $20/40/40$ allocation relative to balanced or optimal allocation rules.

Statistical Rigor & Monitoring (Applies to both scenarios)

  1. Explain the mathematical and practical risks of continuous monitoring ("peeking") using fixed-sample $p$-value thresholds. Propose a group-sequential boundary framework (such as O'Brien–Fleming) to mitigate these risks.
  2. Discuss under what circumstances you would apply variance reduction techniques (e.g., CUPED) or cluster-robust standard errors. How does each technique impact the required sample size and design parameters?

Hints

Hint 1

Recall that the variance of the difference in two independent sample proportions is p1(1-p1)/n1 + p2(1-p2)/n2. Convert standard normal z-scores for alpha=0.05 (two-sided) and beta=0.20.

Hint 2

When standard deviation scales by a factor of k, variance scales by k^2. Factor this directly into the sample size formula.

Hint 3

Dunnett's test accounts for the positive correlation introduced by comparing multiple treatment groups against a single shared control group.