Chernoff–Stein Lemma for Binary Hypothesis Testing

proved in Lean

When deciding between distributions P and Q from n samples while keeping the chance of wrongly rejecting P fixed, the best chance of wrongly accepting P decays like 2 to the power minus n D(P||Q). KL divergence is the exact testing exponent.

Herman Chernoff; Charles Stein (1952) · Ch. 11 · Method of Types & Statistics · Cover & Thomas, Theorem 11.8.3

Statement

When testing $H_0 : P^n$ against $H_1 : Q^n$ ($P \ll Q$) at any fixed Type-I error threshold $\varepsilon \in (0, 1)$, the optimal Type-II error probability $\beta_n^*(\varepsilon)$ satisfies $$\lim_{n \to \infty} -\frac{1}{n}\log_2 \beta_n^*(\varepsilon) = D(P \| Q):$$

How the proof works

Achievability uses the relative-entropy typical set relEntTypicalSet with a finite-sum Chebyshev bound; the strong converse intersects any acceptance set $A_n$ with relEntTypicalSet so $P^n(A_n \cap B_n) \ge (1 - \varepsilon)/2$ and transfers mass to $Q^n$ via the pointwise likelihood ratio bound; the finite-$n$ weak converse uses deterministic-map DPI (klDivergence_map_le).

Lean declarations (5)

The key theorems in the Lean library. Each is compiled with Lean 4, uses only the standard axioms propext, Classical.choice and Quot.sound, and is re-checked by leanchecker. Click a name to see the full proof on GitHub.

Related open problems (3)

Open problems that build on, generalize, or are analogous to this theorem.