Type I error Rejecting H0 when it is true. The significance level is α=P(type I error).
Type II error Accepting H0 when it is false, β=P(type II error). The power is P(rejecting H0 when false)=1−β.
The test statistic and the rejection region (the values for which H0 is rejected) define the test. The distribution of the test statistic under H0 is the null distribution.
The p-value is the smallest significance level at which H0 would be rejected for the observed Tobs, e.g. P(Xˉ≥Tobs∣H0) for a rejection region Xˉ>c.
A hypothesis is simple if it specifies the distribution completely.
Neyman-Pearson
For simple H0 and HA, the likelihood ratio test rejects H0 when
Λ=f(X1,…,Xn∣HA)f(X1,…,Xn∣H0)<c
with c chosen for significance level α. Any other test with significance level ≤α has power ≤ that of this test. For a composite HA, a test that is most powerful against every simple hypothesis in HA is uniformly most powerful.
Normal mean with known varianceH0:μ=μ0 against HA:μ=μa>μ0. The likelihood ratio test rejects for Xˉ>C~, and under H0, Xˉ∼N(μ0,nσ2), so
P[σ/nXˉ−μ0>σ/nC~−μ0H0]=α⟹reject if Xˉ>μ0+zαnσ
with P(Z≥zα)=α. This does not depend on μa, only on μa>μ0, so the test is uniformly most powerful for the composite HA:μ>μ0. Its power at μa is
P(Xˉ>μ0+zαnσμa)=P(Z>zα−σ(μa−μ0)n)→1 as n→∞
Generalized Likelihood Ratio
Λ=maxθ∈Ωlik(θ)maxθ∈ω0lik(θ)
and reject H0 for Λ<c. Let dim be the number of free parameters.
Wilks For regular f(x1,…,xn∣θ) and dimΩ−dimω0=k, under H0
−2logΛdχk2
Two-sided normal mean with known varianceH0:μ=μ0 against μ=μ0. Here
−2logΛ=[σ/nXˉ−μ0]2
so rejecting for −2logΛ>c means P[σ/nXˉ−μ0>c∣H0]+P[σ/nXˉ−μ0<−c∣H0]=α, i.e. reject if
Xˉ<μ0−zα/2nσorXˉ>μ0+zα/2nσ
For normal data, μ^MLE=Xˉ and σ^MLE2=n1∑i=1n(Xi−Xˉ)2, and σ^MLE2=n1∑i=1n(Xi−μ0)2 when μ=μ0 is known.