# Neyman–Pearson lemma

(Redirected from Neyman-Pearson lemma)

In statistics, the Neyman–Pearson lemma, named after Jerzy Neyman and Egon Pearson, states that when performing a hypothesis test between two simple hypotheses H0θ = θ0 and H1θ = θ1, the likelihood-ratio test which rejects H0 in favour of H1 when

${\displaystyle \Lambda (x)={\frac {L(x\mid \theta _{0})}{L(x\mid \theta _{1})}}\leq \eta }$

where

${\displaystyle P(\Lambda (X)\leq \eta \mid H_{0})=\alpha }$

is the most powerful test at significance level α for a threshold η. If the test is most powerful for all ${\displaystyle \theta _{1}\in \Theta _{1}}$, it is said to be uniformly most powerful (UMP) for alternatives in the set ${\displaystyle \Theta _{1}\,}$.

In practice, the likelihood ratio is often used directly to construct tests — see Likelihood-ratio test. However it can also be used to suggest particular test-statistics that might be of interest or to suggest simplified tests — for this, one considers algebraic manipulation of the ratio to see if there are key statistics in it related to the size of the ratio (i.e. whether a large statistic corresponds to a small ratio or to a large one).

## Proof

Define the rejection region of the null hypothesis for the NP test as

${\displaystyle R_{NP}=\left\{x:{\frac {L(x|\theta _{0})}{L(x|\theta _{1})}}\leqslant \eta \right\}}$

where ${\displaystyle \eta }$ is chosen so that ${\displaystyle P(R_{NP},\theta _{0})=\alpha .}$

Any other test will have a different rejection region that we define as ${\displaystyle R_{A}}$. Furthermore, define the probability of the data falling in region ${\displaystyle R,}$ given parameter ${\displaystyle \theta }$ as

${\displaystyle P(R,\theta )=\int _{R}L(x|\theta )\,dx.}$

For the test with critical region ${\displaystyle R_{A}}$ to have level ${\displaystyle \alpha }$, it must be true that ${\displaystyle \alpha \geqslant P(R_{A},\theta _{0})}$, hence

${\displaystyle \alpha =P(R_{NP},\theta _{0})\geqslant P(R_{A},\theta _{0}).}$

It will be useful to break these down into integrals over distinct regions:

{\displaystyle {\begin{aligned}P(R_{NP},\theta )&=P(R_{NP}\cap R_{A},\theta )+P(R_{NP}\cap R_{A}^{c},\theta )\\P(R_{A},\theta )&=P(R_{NP}\cap R_{A},\theta )+P(R_{NP}^{c}\cap R_{A},\theta )\end{aligned}}}

Setting ${\displaystyle \theta =\theta _{0}}$, these two expressions and the above inequality yield that

${\displaystyle P(R_{NP}\cap R_{A}^{c},\theta _{0})\geqslant P(R_{NP}^{c}\cap R_{A},\theta _{0}).}$

Comparing the powers of the two tests, ${\displaystyle P(R_{NP},\theta _{1})}$ and ${\displaystyle P(R_{A},\theta _{1})}$, one can see that

${\displaystyle P(R_{NP},\theta _{1})\geqslant P(R_{A},\theta _{1})\iff P(R_{NP}\cap R_{A}^{c},\theta _{1})\geqslant P(R_{NP}^{c}\cap R_{A},\theta _{1}).}$

We show that the left hand inequality holds: Now by the definition of ${\displaystyle R_{NP}}$,

{\displaystyle {\begin{aligned}P(R_{NP}\cap R_{A}^{c},\theta _{1})&=\int _{R_{NP}\cap R_{A}^{c}}L(x|\theta _{1})\,dx\\[4pt]&\geqslant {\frac {1}{\eta }}\int _{R_{NP}\cap R_{A}^{c}}L(x|\theta _{0})\,dx&&{\text{Definition of }}R_{NP}\\[4pt]&={\frac {1}{\eta }}P(R_{NP}\cap R_{A}^{c},\theta _{0})&&{\text{Definition of }}P(R,\theta )\\[4pt]&\geqslant {\frac {1}{\eta }}P(R_{NP}^{c}\cap R_{A},\theta _{0})\\[4pt]&={\frac {1}{\eta }}\int _{R_{NP}^{c}\cap R_{A}}L(x|\theta _{0})\,dx\\[4pt]&\geqslant \int _{R_{NP}^{c}\cap R_{A}}L(x|\theta _{1})\,dx\\[4pt]&=P(R_{NP}^{c}\cap R_{A},\theta _{1})\end{aligned}}}

## Example

Let ${\displaystyle X_{1},\dots ,X_{n}}$ be a random sample from the ${\displaystyle {\mathcal {N}}(\mu ,\sigma ^{2})}$ distribution where the mean ${\displaystyle \mu }$ is known, and suppose that we wish to test for ${\displaystyle H_{0}:\sigma ^{2}=\sigma _{0}^{2}}$ against ${\displaystyle H_{1}:\sigma ^{2}=\sigma _{1}^{2}}$. The likelihood for this set of normally distributed data is

${\displaystyle L\left(\mathbf {x} \mid \sigma ^{2}\right)\propto \left(\sigma ^{2}\right)^{-n/2}\exp \left\{-{\frac {\sum _{i=1}^{n}(x_{i}-\mu )^{2}}{2\sigma ^{2}}}\right\}.}$

We can compute the likelihood ratio to find the key statistic in this test and its effect on the test's outcome:

${\displaystyle \Lambda (\mathbf {x} )={\frac {L(\mathbf {x} \mid \sigma _{0}^{2})}{L(\mathbf {x} \mid \sigma _{1}^{2})}}=\left({\frac {\sigma _{0}^{2}}{\sigma _{1}^{2}}}\right)^{-n/2}\exp \left\{-{\frac {1}{2}}(\sigma _{0}^{-2}-\sigma _{1}^{-2})\sum _{i=1}^{n}(x_{i}-\mu )^{2}\right\}.}$

This ratio only depends on the data through ${\displaystyle \sum _{i=1}^{n}(x_{i}-\mu )^{2}}$. Therefore, by the Neyman–Pearson lemma, the most powerful test of this type of hypothesis for this data will depend only on ${\displaystyle \sum _{i=1}^{n}(x_{i}-\mu )^{2}}$. Also, by inspection, we can see that if ${\displaystyle \sigma _{1}^{2}>\sigma _{0}^{2}}$, then ${\displaystyle \Lambda (\mathbf {x} )}$ is a decreasing function of ${\displaystyle \sum _{i=1}^{n}(x_{i}-\mu )^{2}}$. So we should reject ${\displaystyle H_{0}}$ if ${\displaystyle \sum _{i=1}^{n}(x_{i}-\mu )^{2}}$ is sufficiently large. The rejection threshold depends on the size of the test. In this example, the test statistic can be shown to be a scaled Chi-square distributed random variable and an exact critical value can be obtained.

## Application in economics

A variant of the Neyman–Pearson lemma has found an application in the seemingly-unrelated domain of economy with land. One of the fundamental problems in consumer theory is calculating the demand function of the consumer given the prices. In particular, given a heterogeneous land-estate, a price measure over the land, and a subjective utility measure over the land, the consumer's problem is to calculate the best land parcel that he can buy – i.e, the land parcel with the largest utility, whose price is at most his budget. It turns out that this problem is very similar to the problem of finding the most powerful statistical test, and so the Neyman–Pearson lemma can be used.[1]