KatInterview

Power, Guardrails and Ramp Plan for a New Feed Ranker Test

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsab-testingpower-analysiscuped

Last updated

Plan an A/B test for a new feed ranking model: size it for a small CTR lift, add guardrails and sequential stopping, use CUPED, control interference, and define the ramp decision.

Scenario

Your team has trained a new ranking model for a content feed and wants to replace the production ranker. You need to plan the online experiment.

Facts:

  • Baseline click-through rate (CTR) is 2.0%.
  • You expect a 5% relative improvement in CTR.
  • Target: 90% power at a two-sided α = 0.05.
  • About 1,000,000 eligible users arrive per day.
  • Assignment is by user, 50/50, and a user stays in the same arm for the whole test.

Tasks

A. Sample size and duration. Use a two-proportion power calculation to get the required users per arm and the minimum run time. Give the formula, show the arithmetic, and list your assumptions (variance model, independence, no interference). Then inflate the number for 5% invalid or bot traffic and a 1% sample ratio mismatch (SRM) allowance.

B. Guardrails and sequential monitoring. Choose guardrail metrics (bounce rate, crash rate, p95 latency, revenue per user) and pre-registered decision thresholds. Describe how you would allow early stopping with α-spending (Pocock or O'Brien–Fleming) without inflating the Type I error.

C. Novelty and weekday effects. Propose CUPED using pre-experiment user CTR. Specify the exact covariate and explain how you would check that the variance reduction is real and does not introduce bias.

D. Interference. Explain how you would keep arms from contaminating each other: user-level bucketing, preventing content spillover, and a geo-based design or holdout if network effects are plausible.

E. After the test. Describe how you would check the power you actually achieved, look for heterogeneous effects across cohorts, and decide whether to ramp to 100%.

A strong answer states assumptions explicitly, gets the numbers right, and explains what can invalidate them in practice.

Hints

Hint 1

Treat the metric as a per-user binary outcome with p1 = 0.020 and p2 = 0.021, so the absolute difference is 0.001. Use the pooled-variance term for the null and the unpooled term for the alternative in the standard two-proportion formula.

Hint 2

Apply the inflation factors in sequence: first make sure the smaller arm still reaches n under a slight imbalance, then divide by the fraction of valid traffic, then add a small factor for interim looks. Remember that SRM is also a data-quality alarm, not only padding.

Hint 3

For CUPED, use a covariate measured strictly before assignment (for example each user's CTR over the prior 28 days under the old ranker), estimate theta on pooled data, and validate with A/A replays. For the ramp decision, combine the primary metric, guardrails, SRM status, and an exposure-day view of the effect.