---
tag: 4F0N5J5QT2
kind: statement
role: theorem
name: Wald–Wolfowitz optimality of the sequential probability ratio test
msc: [62L10, 62L15]
uses: [SXR93CAP1R, 9CWYNB9003, 00MRN0FARV, WND87FBAKC, 03N8C8ZR4B, 0WQNRCNY3M, 0EE19CFEEF]
about: [SXR93CAP1R]
sources:
  - url: https://en.wikipedia.org/wiki/Sequential_probability_ratio_test
---

## Statement

Let $X_1, X_2, \dots$ be [[independent and identically distributed|00MRN0FARV]] observations with density $f$, and test $H_0 \colon f = f_0$ against $H_1 \colon f = f_1$, where $f_0$ and $f_1$ are distinct densities.
Let $S$ be the [[sequential probability ratio test|SXR93CAP1R]] with boundaries $0 < A < 1 < B$.
Let $N$ be its sample size, and let $\alpha = P_0(S \text{ rejects } H_0)$ and $\beta = P_1(S \text{ accepts } H_0)$ be its [[error probabilities|03N8C8ZR4B]].
Let $S'$ be any [[sequential procedure|9CWYNB9003]] for the same hypotheses with sample size $N'$ and error probabilities $\alpha' \le \alpha$ and $\beta' \le \beta$.
Then
$$E_0[N] \le E_0[N'] \quad \text{and} \quad E_1[N] \le E_1[N'],$$
where $E_i$ is the [[expectation|0WQNRCNY3M]] when $f = f_i$.

## Remarks

The proof is Bayesian.
Fix a prior probability of $H_1$, a cost per observation and losses for wrong decisions.
The Bayes sequential procedure is then an optimal stopping rule, and it has the form of an SPRT on the posterior odds.
One shows that every SPRT with $A < 1 < B$ is Bayes for suitable priors and costs.
Comparing the Bayes risks of $S$ and $S'$ over a range of priors and costs for which $S$ is Bayes then gives both inequalities.
The theorem was proved by Wald and Wolfowitz in 1948.
The optimality holds only at the two simple hypotheses.
For a composite family of distributions, the expected sample size of an SPRT can be large at parameter values between $f_0$ and $f_1$.

## Explanations

### L1 human

The SPRT stops as soon as the evidence is clear enough.
This theorem says that no other method with the same or smaller chances of error can do better on average, whichever of the two hypotheses is true.
So the SPRT is the most economical test for choosing between two fully specified explanations of the data.

### L2 human

Fixed-sample tests, such as those from the [[Neyman–Pearson lemma|0EE19CFEEF]], optimize power for a given sample size.
The SPRT optimizes the opposite quantity: the expected [[stopping time|WND87FBAKC]] for given error probabilities.
In practice the SPRT often needs far fewer observations on average than the best fixed-sample test with the same error rates.
The theorem is the starting point of optimal stopping methods in sequential statistics.
