Reading for Today's Lecture:
Goals of Today's Lecture:
Today's notes
Jargon defined so far: hypothesis, power function, level, critical region, null hypothesis, simple hypothesis, Type I error, Type II error.
Theorem: For each fixed
the
quantity
is minimized by any
which has
Neyman and Pearson suggested that in practice the
two kinds of errors might well have unequal consequences.
They suggested that rather than minimize any quantity
of the form above you pick the more serious kind of error, label it Type I and require your rule to hold the
probability
of a Type I error to be no more than
some prespecified level
.
(This value
is typically 0.05 these days, chiefly for historical reasons.)
The Neyman and Pearson approach is then to minimize
subject to the constraint
.
Usually this is really equivalent to the constraint
(because if you use
you could make R larger and keep
but
make
smaller. For discrete models, however, this
may not be possible.
Example: Suppose X is Binomial(n,p) and
either p=p0=1/2 or p=p1=3/4. If R is any critical region
(so R is a subset of
)
then
The problem in the example is one of discreteness. Here's how we get
around the problem. First we expand the set of possible values of to include numbers between 0 and 1. Values of
between
0 and 1 represent the chance that we choose H1 given that we observe
x; the idea is that we actually toss a (biased) coin to decide!
This tactic will show us the kinds of rejection regions which are
sensible. In practice we then restrict our attention to levels
for which the best
is always either 0 or 1. In the
binomial example we will insist that the value of
be either 0 or
or
or ...
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
.
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 343/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
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.
The favourite test is the usual 2 sided test which rejects for large values
of
with the critical value chosen appropriately.
This test maximizes the power subject to two constraints: first, that
the level be
and second that the test have power which is
minimized at
.
This second condition is really that the
power on the alternative be larger than it is on the null.
Definition: A test
of
against
is unbiased level
if it has level
and,
for every
we have
When testing a point null hypothesis like
this requires
that the power function be minimized at
which will mean that
if
is differentiable then
We now apply that condition to the
problem. If
is any test function then
Consider the problem of minimizing
subject to
the two constraints
and
.
Now fix two
values
and
and minimize
The likelihood ratio f1/f0 is simply
Now you have to mimic the Neyman Pearson lemma proof to check
that if
and
are adjusted so that the
unconstrained problem has the rejection region given then the
resulting test minimizes
subject to the two constraints.
A test
is a Uniformly Most Powerful Unbiased level
test if
Conclusion: The two sided z test which rejects
if