Sequential Probability Ratio Test for a Messenger Canary Release
Last updated: November 29, 2026
Quick Overview
A Messenger build ships to a canary population, and you want to stop as soon as the evidence shows its crash rate is either the healthy 0.1% per session or a bad 0.2%. Design a Wald sequential probability ratio test with a 1% false alarm rate and 95% power, and compare its average sample size with a fixed-sample test.
Meta
November 29, 20260
0
0 solved
A Messenger build ships to a canary population, and you want to stop as soon as the evidence shows its crash rate is either the healthy 0.1% per session or a bad 0.2%. Design a Wald sequential probability ratio test with a 1% false alarm rate and 95% power, and compare its average sample size with a fixed-sample test.
Meta release engineering gates mobile builds on canary health, where stopping early saves both users and time. This onsite question checks the SPRT construction, its error guarantees, the expected sample size, and the practical caveats of sequential monitoring.
What the Interviewer Expects
- Set simple hypotheses p0 and p1 and the per-session log-likelihood ratio
- Derive Wald's boundaries from alpha and beta
- Estimate the expected sample size under each hypothesis
- Compare with the fixed-sample size for the same errors
- Discuss composite hypotheses, delays and correlated sessions
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What happens to the SPRT if the true rate is 0.15%, between the two hypotheses?
- How would you add a maximum sample size so the test cannot run forever?
- How do you handle crashes reported hours after the session?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
- Each canary session is Bernoulli: crash with probability .
- (healthy). (bad build).
- Targets: , $\b...
Approach
Track the cumulative log-likelihood ratio Each crash adds ; each clean session adds $...