Hypothesis Testing
Hypothesis Testing
Let X1, X2, . . . , Xn be the final exam scores of the n students in the class.
After the students take the exam, LR can be computed. If the value of LR is too
large then the new teaching method is better than the original method, would
reject H0 in favor of HA
It can be shown that LR varies directly with
X, the mean of the students’ scores.
So the testing can equivalently be based on X or
- θ
X
) =
T(X which has a standard normal distribution under H0 .
/√
) this is the test statistic.
T(X
Would reject H0 for large values of T(X ). This can be formalized or quantified by
setting the significance level (alpha level, α-level) of the test or the critical value
of the test, tc :
- θ
X
) =
P(T(X ≥ tc | H0 ) = α where tc is the critical value.
/√
- θ
X
) =
Distribution of T(X under H0.
/√
The set of values of X1, X2, . . . , Xn where T(X) ≥ tc is called the critical region
or rejection region, where H0 would be rejected. Denote the observed value of
) by to. If to ≥ tc then would reject H0 , otherwise accept H0. The p-value of
T(X
the test, is the probability that T(X ) under H0 is more extreme than to ;
) ≥ to | H0 ).
p-value = P(T(X
There are two possible errors in hypothesis testing.
) ≥ tc | H0 ) = α
P(Type I error) = P( T(X
) < tc | HA ) = 1 – P( T(X
P(Type II error) = P( T(X ) ≥ tc | HA ) =
) ≥ tc | HA )
= P( T(X
H0 : µ = θ0 vs HA : µ ≠ θ0
For a two-sided test one uses the Likelihood Ratio Test which involves
maximizing the likelihood under H0 and under HA .
L(X ,...,X ; µ θ
)
The two-sided test is based on the ratio L(X ,...,X ; θ
)
.
For the example of the history final exam the test statistic would be the same,
- θ
X
) =
T(X ) that are too small or too large would lead to
, but values of T(X
/√
rejection of H0 or
)│ ≥ uc | H0 ) = α
Selecting uc or α so that P(│T(X
) ≤ -uc or T(X
or P(T(X ) ≥ uc | H0 ) = α
- θ
X
) │ =
where │T(X │ /√ │ ≥ u c is the critical region or rejection region of
the two-sided test.
- θ
X
) =
Distribution of T(X under H0.
/√
)│ ≥ |to | | H0 ) .
p-value = P(│T(X
)│ ≥ uc | H0 ) = α
P(Type I error) = P(│T(X
)│ ≥ uc | HA ) = P(T(X
= P(│T(X ) ≤ -uc or T(X
) ≥ uc | HA ).