Language of hypothesis testing

Language of hypothesis testing

Spec 5.1 · Edexcel A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A hypothesis test uses a sample to decide whether a claim about a population is believable.
  • The null hypothesis H0:p=p0H_0:p=p_0 is assumed true; the alternative hypothesis H1H_1 is p>p0p>p_0, p<p0p<p_0 or p≠p0p\ne p_0.
  • Hypotheses are written in terms of the parameter pp, never the sample statistic.
  • The significance level is the probability of rejecting H0H_0 when it is true.
  • Reject H0H_0 if the p-value is at most the significance level (halved in a two-tailed test).

Hypotheses

The null hypothesis is the claim assumed true; the alternative is what we suspect instead.

A hypothesis test uses a sample to judge a claim about a population.

  • H0:p=p0H_0:p=p_0 is the null hypothesis.
  • H1H_1 is the alternative hypothesis: p>p0p>p_0, p<p0p<p_0 or p≠p0p\ne p_0.

Example: a coin suspected of favouring heads has H0:p=0.5H_0:p=0.5, H1:p>0.5H_1:p>0.5.

00.10.20.30.40.50.60.70.80.91p = 0.5 (H₀)
H₀: p = 0.5. The alternative H₁: p > 0.5 covers every value above 0.5.

Null hypothesis H0H_0

  • Assumed true at the start
  • Written p=p0p=p_0
  • About the parameter pp

Alternative H1H_1

  • What we suspect instead
  • p>p0p>p_0, p<p0p<p_0 or p≠p0p\ne p_0
  • Accepted only if H0H_0 is rejected

A coin is suspected of being biased towards tails. Which H1H_1 is correct?

Significance level

If H0H_0 is true, we ask how likely the observed result would be, then compare with the significance level.

The test statistic is the value calculated from the sample, here the number of successes XX. If H0H_0 is true, X∼B(n,p0)X\sim B(n,p_0).

The significance level is chosen in advance, commonly 5% or 1%. It is the probability of incorrectly rejecting H0H_0 when it is true. A smaller level demands stronger evidence.

  1. 1

    Assume H0H_0 is true

    so X∼B(n,p0)X\sim B(n,p_0)

  2. 2

    Observe the sample

    record the value of XX

  3. 3

    Ask how likely it is

    probability of a result at least this extreme under H0H_0

  4. 4

    Decide

    reject H0H_0 if this is no more than the significance level

The logic of a hypothesis test

Why is it harder to reject H0H_0 at 1% than at 5%?

One and two tails

In a one-tailed test the whole significance level sits in one tail; in a two-tailed test it is split equally.

A one-tailed test has H1H_1 in one direction: the whole level goes in that tail.

A two-tailed test has H1:p≠p0H_1:p\ne p_0: the level is split equally, so a 10% test has 5% in each tail.

To find the tail, compare the result with the mean np0np_0. For B(30,16)B(30,\frac16) the mean is 5, so 1 is in the lower tail and 9 in the upper.

0246810121416182022242628301 (lower tail)mean 59 (upper tail)

For B(30,16)B(30,\frac16), which tail is an observation of 3 in?

Critical regions

The critical region is the set of results that lead to rejecting H0H_0; choose the largest one with probability at most the significance level.

The critical region is the set of values of the test statistic that lead to rejecting H0H_0. Its boundary is the critical value. The acceptance region is the rest.

For an upper tail, find the smallest cc with P(X≥c)≤P(X\ge c)\le the level. For a lower tail, the largest cc with P(X≤c)≤P(X\le c)\le the level.

The actual significance level is the probability of the whole critical region under H0H_0. For B(20,0.5)B(20,0.5) and X≥15X\ge15 it is 0.02070.0207.

00.050.10.150.00460.00110.0002891011121314151617181920Number of successes xP(X = x)
B(20, 0.5): the upper tail X ≥ 15 is the 5% critical region

For X∼B(20,0.5)X\sim B(20,0.5), P(X≥14)=0.0577P(X\ge14)=0.0577 and P(X≥15)=0.0207P(X\ge15)=0.0207. What is the upper critical region at 5%?

The p-value

The p-value is the probability, assuming H0H_0, of a result at least as extreme as the one observed.

For H1:p>p0H_1:p>p_0 and observed xx, the p-value is P(X≥x)P(X\ge x).

  • If it is at most the significance level (halved in a two-tailed test), reject H0H_0.
  • Otherwise there is insufficient evidence to reject H0H_0.

Conclude in context and cautiously: a test never proves H0H_0 or H1H_1.

00.050.10.150.20.250.0010.00980.00980.001012345678910xP(X = x)
X ~ B(10, 0.5). For H₁: p > 0.5 and x = 8, the p-value is P(X ≥ 8) = 0.0439 + 0.0098 + 0.0010 = 0.0547.
  • p-value ≤\le significance levelreject H0H_0
  • p-value >> significance levelinsufficient evidence to reject H0H_0

A two-tailed test at 5% gives a one-tail probability of 0.03. What is the conclusion?

Try an exam question

A coin is suspected of being biased towards heads. It is tossed 20 times. Let pp be the probability of heads. State suitable hypotheses and explain what is meant by the significance level of the test.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which pair of hypotheses should be used?

1 mark, marked against the mark scheme

Revision notes