A binary test is a bounded measurable decision function. Probability measures act on tests linearly, so testing is naturally expressed through the dual pairing between \(L^1\) densities and \(L^\infty\) functions. This viewpoint connects Neyman–Pearson optimality, total variation, Markov kernels, and comparison of experiments.
Randomized tests and power functions
Definition. A randomized test is a measurable \[ \varphi:\mathcal X\to[0,1]. \] Conditional on \(X=x\), the null is rejected with probability \(\varphi(x)\). Its power function is \[ \beta_\varphi(\theta)=P_\theta\varphi. \] For \(H_0:\theta\in\Theta_0\), its size is \[ \alpha(\varphi)=\sup_{\theta\in\Theta_0}P_\theta\varphi. \]
Indicator tests \(1_C\) are nonrandomized. Intermediate values are needed to hit an exact level when the likelihood ratio has an atom at the critical threshold.
The \(L^1\)–\(L^\infty\) pairing
Definition. In a dominated experiment \(P_\theta\ll\mu\), write \(p_\theta=\mathrm{d}P_\theta/\mathrm{d}\mu\in L^1(\mu)\). A test represents an element of the order interval \[ \mathcal T=\{\varphi\in L^\infty(\mu):0\leq\varphi\leq1\}, \] and \[ P_\theta\varphi = \langle p_\theta,\varphi\rangle = \int p_\theta(x)\varphi(x)\,\mu(\mathrm{d}x). \]
Size constraints and power objectives are affine in \(\varphi\). A simple-versus-simple testing problem is therefore an infinite-dimensional linear program over the weak-star compact convex set \(\mathcal T\).
The Neyman–Pearson lemma
Theorem. Let \(P_0,P_1\) have densities \(p_0,p_1\) with respect to \(\mu=P_0+P_1\). Choose \(c\geq0\) and \(\gamma\in[0,1]\) so that \[ \varphi^* = 1\{p_1>cp_0\} +\gamma1\{p_1=cp_0\} \] satisfies \(P_0\varphi^*=\alpha\), whenever exact equality is attainable. Then every test \(\varphi\) with \(P_0\varphi\leq\alpha\) satisfies \[ P_1\varphi\leq P_1\varphi^*. \]
Proof. Pointwise, \[ (\varphi-\varphi^*)(p_1-cp_0)\leq0: \] where \(p_1>cp_0\), \(\varphi^*=1\); where \(p_1<cp_0\), \(\varphi^*=0\); and the product vanishes on equality. Integrating, \[ P_1(\varphi-\varphi^*) \leq cP_0(\varphi-\varphi^*) \leq0. \] \(\square\)
The function \(p_1-cp_0\) is a separating normal: the test takes the extreme value \(1\) where the normal is positive and \(0\) where it is negative. Boundary randomization enforces the affine size constraint.
Corollary (Bayes test). Under prior probabilities \(\pi_0,\pi_1\) and losses \(c_{10}\) for false rejection and \(c_{01}\) for false acceptance, reject precisely when \[ \frac{p_1(x)}{p_0(x)} > \frac{\pi_0c_{10}}{\pi_1c_{01}}, \] with arbitrary optimal randomization on equality.
Total variation as optimal distinguishability
Theorem. For probability measures \(P,Q\), \[ \|P-Q\|_{\mathrm{TV}} := \sup_A|P(A)-Q(A)| = \sup_{0\leq\varphi\leq1}|P\varphi-Q\varphi| = \frac12\int|p-q|\,\mathrm{d}\mu, \] where \(\mu=P+Q\).
Proof. Let \(\nu=P-Q\) and write its Jordan decomposition \(\nu=\nu^+-\nu^-\). Since \(\nu(\mathcal X)=0\), \(\nu^+(\mathcal X)=\nu^-(\mathcal X)\). For \(0\leq\varphi\leq1\), \[ \nu\varphi \leq\nu^+\varphi\leq\nu^+(\mathcal X), \] and equality is attained by the indicator of a positive Hahn set, equivalently \(\{p>q\}\). Finally, \[ \nu^+(\mathcal X)=\frac12\int|p-q|\,\mathrm{d}\mu. \] Apply the same argument to \(-\nu\). \(\square\)
Corollary (minimum testing error). Under equal prior probabilities and \(0\)-\(1\) loss, the smallest average error in testing \(P\) against \(Q\) is \[ \frac12\{1-\|P-Q\|_{\mathrm{TV}}\}. \]
Tests of mixtures and convex hypotheses
For composite hypotheses, priors \(\Pi_0,\Pi_1\) produce mixture laws \[ P_{\Pi_j}=\int P_\theta\,\Pi_j(\mathrm{d}\theta). \] Neyman–Pearson applied to \(P_{\Pi_0}\) and \(P_{\Pi_1}\) gives a Bayes test. Least favorable priors turn this Bayes solution into a minimax one when the corresponding risk equalizes appropriately. Thus the convexification of hypotheses by mixtures is not cosmetic; it generates supporting hyperplanes for the testing risk set.
Adjoints of Markov kernels
Proposition. A Markov kernel \(K:\mathcal X\rightsquigarrow\mathcal Y\) acts on measures by \(P\mapsto PK\) and on bounded decision functions by \[ K^*\varphi(x)=\int_{\mathcal Y}\varphi(y)K(x,\mathrm{d}y). \] These actions are adjoint: \[ (PK)\varphi=P(K^*\varphi). \] Moreover, \(0\leq\varphi\leq1\) implies \(0\leq K^*\varphi\leq1\).
Proof. The identity is Tonelli's theorem: \[ \int\varphi(y)(PK)(\mathrm{d}y) = \int P(\mathrm{d}x)\int\varphi(y)K(x,\mathrm{d}y). \] Positivity and preservation of constants follow because \(K(x,\cdot)\) is a probability measure. \(\square\)
Corollary (data processing for total variation). \[ \|PK-QK\|_{\mathrm{TV}} \leq\|P-Q\|_{\mathrm{TV}}. \]
Indeed, every test after the transition pulls back to a valid test before it. Randomized post-processing cannot increase distinguishability.