The Neyman-Pearson
Lemma
Discover the optimal strategy for choosing between two hypotheses: how the likelihood ratio unlocks the most powerful test at any significance level.
The Hypothesis Testing Framework
In statistical inference, we often face a decision between two competing claims about a population parameter. We formalize this as a choice between a null hypothesis \(H_0\) and an alternative hypothesis \(H_1\).
Two Types of Error
Any test can make two kinds of mistakes. The Neyman-Pearson framework treats these errors asymmetrically: we fix the probability of one and minimize the other.
Size, Power, and the Rejection Region
The Likelihood Ratio
The key insight is to compare how likely the observed data is under each hypothesis. The likelihood ratio for an observation \(x\) is:
When \(\Lambda(x)\) is large, the data are much more consistent with \(H_1\) than with \(H_0\): strong evidence against \(H_0\). The Neyman-Pearson Lemma tells us that rejecting when \(\Lambda(x)\) exceeds a threshold is the optimal strategy.
Formal Statement: Neyman-Pearson Lemma
This test is called the most powerful (MP) test of size \(\alpha\). No other test at the same significance level can achieve higher power against \(\theta_1\).
What "Most Powerful" Means
Both regions \(R^*\) and \(R'\) have the same size \(\alpha\) (same area under the \(H_0\) curve). But the NP region \(R^*\) captures more area under the \(H_1\) curve, giving higher power. Any other region with the same \(\alpha\) necessarily has lower power.
Simple vs Composite Hypotheses
The Neyman-Pearson Lemma applies directly to simple vs simple tests. Understanding this distinction is critical.
| Simple Hypothesis | Composite Hypothesis | |
|---|---|---|
| Definition | Specifies a single value: \(\theta = \theta_0\) | Specifies a set of values: \(\theta \in \Theta_0\) |
| Example | \(H_0\!: \mu = 5\) | \(H_1\!: \mu > 5\) |
| NP Lemma | Directly applies | Requires extension (UMP tests) |
| Likelihood ratio | Single well-defined \(\Lambda(x)\) | \(\Lambda(x)\) depends on which \(\theta_1\) |
How to Apply the Lemma
Example 1: Normal Mean
Let \(X_1, \ldots, X_n \overset{iid}{\sim} N(\mu, \sigma^2)\) with \(\sigma^2\) known. Test \(H_0\!: \mu = \mu_0\) vs \(H_1\!: \mu = \mu_1\), where \(\mu_1 \gt \mu_0\).
Example 1: Visualized
The rejection region lies in the right tail: exactly where the \(H_1\) density is largest relative to the \(H_0\) density. The \(\alpha\) area under the green curve equals the significance level. The shaded area under the red curve equals the power.
Example 2: Exponential Rate
Let \(X_1, \ldots, X_n \overset{iid}{\sim} \text{Exp}(\lambda)\) with density \(f(x \mid \lambda) = \lambda e^{-\lambda x}\). Test \(H_0\!: \lambda = 1\) vs \(H_1\!: \lambda = 2\).
The MP test rejects \(H_0\) when \(\sum X_i \lt c\): short total lifetimes suggest a higher rate \(\lambda = 2\).
Example 3: Bernoulli Proportion
Let \(X_1, \ldots, X_n \overset{iid}{\sim} \text{Bernoulli}(p)\). Test \(H_0\!: p = 0.3\) vs \(H_1\!: p = 0.6\).
Randomized Tests
For discrete distributions, we may not be able to achieve size exactly \(\alpha\) with a deterministic rule. The NP lemma allows a randomized test on the boundary:
Here \(\phi(x)\) is the probability of rejecting \(H_0\) given observation \(x\). When \(\Lambda(x) = k\), we reject with probability \(\gamma\) (flip a biased coin). In continuous settings, \(P(\Lambda(X) = k) = 0\), so randomization is unnecessary.
Why It Works: Proof Intuition
Common Mistakes
Summary and Connections
| Concept | NP Lemma | UMP Test | Generalized LRT |
|---|---|---|---|
| Hypotheses | Simple vs Simple | Simple vs Composite | Composite vs Composite |
| Optimality | MP guaranteed | MP for all \(\theta_1 \in \Theta_1\) | Asymptotically optimal |
| Test statistic | \(\Lambda(x) = f_1/f_0\) | Same, if monotone LR | \(\lambda(x) = \sup_{\Theta_0} L / \sup_\Theta L\) |
| Existence | Always exists | May not exist | Always computable |
| Key condition | Both \(H\) simple | Monotone likelihood ratio | Large sample / regularity |
Question 1 of 5
The Neyman-Pearson Lemma guarantees an optimal test for which type of hypothesis testing problem?
Question 2 of 5
In the NP framework, the most powerful test rejects \(H_0\) when the likelihood ratio \(\Lambda(x) = f(x \mid \theta_1)/f(x \mid \theta_0)\) satisfies which condition?
Question 3 of 5
For \(X_1, \ldots, X_n \overset{iid}{\sim} N(\mu, \sigma^2)\) with \(\sigma^2\) known, the NP test of \(H_0\!: \mu = 0\) vs \(H_1\!: \mu = 2\) rejects when:
Question 4 of 5
Why might a Neyman-Pearson test require randomization?
Question 5 of 5
A test is called Uniformly Most Powerful (UMP) if: