2.4 Testing Hypotheses

2.4.1 Null hypothesis vs. alternative hypothesis

https://en.wikipedia.org/wiki/Test_statistic

2.4.2 The Neyman-Pearson Lemma

Consider a hypothesis test with null hypothesis H0 and alternative hypothesis H1. Let X be a random variable with probability density function (or probability mass function) f(x;θ0) under H0 and f(x;θ1) under H1. Let T be a test statistic, and let C be the critical region (rejection region) of the test. The Neyman-Pearson Lemma states that the most powerful test of size α is given by the likelihood ratio test, which rejects H0 if

f(x;θ1)f(x;θ0)>k

where k is a constant chosen such that the probability of type I error is equal to α, i.e.,

P(XC|θ=θ0)=α.

Equivalently, the most powerful test can also be expressed as rejecting H0 if

logf(x;θ1)f(x;θ0)>logk=c

where c is a constant.

If the likelihood ratio is such that f(x;θ1)f(x;θ0)=k on a set of probability zero under H0 and H1, then the test is still most powerful. If the likelihood ratio is always constant, then no test is more powerful than any other.