States that a variant of the likelihood-ratio test is the uniformly most powerful test among all level- tests when testing simple nulls against simple alternatives. The NP lemma is generalized to monotone likelihood ratio families by the Karlin-Rubin theorem.

Suppose we are testing vs . Consider the likelihood ratio test, which says to reject if where is chosen so that

where / are the distributions under the null/alternative and are their densities. The NP lemma states that this test is UMP.

The NP test is often written as

where is the likelihood ratio and and are chosen that such that . In the continuous case, is unimportant since has probability zero. But it matters in the discrete case (Neyman-Pearson lemma for discrete distributions) where it’s used to ensure that the test has size exactly .

Proof 1

Let denote the likelihood ratio test and denote any other level test. Consider the integral

We claim this integral is lower bounded by zero. If then this is immediate. If then by definition, so the product of both terms in the integral is nonnegative. Likewise, if then both terms are non-positive. The claim follows.

This gives that

since is size and is level , by assumption. Therefore,

which is the desired result.

Proof 2

Turn the problem into a constrained optimization problem using Lagrange multipliers. We want to maximize subject to the constraint that . So we want to maximize

For a given , the test which maximizes this clearly is 1 when and 0 otherwise. And what is ? Given our choice of we have

If we want this to equal clearly we take .