480 Optimal Tests of HypothesesAs will be seen presently, uniformly most powerful tests do not always exist.
However, when they do exist, the Neyman–Pearson theorem provides a technique
for finding them. Some illustrative examples are given here.
Example 8.2.2. LetX 1 ,X 2 ,...,Xndenote a random sample from a distribution
that isN(0,θ), where the varianceθis an unknown positive number. It will be
shown that there exists a uniformly most powerful test with significance levelα
for testing the simple hypothesisH 0 :θ=θ′,whereθ′is a fixed positive number,
against the alternative composite hypothesisH 1 :θ>θ′.ThusΩ={θ:θ≥θ′}.
The joint pdf ofX 1 ,X 2 ,...,Xnis
L(θ;x 1 ,x 2 ,...,xn)=(
1
2 πθ)n/ 2
exp{
−1
2 θ∑ni=1x^2 i}
.Letθ′′represent a number greater thanθ′,andletkdenote a positive number. Let
Cbe the set of points whereL(θ′;x 1 ,x 2 ,...,xn)
L(θ′′;x 1 ,x 2 ,...,xn)≤k,that is, the set of points where
(
θ′′
θ′)n/ 2
exp[
−(
θ′′−θ′
2 θ′θ′′)∑n1x^2 i]
≤kor, equivalently,
∑n1x^2 i≥2 θ′θ′′
θ′′−θ′[
n
2log(
θ′′
θ′)
−logk]
=c.The setC={(x 1 ,x 2 ,...,xn):∑n
1 x
2
i≥c}is then a best critical region for testing
thesimplehypothesisH 0 :θ=θ′against the simple hypothesisθ=θ′′.Itremains
to determinec, so that this critical region has the desired sizeα.IfH 0 is true, the
random variable
∑n
1 X
2
i/θ
′has a chi-square distribution withndegrees of freedom.Sinceα=Pθ′(
∑n
1 X2
i/θ′ ≥c/θ′),c/θ′ may be computed, for example, by the
Rcodeqchisq(1−α, n). ThenC ={(x 1 ,x 2 ,...,xn):∑n
1 x2
i ≥c}is a best
critical region of sizeαfor testingH 0 :θ=θ′ against the hypothesisθ=θ′′.
Moreover, for each numberθ′′greater thanθ′, the foregoing argument holds. That
is,C={(x 1 ,...,xn):
∑n
1 x2
i ≥c}is a uniformly most powerful critical region
of sizeαfor testingH 0 :θ=θ′againstH 1 :θ>θ′.Ifx 1 ,x 2 ,...,xndenote
the experimental values ofX 1 ,X 2 ,...,Xn,thenH 0 :θ=θ′ is rejected at the
significance levelα,andH 1 :θ>θ′is accepted if
∑n
1 x2
i≥c;otherwise,H^0 :θ=θ
′is accepted.
If, in the preceding discussion, we taken= 15,α=0.05, andθ′=3,then
the two hypotheses areH 0 :θ=3andH 1 :θ>3. Using R,c/3 is computed by
qchisq(0.95,15) = 24.996. Hence,c=74.988.