1. Introduction
Hypothesis testing is a method of inference.
Definition 1 A hypothesis is a statement about a population parameter.
Definition 2 Null and Alternate Hypothesis: We partition the parameter space
into two disjoint sets
and
and we wish to test:
We call
the null hypothesis and
the alternate hypothesis.
Definition 3 Rejection Region: Let
be a random variable and let
be its range. Let
be the rejection region.
We accept
when
does not belong to
and reject when it does.
Hypothesis testing is a legal trial. We accept unless the evidence suggests otherwise. Falsely sentencing the accused when he is not guilty is type I error and letting the accused go free when he is infact guilty is a type II error.
Definition 4 Power Function of a Test: It is the probability of
being in the rejection region, expressed as a function of
.
Definition 5 Size of a Test: It is the maximum of the power function of a test when
is restricted to the
parameter space.
Definition 6 Level
Test: A test with size less than or equal to
is said to be a level
test.
Definition 7 Simple Hypothesis: A hypothesis of the form
is called a simple hypothesis.
Definition 8 Composite Hypothesis: A hypothesis of the form
or
is called a composite hypothesis.
Definition 9 Two Sided Test: A test of the form
is called a two-sided test.
Definition 10 One Sided Test: A test of the form
or
is called a one-sided test.
Example 1 (Hypothesis Testing on Normal Distribution:) Let
where
is known. We want to test
versus
. Hence
and
.
Consider the test:
where
.
Then the rejection region is
The power function of the test is
The size of the test is
Equating with
we obtain
Hence
We reject when
. For a test size of 95%
or we reject when
2. The Wald Test
Let be \textsc{iid} random variables with
as a parameter of their distribution function
. Let
be the estimate of
and let
be the standard deviation of the distribution of
.
Definition 11 (The Wald Test)
Consider testing a two-sided hypothesis:
Assume that
has an asymptotically normal distribution.
Then, the size
the Wald Test is: reject
if
where
Theorem 12 Asymptotically, the Wald test has size
.
Example 2 Two experiments are conducted to test two prediction algorithms.
The prediction algorithms are used to predict the outcomes
and
times, respectively, and have a probability of predicting with success as
and
, respectively.
Let
.
Consider testing a two-sided hypothesis:
3. The Likelihood Ratio Test
This test can be used to test vector valued parameters as well.
Definition 13 The likelihood ratio test statistic for testing
versus
is