KatInterview

A/B Testing Strategy for Topic Recommendations

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsab-testingexperimental-designpower-analysis

Last updated

Design an end-to-end recommendation A/B test covering unit selection, power calculations with clustering adjustments, metric guardrails, and bias controls.

You are tasked with designing an experiment to evaluate a new topic/hashtag recommendation system starting on 2025-09-01.

Prepare a comprehensive experimental plan covering the following five areas:

  1. Randomization Unit & Network Effects: Select the appropriate unit of randomization (e.g., user, session, impression) and justify your choice. Discuss potential violations of the Stable Unit Treatment Value Assumption (SUTVA) and how to mitigate them.
  2. Experiment Architecture & Ramp Plan: Outline criteria for user eligibility, exposure triggering, deployment phases, and mechanisms to prevent cross-variant contamination.
  3. Metric Framework: Define a primary conversion metric along with at least three critical guardrails (including non-inferiority tolerances).
  4. Power Analysis & Sample-Ratio Mismatch (SRM): Given a baseline conversion rate of 4.0%, a relative Minimum Detectable Effect (MDE) of +5%, two-sided $\alpha = 0.05$, and power = 0.80:
    • Calculate the required sample size per variant for a user-level analysis.
    • Adjust the required sample size for a session-level analysis assuming an average of $m = 5$ sessions per user and an intraclass correlation of $\rho = 0.02$.
    • Specify an SRM monitoring protocol.
  5. Bias Control & Integrity: Explain techniques for variance reduction (e.g., CUPED), handling of novelty or primacy bias, sequential analysis rules, and minimum runtime requirements.

Hints

Hint 1

Selecting a user-level unit ensures persistent user experiences across sessions, but session-level metrics require cluster-robust corrections.

Hint 2

To compute absolute MDE, multiply the baseline rate by the relative change: 4.0% * 5% = 0.2 percentage points.

Hint 3

Triggered analysis isolates affected users, but control units must log a counterfactual trigger to maintain baseline comparability.