8.1. Most Powerful Tests 475
Example 8.1.2.LetX′=(X 1 ,...,Xn) denote a random sample from the distri-
bution that has the pdf
f(x;θ)=
1
√
2 π
exp
(
−
(x−θ)^2
2
)
, −∞<x<∞.
It is desired to test the simple hypothesisH 0 :θ=θ′= 0 against the alternative
simple hypothesisH 1 :θ=θ′′=1. Now
L(θ′;x)
L(θ′′;x)
=
(1/
√
2 π)nexp
[
−
∑n
1
x^2 i/2
]
(1/
√
2 π)nexp
[
−
∑n
1
(xi−1)^2
/
2
]
=exp
(
−
∑n
1
xi+
n
2
)
.
Ifk>0, the set of all points (x 1 ,x 2 ,...,xn) such that
exp
(
−
∑n
1
xi+
n
2
)
≤k
is a best critical region. This inequality holds if and only if
−
∑n
1
xi+
n
2
≤logk
or, equivalently,
∑n
1
xi≥
n
2
−logk=c.
In this case, a best critical region is the setC={(x 1 ,x 2 ,...,xn):
∑n
1 xi≥c},
wherecis a constant that can be determined so that the size of the critical region
is a desired number α. The event
∑n
1 Xi≥c is equivalent to the eventX ≥
c/n=c 1 , for example, so the test may be based upon the statisticX.IfH 0 is
true, that is,θ=θ′=0,thenXhas a distribution that isN(0, 1 /n). Given the
significance levelα,thenumberc 1 is computed in R asc 1 =qnorm(1−α, 0 , 1 /
√
n);
hence,PH 0 (X≥c 1 )=α. So, if the experimental values ofX 1 ,X 2 ,...,Xnwere,
respectively,x 1 ,x 2 ,...,xn, we would computex=
∑n
1 xi/n.Ifx≥c^1 ,thesimple
hypothesisH 0 :θ=θ′= 0 would be rejected at the significance levelα;ifx<c 1 ,
the hypothesisH 0 would be accepted. The probability of rejectingH 0 whenH 0 is
true isαthe level of significance. The probability of rejectingH 0 ,whenH 0 is false,
is the value of the power of the test atθ=θ′′=1,whichis,
PH 1 (X≥c 1 )=
∫∞
c 1
1
√
2 π
√
1 /n
exp
[
−
(x−1)^2
2(1/n)
]
dx. (8.1.7)