Home page for accesible maths 3 Hypothesis testing

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

3.1 Introduction

Hypothesis testing is a collection of techniques which allow us to answer specific questions about a population using only a sample of data from the population in question. Consider again the data on magnets and pain relief.

  1. 1.

    Is the average active treatment post-treatment pain score less than 5?

  2. 2.

    For the active treatment patients, is the post-treatment score lower than the pre-treatment score?

  3. 3.

    How can we compare pain scores from active treatment patients with pain scores from placebo patients?

In this chapter we will look at the following hypothesis tests, each of which is designed to answer questions like the above:

  • Single sample t-tests

  • Paired and unpaired two-sample t-tests

Later on in the course, we will investigate how to test for differences across more than two groups.

TheoremExample 3.1.1 Annual minimum sea ice extent

We return to the annual minimum sea ice extent, which we saw in Chapter 2. We might want to ask whether there is evidence that the mean of the annual minima is less than 6.5 million km2.

  • Suppose that our sample x1,,xn are realisations of IID random variables X1,,Xn. We assume that the random variables come from a Normal distribution with mean μ (in millions of km2) and variance σ2.

  • Is there evidence that μ is less than 6.5?

  • To decide this, we test the null hypothesis (or status quo)

    H0:μ=6.5

    against the alternative hypothesis (or research hypothesis)

    H1:μ<6.5.
  • How can we use the information in our data to decide whether or not to be in favour of H0 or H1?

A naive approach to hypothesis testing is to estimate the population mean μ using the sample mean x¯. If the estimate exceeds the value posed under the null hypothesis (in this case 6.5), then we conclude that there is evidence in favour of the alternative hypothesis.

What is wrong with this naive approach? It does not take into account the nature of a random sample. Even if the average sea ice extent is exactly equal to 6.5 million km2, just by chance, our sample might still have a sample mean less than 6.5 million km2.

  • We must quantify how much smaller than 6.5 the sample mean must be to make it unlikely to have occurred by chance.

  • For example, if μ=6, and we take a sample of size 10, how unlikely is it to observe a sample mean x¯ of 6.5?

  • For this we must take into account the uncertainty in μ^. We obtain the uncertainty from the sampling distribution of the estimator μ^.