Sequential Probability Ratio Test (SPRT)#
A sequential test that accumulates the likelihood ratio and stops when it crosses preset bounds.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
The sequential probability ratio test (SPRT), due to Abraham Wald, is a hypothesis test that evaluates data as it arrives rather than fixing the sample size in advance. It compares two simple hypotheses,
and after each observation decides to accept \(H_0\), accept \(H_1\), or keep sampling.
The running likelihood ratio#
After \(n\) observations, accumulate the likelihood ratio
Decision boundaries#
Two boundaries are set from the desired Type I (\(\alpha\)) and Type II (\(\beta\)) error rates:
Then stop when \(\Lambda_n \ge A\) (accept \(H_1\)) or \(\Lambda_n \le B\) (accept \(H_0\)); while \(B < \Lambda_n < A\), continue.
Worked example#
For conversion rates \(H_0 : p = 0.10\) vs \(H_1 : p = 0.12\) with \(\alpha = 0.05, \beta = 0.20\),
Update \(\Lambda_n\) as conversions come in; cross 16 → conclude \(H_1\), drop below 0.21 → conclude \(H_0\), otherwise keep going.
Strengths and limits#
On average the SPRT needs fewer samples than a fixed-horizon test, stops as soon as evidence is decisive, and holds the chosen \(\alpha\) and \(\beta\). The catch: it’s built for simple hypotheses (fixed \(\theta_0, \theta_1\)), is awkward for composite ones (e.g. \(p \le 0.10\)), and needs real-time monitoring. Wald introduced it for WWII quality control (accepting or rejecting munitions lots with fewer inspections); today it appears in clinical trials, sequential A/B testing and industrial QC. Versus group-sequential designs (which look at fixed checkpoints), the SPRT is genuinely continuous.
Theme: Sequential Methods & Bandits · All terminology
Hint
Mind map — connected ideas
Likelihood Ratio (LR) · Bayesian Sequential Testing · Stopping Rules · Sequential Settings · Frequentist · Group Sequential Testing
Hint
More in Sequential Methods & Bandits
Bandit Algorithms · O’Brien–Fleming (OBF) Method · Pocock Method · Sequential Settings · Thompson Sampling (TS) in Bandits (Multi-Armed Bandit Problem (MAB))
See also
Source article Adapted (context, re-expressed) in our own words from: Sequential Probability Ratio Test (SPRT) (insightful-data-lab.com).