Likelihood Ratios as Martingales
A sequential test gathers observations until its evidence is strong enough to choose between two hypotheses. The likelihood ratio measures how much more compatible the observations are with one hypothesis than the other. Under the null hypothesis, this ratio is a nonnegative martingale; under the alternative, its reciprocal is a nonnegative martingale. Optional stopping turns these identities into bounds on the probabilities of incorrect decisions, provided the stopping rule satisfies suitable conditions.
Let \((\Omega,\mathcal{F},\mathbb{P})\) support observations \(Y_1,Y_2,\ldots\), and let \(\mathbb{P}_0\) and \(\mathbb{P}_1\) denote the laws under hypotheses \(H_0\) and \(H_1\). Write \(\mathcal{F}_n=\sigma(Y_1,\ldots,Y_n)\), with \(\mathcal{F}_0=\{\varnothing,\Omega\}\). Assume that, for every finite \(n\), the restrictions of \(\mathbb{P}_0\) and \(\mathbb{P}_1\) to \(\mathcal{F}_n\) are mutually absolutely continuous. Define the likelihood ratio by \(L_0=1\) and \(L_n=d\mathbb{P}_1|_{\mathcal{F}_n}/d\mathbb{P}_0|_{\mathcal{F}_n}\) for \(n\ge1\).
The type I error probability is \(\mathbb{P}_0(D_1)\); the type II error probability is \(\mathbb{P}_1(D_0)\). For a likelihood-ratio threshold test, assume \(A>1\) and \(0<B<1\), and that the terminal decision satisfies \(L_\tau\ge A\) on \(D_1\) and \(L_\tau\le B\) on \(D_0\). These are assumptions about the actual terminal likelihood ratio, not merely about a threshold that the test intended to use.
Proof. First, \(L_n\) is a martingale under \(\mathbb{P}_0\). Indeed, for \(C\in\mathcal{F}_n\), the definition of the likelihood ratio gives \(\mathbb{E}_0[\mathbf{1}_C L_{n+1}]=\mathbb{P}_1(C)=\mathbb{E}_0[\mathbf{1}_C L_n]\). This identity for every \(C\in\mathcal{F}_n\) is the defining property of \(\mathbb{E}_0[L_{n+1}\mid\mathcal{F}_n]=L_n\). The same density identity with the hypotheses reversed shows that \(1/L_n\) is a martingale under \(\mathbb{P}_1\).
If \(\tau\le N\) for a fixed integer \(N\), write $$ L_\tau=L_0+\sum_{k=1}^{N}\mathbf{1}_{\{\tau\ge k\}}(L_k-L_{k-1}). $$ The event \(\{\tau\ge k\}\) belongs to \(\mathcal{F}_{k-1}\), and the martingale property gives \(\mathbb{E}_0[\mathbf{1}_{\{\tau\ge k\}}(L_k-L_{k-1})]=0\). Taking expectations in the finite sum yields \(\mathbb{E}_0[L_\tau]=1\). Applying the same argument under \(\mathbb{P}_1\) to \(1/L_n\) yields \(\mathbb{E}_1[1/L_\tau]=1\). On \(D_1\), \(L_\tau\ge A\), so \(1\ge\mathbb{E}_0[L_\tau\mathbf{1}_{D_1}]\ge A\mathbb{P}_0(D_1)\). On \(D_0\), \(1/L_\tau\ge1/B\), so \(1\ge\mathbb{E}_1[(1/L_\tau)\mathbf{1}_{D_0}]\ge\mathbb{P}_1(D_0)/B\). These give the two bounds.
For an unbounded, almost surely finite \(\tau\), \(L_{n\wedge\tau}\) converges almost surely to \(L_\tau\). Uniform integrability implies convergence of expectations, so \(\mathbb{E}_0[L_\tau]=\lim_n\mathbb{E}_0[L_{n\wedge\tau}]=1\); each expectation in the limit is \(1\) by the bounded stopping argument. The same reasoning gives \(\mathbb{E}_1[1/L_\tau]=1\). The preceding inequalities then apply unchanged. \(\square\)
For bounded stopping, no additional uniform-integrability check is needed: the stopped process takes values among finitely many integrable random variables. For unbounded stopping, almost-sure finiteness by itself is not the theorem's hypothesis; uniform integrability is one sufficient condition ensuring that the expectation identity survives the limit.
Three Exact Calculations
Worked Example: A Two-Observation Test
Suppose \(Y_1,Y_2\) are independent Bernoulli observations. Under \(\mathbb{P}_0\), each has success probability \(1/2\); under \(\mathbb{P}_1\), each has success probability \(3/4\). Stop at \(\tau=2\), and decide \(H_1\) only if both observations are successes. Find both error probabilities and compare them with likelihood-ratio bounds.
A success contributes likelihood ratio \((3/4)/(1/2)=3/2\), and a failure contributes \((1/4)/(1/2)=1/2\). Thus \(L_2=9/4\) for two successes, \(L_2=3/4\) for one success and one failure, and \(L_2=1/4\) for two failures. The decision event \(D_1\) is exactly the two-success outcome, so the threshold condition holds with \(A=9/4\). The other outcomes have \(L_2\le3/4\), so \(D_0\) satisfies the condition with \(B=3/4\).
Under \(H_0\), the probability of two successes is \((1/2)(1/2)=1/4\). Hence \(\mathbb{P}_0(D_1)=1/4\le1/A=4/9\). Under \(H_1\), the probability of not getting two successes is \(1-(3/4)(3/4)=1-9/16=7/16\). Thus \(\mathbb{P}_1(D_0)=7/16\le B=3/4\).
Check: Under \(\mathbb{P}_0\), the expectation of \(L_2\) is \((1/4)(9/4)+(1/2)(3/4)+(1/4)(1/4)=9/16+6/16+1/16=1\). Under \(\mathbb{P}_1\), the expectation of \(1/L_2\) is \((9/16)(4/9)+(6/16)(4/3)+(1/16)(4)=1/4+1/2+1/4=1\), as required.
Worked Example: A Two-Boundary Sequential Test
Let observations be independent Bernoulli variables, with success probability \(1/3\) under \(\mathbb{P}_0\) and \(2/3\) under \(\mathbb{P}_1\). Each success multiplies \(L_n\) by \(2\), and each failure multiplies it by \(1/2\). Start at \(L_0=1\), and stop the first time \(L_n\ge4\) or \(L_n\le1/4\); choose \(H_1\) at the upper boundary and \(H_0\) at the lower boundary.
To compute the type I error, let \(h\) be the probability under \(\mathbb{P}_0\) of reaching the upper boundary first, starting at likelihood ratio \(1\). A success moves to \(2\): from there, another success reaches \(4\) with probability \(1/3\), while a failure returns to \(1\) with probability \(2/3\). A failure from \(1\) moves to \(1/2\): another failure reaches \(1/4\), while a success returns to \(1\). Therefore $$ h=\frac13\left(\frac13+\frac23h\right)+\frac23\left(\frac13h\right) =\frac19+\frac49h. $$ It follows that \(\frac59h=\frac19\), so \(h=1/5\).
For the type II error, let \(b\) be the probability under \(\mathbb{P}_1\) of reaching the lower boundary first, starting at \(1\). A success, of probability \(2/3\), moves to \(2\); a failure from there returns to \(1\) with probability \(1/3\). A failure from \(1\), of probability \(1/3\), moves to \(1/2\); another failure reaches \(1/4\) with probability \(1/3\), and a success returns to \(1\) with probability \(2/3\). Thus $$ b=\frac23\left(\frac13b\right)+\frac13\left(\frac13+\frac23b\right) =\frac19+\frac49b, $$ so \(b=1/5\) as well.
The stopping time is finite with finite expectation under either hypothesis. From any current likelihood-ratio position, three consecutive successes force the test to stop within those three observations: from \(1/2\), the first success returns to \(1\), and the next two reach \(4\); the other possible positions reach a boundary no later. Under either hypothesis, the probability of three consecutive successes is at least \((1/3)^3=1/27\). Independence therefore gives \(\mathbb{P}_i(\tau>3k)\le(26/27)^k\) for \(i=0,1\), which implies finite expectation. Before stopping, \(L_{n\wedge\tau}\) lies in \(\{1/4,1/2,1,2,4\}\), so the stopped process and its reciprocal are bounded and hence uniformly integrable.
Check: The theorem gives \(\mathbb{P}_0(D_1)\le1/4\) and \(\mathbb{P}_1(D_0)\le1/4\). The computed values are both \(1/5\), and each is at most \(1/4\). The equations also check directly: \(1/9+(4/9)(1/5)=1/9+4/45=9/45=1/5\).
Worked Example: When the Error Bounds Are Tight
Take one Bernoulli observation, with success probability \(1/4\) under \(\mathbb{P}_0\) and \(3/4\) under \(\mathbb{P}_1\). Stop at \(\tau=1\); decide \(H_1\) on success and \(H_0\) on failure. A success has likelihood ratio \((3/4)/(1/4)=3\), while a failure has likelihood ratio \((1/4)/(3/4)=1/3\). Thus the threshold conditions hold with \(A=3\) and \(B=1/3\).
The type I error is \(\mathbb{P}_0(D_1)=1/4=1/A\). The type II error is \(\mathbb{P}_1(D_0)=1/4=B\). Both bounds are attained. The expectation checks are \(\mathbb{E}_0[L_1]=(1/4)(3)+(3/4)(1/3)=3/4+1/4=1\) and \(\mathbb{E}_1[1/L_1]=(3/4)(1/3)+(1/4)(3)=1/4+3/4=1\).
Unbounded Rules and a Common Pitfall
There is also a useful threshold-crossing argument that does not require uniform integrability of the stopped likelihood ratio. Suppose a decision for \(H_1\) requires the process to cross \(A\), and define \(T_A=\inf\{n\ge0:L_n\ge A\}\), with \(\inf\varnothing=\infty\). For each fixed \(n\), \(T_A\wedge n\) is bounded, so \(\mathbb{E}_0[L_{T_A\wedge n}]=1\). Since the stopped value is nonnegative and is at least \(A\) on \(\{T_A\le n\}\), $$ A\mathbb{P}_0(T_A\le n)\le\mathbb{E}_0[L_{T_A\wedge n}]=1. $$ As \(n\) increases, the events \(\{T_A\le n\}\) increase to \(\{T_A<\infty\}\). Continuity of probability for increasing events gives \(\mathbb{P}_0(T_A<\infty)\le1/A\). Applying the same argument to \(1/L_n\) under \(\mathbb{P}_1\) gives \(\mathbb{P}_1(\inf\{n:L_n\le B\}<\infty)\le B\). This argument bounds the probability of ever crossing a boundary; it does not assert that an arbitrary unbounded stopped likelihood ratio has expectation \(1\).
A concrete failure of that assertion comes from the Bernoulli likelihood ratio in the preceding sequential example. Under \(\mathbb{P}_0\), let \(\tau\) be the first time \(L_n\le1/2\), with no upper boundary. The log-likelihood increments are \(\log 2\) with probability \(1/3\) and \(-\log 2\) with probability \(2/3\); their mean is \(-(\log 2)/3<0\). By the strong law of large numbers, the log likelihood eventually falls below \(-\log 2\), so \(\tau<\infty\) almost surely. Because the process moves in factors of \(2\), \(L_\tau=1/2\) exactly, and therefore \(\mathbb{E}_0[L_\tau]=1/2\), not \(1\). The stopped sequence is not uniformly integrable. The incorrect calculation “\(\mathbb{E}_0[L_\tau]=\mathbb{E}_0[L_0]=1\) by optional stopping” omits a necessary stopping condition.
The distinction matters in practice. Bounded tests automatically satisfy the required expectation identities, and unbounded tests can use them when the stopped likelihood ratios are uniformly integrable. When that condition is unavailable, a direct first-crossing bound may still control the probability of a boundary error. In either case, verify which event constitutes the error and which likelihood-ratio inequality holds on that event before applying a bound.
Check Your Understanding
For each question, state the measure under which the likelihood ratio or its reciprocal is a martingale.
- In a bounded test with upper threshold \(A=5\), what bound does the theorem give for \(\mathbb{P}_0(D_1)\)?
- If \(B=1/6\) and the lower-threshold decision is made only when \(L_\tau\le B\), what bound applies to \(\mathbb{P}_1(D_0)\)?
- Why does a bounded stopping time make the stopped likelihood-ratio process uniformly integrable?
- In the two-boundary Bernoulli test, check the type I error equation by substituting \(h=1/5\).
- Why does almost-sure finiteness of an unbounded stopping time not by itself justify \(\mathbb{E}_0[L_\tau]=1\)?