Goals for today:
Definition: A hypothesis test is a function
whose values are always in [0,1]. If we observe X=x then we
choose H1 with conditional probability
.
In this case we have
Theorem: In testing f0 against f1 the probability
of a type II error is minimized, subject to
by the test function:
Example: If
are iid
and
we have
and
then
The rejection region looks complicated: reject if a complicated
statistic is larger than
which has a complicated formula.
But in calculating
we re-expressed the rejection
region in terms of
Definition: In the general problem of testing
against
the level of a test function
is
Application of the NP lemma: In the
model
consider
and
or
.
The UMP level
test of
against
is
Proof: For either choice of
this test has level
because
for
we have
(Notice the use of
.
The central point is that the critical
point is determined by the behaviour on the edge of the null hypothesis.)
Now if
is any other level
test then we have
The following will not be covered in class.
Here is a smaller example. There are 4 possible values of X and 24 possible rejection regions. Here is a table of the levels for each possible rejection region R:
| R | |
| {} | 0 |
| {3}, {0} | 1/8 |
| {0,3} | 2/8 |
| {1}, {2} | 3/8 |
| {0,1}, {0,2}, {1,3}, {2,3} | 4/8 |
| {0,1,3}, {0,2,3} | 5/8 |
| {1,2} | 6/8 |
| {0,1,3}, {0,2,3} | 7/8 |
| {0,1,2,3} |
The best level 2/8 test has rejection region
and
.
If, instead, we permit randomization then we will find that the best level test rejects when
X=3 and, when X=2 tosses a coin which has chance 1/3 of landing heads, then rejects if
you get heads. The level of this test is
1/8+(1/3)(3/8) = 2/8 and the probability of a
Type II error is
.
End of material not covered in class
Proof of the Neyman Pearson lemma: Given a test
with level strictly less than
we can define
the test
Suppose you want to minimize f(x) subject to g(x) = 0.
Consider first the function
Notice that to find
you set the usual partial
derivatives equal to 0; then to find the special
you
add in the condition
.
For each
we have seen that
minimizes
where
.
As
increases the level of
decreases from 1
when
to 0 when
.
There is thus a
value
where for
the level is less than
while for
the level is at least
.
Temporarily let
.
If
define
.
If
define
Now
has level
and according to the theorem above
minimizes
.
Suppose
is some other
test with level
.
Then
Definition: In the general problem of testing
against
the level of a test function
is
Application of the NP lemma: In the
model
consider
and
or
.
The UMP level
test of
against
is
Proof: For either choice of
this test has level
because
for
we have
(Notice the use of
.
The central point is that the critical
point is determined by the behaviour on the edge of the null hypothesis.)
Now if
is any other level
test then we have
This phenomenon is somewhat general. What happened was this. For
any
the likelihood ratio
is an increasing
function of
.
The rejection region of the NP test is thus
always a region of the form
.
The value of the constant
k is determined by the requirement that the test have level
and this depends on
not on
.
Definition: The family
has monotone likelihood ratio with respect to a statistic T(X)if for each
the likelihood ratio
is a monotone increasing function of T(X).
Theorem: For a monotone likelihood ratio family the
Uniformly Most Powerful level
test of
(or of
)
against the alternative
is
A typical family where this will work is a one parameter exponential
family. In almost any other problem the method doesn't work and there
is no uniformly most powerful test. For instance to test
against the two sided alternative
there is no UMP level
test. If there were its power at
would have to be
as high as that of the one sided level
test and so its rejection
region would have to be the same as that test, rejecting for large
positive values of
.
But it also has to have power as
good as the one sided test for the alternative
and
so would have to reject for large negative values of
.
This would make its level too large.