Theoremcore
Neyman-Pearson lemma
Also called Neyman-Pearson fundamental lemma.
For a simple null against a simple alternative, the test that rejects when the likelihood ratio exceeds a threshold is the most powerful test of its size.
The Neyman-Pearson lemma solves the simplest testing problem completely. The data come from one of two fully specified distributions, under the null and under the alternative, and the lemma says that the most powerful test at level rejects when the likelihood ratio is above a threshold, with randomization at the threshold when the data are discrete. It also says that such a test exists for every , and that every most powerful test has this form, except on the set where the ratio equals the threshold. It is the base of the theory of optimal tests: uniformly most powerful tests, the Karlin-Rubin theorem and unbiased tests all start from it.
Statement
Let take values in a set , and let and be its densities under and , with respect to a common measure . For discrete data is the counting measure and the integrals below are sums. For continuous data is the Lebesgue measure. A common measure always exists, for example . Both hypotheses are simple: each names a single distribution.
A test is a measurable function . On the data , the test rejects with probability . A non-randomized test takes only the values 0 and 1. The size of is , its power is , and has level when its size is at most . A test is most powerful at level when no other test of level has more power.
Theorem (Neyman and Pearson, 1933). Let .
- Sufficiency. Let , and let be a test with and
with any value in on the set . Then is most powerful at level . For , the test if and otherwise (the case ) is also most powerful at level 0. 2. Existence. For every there is a test of the form in part 1, with a constant value on the set . For the test with is allowed. 3. Necessity. Let be most powerful at level , and let and be as in part 2. Then -almost everywhere on the set . Also, has size exactly , unless some test of size less than has power 1.
Corollary. Let , and let be the power of the most powerful level- test. Then , and unless .
The ratio is the likelihood ratio of the likelihood function, so the test of part 1 is a likelihood ratio test in the original sense. The likelihood ratio test for composite hypotheses is a different procedure that only borrows the idea.
In plain words
Two stories could explain your data, and each story says exactly how likely every possible outcome is. You must pick the outcomes where you will reject the first story. You can afford only a fixed total chance of rejecting it when it is true, and you want the largest possible chance of rejecting it when the second story is true. Think of a budget. Each outcome costs its chance under the first story and pays its chance under the second. The best plan is to buy outcomes in the order of their pay per cost, which is the likelihood ratio, until the budget runs out. If the budget runs out in the middle of an outcome, you buy part of it by flipping a biased coin. No other plan pays more.
Proof
All integrals are with respect to , and the argument is often dropped.
Part 1, sufficiency. Let be any test of level , so . We show that
If , then , so both factors are nonnegative. If , then , so both factors are nonpositive. If , the second factor is 0. Integrate the inequality:
because and . So .
For the case and , let be any test with . Then almost everywhere on , so .
Part 2, existence. For , the test with has size . Let now . Under , the set has probability 0, so the ratio is defined with probability 1. For put
The function is nonincreasing and continuous from the right, because it is one minus a distribution function. By Markov's inequality, , since . So as , and the number
is finite. By right continuity, . Next, : if the left side is 1, and if then for each , and . So . Put
Then . Let on , on and on . The set has -probability 0, so
In the second case of this holds because forces , so .
Part 3, necessity. Let be most powerful at level and let , be the test of part 2. First take . Let . By the case analysis of part 1, applied with , the product is nonnegative everywhere, and it is strictly positive on . If , then
so has more power than , which contradicts the choice of . So .
For the size, suppose . Both tests are most powerful, so , and the integral of the nonnegative product is
This forces . With , on , so , and is a test of size less than with power 1.
For , and has level 0, so almost everywhere on , where . On , if on a set of positive -measure, then , against the choice of . So almost everywhere on in this case too.
Proof of the corollary. The constant test has size and power , so . Suppose . Then is most powerful, and by part 3 it equals 0 or 1 almost everywhere on . It takes neither value, so , that is almost everywhere. Both are densities, so integration gives , and then .
Consequences
- The test depends on the data only through the likelihood ratio. If is a sufficient statistic, the factorization makes the ratio a function of , so the most powerful test is a function of .
- The normal mean. Let be iid with known, and test against with . The log of the ratio is , which increases in . So the most powerful test rejects when , and the size condition gives , with the lower -quantile of . This is the one-sided z-test. With , , , and , the test rejects when , and its power is .
- From one alternative to many. In the normal example the rejection region does not depend on , only on its sign. So the same test is most powerful against every , and it is a uniformly most powerful test. The Karlin-Rubin theorem turns this observation into a theorem for families with a monotone likelihood ratio.
- A linear program. The problem "maximize subject to and " is a linear program in , a continuous knapsack problem. The lemma says that the greedy order by the ratio of value to cost is optimal, and the threshold is the Lagrange multiplier of the size constraint. On a finite sample space, every extreme point of the feasible set of tests with size exactly is 0 or 1 at every point except at most one.
- Bayes tests. With prior weights on the two hypotheses, the test that minimizes rejects when . It has the form of part 1 with , so every Bayes test is most powerful at its own size. The ratio is the Bayes factor of two simple hypotheses.
- Sequential and anytime tests. Wald's sequential probability ratio test applies the same ratio to data that arrive one at a time. Under the ratio has expectation at most 1, so it is an e-variable.
- Generalizations. The generalized lemma (Lehmann and Romano, Theorem 3.6.1) maximizes subject to integral constraints. It gives the uniformly most powerful unbiased tests of exponential families.
Tightness
Randomization is needed for discrete data. Let take the values 1, 2, 3, 4 with
and let . The ratios are . The most powerful test rejects at (size 0.1). The budget left is , so at , with , it rejects with probability . The threshold is . The size is exactly , and the power is . The non-randomized tests of level reject on , or , and the best of them, , has power only . An enumeration over the extreme points of the linear program of the previous section gives the same optimum, , in exact arithmetic. A non-randomized test of the form of part 1 is most powerful only at its own size, which here is one of the attainable values .
The set where the ratio equals . Part 3 says nothing about on , and it cannot. In the example above, any test that rejects at and spends of size at is most powerful. If two points tie at the threshold, the size left can be split between them in any proportion.
Simple hypotheses only. The proof uses one density for each hypothesis. Against the two-sided alternative of the normal example, the most powerful test against rejects for large , and the most powerful test against rejects for small . No single test is most powerful against both, so no uniformly most powerful test exists. For a composite null, the lemma applies to a least favorable distribution on the null (Lehmann and Romano, Chapter 3), which is not always easy to find.
The power can equal the size. The corollary needs . If the two distributions are equal, every test has power equal to its size, and the data carry no information.
History
Neyman and Pearson introduced the likelihood ratio criterion in 1928, as a principle for choosing a test. In their 1933 paper "On the problem of the most efficient tests of statistical hypotheses", they posed the problem of the best critical region of given size for a simple hypothesis against a simple alternative, and they proved that the region where the ratio of the two likelihoods exceeds a constant is the solution. They also showed that the same region can be best against a whole class of alternatives, which led to the uniformly most powerful tests. The statement used today, with randomized tests and with the three parts of existence, sufficiency and necessity, is the one of Lehmann's book Testing Statistical Hypotheses (1959). Dantzig and Wald (1951) gave the measure-theoretic form of the generalized lemma, and the connection with linear programming made it a standard example of duality.
References
- George Casella and Roger L. Berger, Statistical Inference, second edition, Duxbury, 2002, Section 8.3.2, Theorem 8.3.12 (the Neyman-Pearson lemma) and the corollary after it (the form in terms of a sufficient statistic)
- E. L. Lehmann and Joseph P. Romano, Testing Statistical Hypotheses, third edition, Springer, 2005, Section 3.2, Theorem 3.2.1 (existence, sufficiency and necessity, with randomized tests) and Corollary 3.2.1 (the power exceeds the size); Section 3.6, Theorem 3.6.1 (the generalized lemma)
- Jerzy Neyman and Egon S. Pearson, On the problem of the most efficient tests of statistical hypotheses, Philosophical Transactions of the Royal Society of London, Series A 231 (1933), pages 289 to 337, the most efficient critical region for a simple hypothesis against a simple alternative
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 8G9YHV Edit this page History Report an error Markdown