In this paragraph, let consider the properties a satisfactory test should posses.
For a realistic application of the Neyman-Pearson lemma, consider the following, in which the test is based on a random sample from a normal distribution.
Let
X
1
,
X
2
,...,
X
n
X
1
,
X
2
,...,
X
n
be a random sample from a normal distribution
N(
μ,36
)
N(
μ,36
)
. We shall find the best critical region for testing the simple hypothesis
H
0
:μ=50
H
0
:μ=50
against the simple alternative hypothesis
H
1
:μ=55
H
1
:μ=55
. Using the ratio of the likelihood functions, namely
L(
50
)/L(
55
)
L(
50
)/L(
55
)
, we shall find those points in the sample space for which this ratio is less than or equal to some constant k.
That is, we shall solve the following inequality:
L(
50
)
L(
55
)
=
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−50
)
2
]
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−55
)
2
]
=exp[
−(
1
72
)(
10
∑
1
n
x
i
+n
50
2
−n
55
2
)
]≤k.
L(
50
)
L(
55
)
=
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−50
)
2
]
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−55
)
2
]
=exp[
−(
1
72
)(
10
∑
1
n
x
i
+n
50
2
−n
55
2
)
]≤k.
If we take the natural logarithm of each member of the inequality, we find that
−10
∑
1
n
x
i
−n
50
2
+n
55
2
≤(
72
)lnk.
−10
∑
1
n
x
i
−n
50
2
+n
55
2
≤(
72
)lnk.
Thus,
1
n
∑
1
n
x
i
≥−
1
10n
[
n
50
2
−n
55
2
+(
72
)lnk
]
1
n
∑
1
n
x
i
≥−
1
10n
[
n
50
2
−n
55
2
+(
72
)lnk
]
Or equivalently,
x
¯
≥c,
x
¯
≥c,
where
c=−
1
10n
[
n
50
2
−n
55
2
+(
72
)lnk
].
c=−
1
10n
[
n
50
2
−n
55
2
+(
72
)lnk
].
Thus
L(
50
)/L(
55
)≤k
L(
50
)/L(
55
)≤k
is equivalent to
x
¯
≥c
x
¯
≥c
.
A best critical region is, according to the Neyman-Pearson lemma,
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
where c is selected so that the size of the critical region is
α
α
. Say n=16 and c=53. Since
X
¯
X
¯
is
N(
50,36/16
)
N(
50,36/16
)
under
H
0
H
0
we have
α=P(
X
¯
≥53;μ=50
)=P[
X
¯
−50
6/4
≥
3
6/4
;μ=50
]=1−Φ(
2
)=0.0228.
α=P(
X
¯
≥53;μ=50
)=P[
X
¯
−50
6/4
≥
3
6/4
;μ=50
]=1−Φ(
2
)=0.0228.
The example 1 illustrates what is often true, namely, that the inequality
L(
θ
0
)
L(
θ
1
)
≤k
L(
θ
0
)
L(
θ
1
)
≤k
can be expressed in terms of a function
u(
x
1
,
x
2
,...,
x
n
)
u(
x
1
,
x
2
,...,
x
n
)
say,
u(
x
1
,
x
2
,...,
x
n
)≤
c
1
u(
x
1
,
x
2
,...,
x
n
)≤
c
1
or
u(
x
1
,
x
2
,...,
x
n
)≥
c
2
,
u(
x
1
,
x
2
,...,
x
n
)≥
c
2
,
where
c
1
c
1
and
c
2
c
2
is selected so that the size of the critical region is
α
α
. Thus the test can be based on the statistic
u(
X
1
,...,
X
n
)
u(
X
1
,...,
X
n
)
. Also, for illustration, if we want
α
α
to be a given value, say 0.05, we would then choose our
c
1
c
1
and
c
2
c
2
. In example1, with
α
α
=0.05, we want
0.05=P(
X
¯
≥c;μ=50
)=P(
X
¯
−50
6/4
≥
c−50
6/4
;μ=50
)=1−Φ(
c−50
6/4
).
0.05=P(
X
¯
≥c;μ=50
)=P(
X
¯
−50
6/4
≥
c−50
6/4
;μ=50
)=1−Φ(
c−50
6/4
).
Hence it must be true that
(
c−50
)/(
3/2
)=1.645
(
c−50
)/(
3/2
)=1.645
, or equivalently,
c=50+
3
2
(
1.645
)≈52.47.
c=50+
3
2
(
1.645
)≈52.47.
Let
X
1
,
X
2
,...,
X
n
X
1
,
X
2
,...,
X
n
denote a random sample of size n from a Poisson distribution with mean
λ
λ
. A best critical region for testing
H
0
:λ=2
H
0
:λ=2
against
H
1
:λ=5
H
1
:λ=5
is given by
L(
2
)
L(
5
)
=
2
∑
x
i
e
−2n
x
1
!
x
2
!···
x
n
!
x
1
!
x
2
!···
x
n
!
5
∑
x
i
e
−5n
≤k.
L(
2
)
L(
5
)
=
2
∑
x
i
e
−2n
x
1
!
x
2
!···
x
n
!
x
1
!
x
2
!···
x
n
!
5
∑
x
i
e
−5n
≤k.
The inequality is equivalent to
(
2
5
)
∑
x
i
e
3n
≤k
(
2
5
)
∑
x
i
e
3n
≤k
and
(
∑
x
i
)ln(
2
5
)+3n≤lnk.
(
∑
x
i
)ln(
2
5
)+3n≤lnk.
Since
ln(
2/5
)<0
ln(
2/5
)<0
, this is the same as
∑
i=1
n
x
i
≥
lnk−3n
ln(
2/5
)
=c.
∑
i=1
n
x
i
≥
lnk−3n
ln(
2/5
)
=c.
If n=4 and c=13, then
α=P(
∑
i=1
4
X
i
≥13;λ=2
)=1−0.936=0.064,
α=P(
∑
i=1
4
X
i
≥13;λ=2
)=1−0.936=0.064,
from the tables, since
∑
i=1
4
X
i
∑
i=1
4
X
i
has a Poisson distribution with mean 8 when
λ
λ
=2.
When
H
0
:θ=
θ
0
H
0
:θ=
θ
0
and
H
1
:θ=
θ
1
H
1
:θ=
θ
1
are both simple hypotheses, a critical region of size
α
α
is a best critical region if the probability of rejecting
H
0
H
0
when
H
1
H
1
is true is a maximum when compared with all other critical regions of size
α
α
. The test using the best critical region is called a most powerful test because it has the greatest value of the power function at
θ=
θ
1
θ=
θ
1
when compared with that of other tests of significance level
α
α
. If
H
1
H
1
is a composite hypothesis, the power of a test depends on each simple alternative in
H
1
H
1
.
- Definition 2:
A test, defined by a critical region C of size
α
α
, is a uniformly most powerful test if it is a most powerful test against each simple alternative in
H
1
H
1
. The critical region C is called a uniformly most powerful critical region of size
α
α
.
Let now consider the example when the alternative is composite.
Let
X
1
,
X
2
,...,
X
n
X
1
,
X
2
,...,
X
n
be a random sample from
N(
μ,36
)
N(
μ,36
)
. We have seen that when testing
H
0
:μ=50
H
0
:μ=50
against
H
1
:μ=55
H
1
:μ=55
, a best critical region C is defined by
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
where c is selected so that the significance level is
α
α
. Now consider testing
H
0
:μ=50
H
0
:μ=50
against the one-sided composite alternative hypothesis
H
1
:μ>50
H
1
:μ>50
. For each simple hypothesis in
H
1
H
1
, say
μ=
μ
1
μ=
μ
1
the quotient of the likelihood functions is
L(
50
)
L(
μ
1
)
=
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−50
)
2
]
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−
μ
1
)
2
]
=exp[
−(
1
72
){
2(
μ
1
−50
)
∑
1
n
x
i
+n(
50
2
−
μ
1
2
)
}
].
L(
50
)
L(
μ
1
)
=
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−50
)
2
]
(
72π
)
−n/2
exp[
−(
1
72
)
∑
1
n
(
x
i
−
μ
1
)
2
]
=exp[
−(
1
72
){
2(
μ
1
−50
)
∑
1
n
x
i
+n(
50
2
−
μ
1
2
)
}
].
Now
L(
50
)/L(
μ
1
)≤k
L(
50
)/L(
μ
1
)≤k
if and only if
x
¯
≥
(
−72
)ln(
k
)
2n(
μ
1
−50
)
+
50+
μ
1
2
=c.
x
¯
≥
(
−72
)ln(
k
)
2n(
μ
1
−50
)
+
50+
μ
1
2
=c.
Thus the best critical region of size
α
α
for testing
H
0
:μ=50
H
0
:μ=50
against
H
1
:μ=
μ
1
H
1
:μ=
μ
1
, where
μ
1
>50
μ
1
>50
, is given by
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
C={
(
x
1
,
x
2
,...,
x
n
):
x
¯
≥c
},
where is selected such that
P(
X
¯
≥c;
H
0
:μ=50
)=α.
P(
X
¯
≥c;
H
0
:μ=50
)=α.