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
TestRejection region (for or )
Upper tailstatistic , with
Lower tailstatistic , with
Two tailstatistic 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:

  1. Make sure the test statistic has a known distribution (for a mean: approximately normal, by a normal population or by CLT)
  2. Formulate and (the wording of the claim decides the tail)
  3. Calculate the test statistic from the sample, assuming is true
  4. Find the critical value and draw the rejection region
  5. 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.