Source
Adapted from my own handwritten and hand-typed notes from Year 1 to Year 3 of my EEE degree
Hypothesis testing uses sample data to choose between two competing statements about a population. The question it answers is: is there convincing evidence that a claim is true, or could the sample result just be chance?
Two hypotheses
Definitions:
- null hypothesis : the default assumption, which we keep unless the data strongly disagree. Always written with "=", for example
- alternative hypothesis : the claim we want to test, the opposite of . Uses , or
| Test | Rejection region (for or ) | |
|---|---|---|
| Upper tail | statistic , with | |
| Lower tail | statistic , with | |
| Two tail | statistic or , each tail area |
For a symmetric distribution (normal or ), .
Level of significance
The significance level is the most we allow for rejecting when it is actually true:
Typical values are or . The set of statistic values that leads to rejection is the critical region (rejection region), and its boundary is the critical value.
Five steps
Steps:
- Make sure the test statistic has a known distribution (for a mean: approximately normal, by a normal population or by CLT)
- Formulate and (the wording of the claim decides the tail)
- Calculate the test statistic from the sample, assuming is true
- Find the critical value and draw the rejection region
- Conclude: if the statistic falls in the critical region, reject and accept . Otherwise there is no significant evidence against . Always state the conclusion in words about
Steps 3 and 4 can be done in either order.
Worked example
A car maker claims the Corolla averages over 15 km/L. A sample of 49 cars gives , with . Test at .
Solution:
- , so is approximately normal by CLT
- , (upper tail)
- critical value: gives
- , so reject : there is significant evidence that the mean is above 15 km/L
The exact statistics for the mean are collected in Hypothesis Test for the Mean.