= Randomized statistical test
{title2=$\phi(x)\in[0,1]$}
A <randomized statistical test> specifies a measurable rejection <probability> $\phi(x)$ for each possible data value. It can be implemented by rejecting when an independent <uniform random variable> $U$ on $(0,1)$ satisfies $U<\phi(x)$. A deterministic test has only the values zero and one. Under a <simple hypothesis> $H_j$, its rejection <probability> is $\mathbb E_j\phi(X)$, which is its <test size> for $j=0$ and its <statistical power> for $j=1$.
The <Neyman-Pearson lemma> permits randomization on an equality set of the form $f_1(x)=kf_0(x)$ to reach a prescribed <test size>. Continuous observations do not rule out an equality set of positive <probability>: if both hypotheses give the same <probability density function>, their <likelihood ratio> is identically one. This explains why a precise statement of the lemma includes boundary randomization even for continuous data.
Back to article page