Goals for today:
Null hypothesis:
Alternative hypothesis:
Rejection region:
.
Test function:
.
Power function:
Type I error: incorrectly ``reject'' Ho.
Type II error: incorrectly ``accept'' Ho.
Simple hypothesis:
has cardinality 1.
For simple hypotheses we denote
and
.
Theorem: For each fixed
the
quantity
is minimized by any
which has
Most Powerful Level
test maximizes
subject to
.
Example: X is Binomial(5,p) p0=1/2, p1=3/4.
Most powerful level 0.05 test
.
Most powerful
level 0.0625 test
.
But X=0 is evidence
for p=1/2 not for p=3/4.
Solution: Let
.
If
then
if we see X=x we toss coin (P(H) =0.6) and reject if get heads.
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
Now to example: try
It can be verified that this test has the same level as the test
and smaller probability of Type II error.
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: In the Binomial(n,p) with p0=1/2 and p1=3/4the ratio f1/f0 is
NOTE: No-one ever uses this procedure. Instead the value of
used in discrete problems is chosen to be a possible value of the rejection
probability when
(or
). When the sample size is large
you can come very close to any desired
with a non-randomized test.
If
then we can either take
to be 243/32
and
or
and
.
However, our
definition of
in the theorem makes
and
.
When the theorem is used for continuous distributions it can be the case
that the cdf of
f1(X)/f0(X) has a flat spot where it is equal to
.
This is the point of the word ``largest'' in the theorem.
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 likelikelood 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.