Set Up a Non-Inferiority Test for a Gmail Spam Filter Launch

Last updated: November 29, 2026

Quick Overview

A new Gmail spam model catches more spam in offline evaluation and is much cheaper to serve. The launch requirement is that it must not meaningfully increase legitimate mail sent to spam. Design the experiment and the decision rule.

Google
Analytics & Experimentation
Data Scientist
Google
November 29, 2026
Data Scientist
Onsite
Analytics & Experimentation
Medium

0

0

0 solved


A new Gmail spam model catches more spam in offline evaluation and is much cheaper to serve. The launch requirement is that it must not meaningfully increase legitimate mail sent to spam. Design the experiment and the decision rule.

Many Google launches are justified by cost or infrastructure wins, where the question is whether user experience gets worse, not whether it gets better. The interviewer checks whether you know non-inferiority testing, can choose a margin, and can measure rare errors such as false positives.

What the Interviewer Expects
  • Frames the guardrail as a non-inferiority hypothesis with an explicit margin
  • Picks a margin with stakeholders before the test
  • Measures false positives through user 'Not spam' actions and labeled samples
  • Sizes the test for a rare event and a small margin
  • States the decision rule using the one-sided confidence bound
Key Topics to Cover
non-inferiority testing
guardrail metrics
false positive rate
rare events
power analysis
How to Approach This
  1. Define success metrics carefully. A good metric is measurable, actionable, and aligned with business goals.
  2. Run experiments long enough to account for novelty effects and weekly seasonality.
  3. Use funnel analysis to identify where users drop off for maximum optimization impact.
  4. Segment results by key dimensions (platform, country, user cohort) to catch hidden patterns.
  5. Consider network effects and interference between treatment and control groups.
Possible Follow-up Questions
  • How would you choose the margin?
  • Not-spam clicks are a biased proxy. How do you correct for it?
  • What if the model is non-inferior overall but worse for one language?
  • Why not just test for a difference with a two-sided test?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Analytics Questions
Sample Answer
Clarify
  • Primary guardrail: false positive rate (legitimate mail sent to spam), measured as "Not spam" clicks per 1,000 messages delivered to spam, and validated with human-labeled samples.
  • Secondary: spam...
Approach

Standard testing asks whether there is a difference. Failing to find one does not prove there is no harm, since the test could simply be underpowered. Non-inferiority flips the burden:


Submit Your Answer
Markdown supported