MathematicsCore26 min read

Hypothesis Testing

Deciding whether the evidence is strong enough to abandon an assumption

This topic appears in:

01

Assume nothing has changed, then look for evidence against it

Definition

Significance level — The probability, chosen in advance, of rejecting H₀ when it is in fact true — the risk of a false alarm that you are prepared to accept.

A hypothesis test starts from a deliberately conservative position. The null hypothesis H₀ says nothing unusual is happening — the coin is fair, the mean has not moved, the new method is no better. The alternative hypothesis H₁ states what you suspect instead.

The test then asks a single question: if H₀ were true, how surprising would this data be? If the answer is "very surprising indeed", H₀ is rejected. If not, it is retained — not because it has been proved, but because there was insufficient evidence against it.

The asymmetry is deliberate and mirrors a courtroom. A verdict of not guilty does not establish innocence; it records that the evidence fell short. Hypothesis testing works the same way, which is why the conclusion is always phrased in terms of evidence rather than truth.

Never "accept H₀"

The correct phrase is "there is insufficient evidence to reject H₀". A test can fail to find evidence for many reasons, including a sample too small to detect a real effect. Writing "accept H₀" or "H₀ is true" loses the conclusion mark even when every calculation above it is perfect.

02

One tail or two

The alternative hypothesis decides where the evidence must lie for H₀ to be rejected, and therefore how the significance level is spent.

If H₁ specifies a direction — "the mean has increased" — then only one tail counts, and the whole of the significance level sits there. If H₁ is merely "the mean has changed", evidence in either direction counts, so the level is split between the two tails, giving 2.5% at each end for a 5% test.

This matters more than it first appears: the critical z for a 5% one-tailed test is 1.645, while for a 5% two-tailed test it is 1.960. The same data can be significant under one and not the other, so choosing correctly from the wording is worth real marks.

Wording of H₁TailsCritical z at 5%Critical z at 1%
mean has increasedone (upper)1.6452.326
mean has decreasedone (lower)−1.645−2.326
mean has changedtwo±1.960±2.576

Drag z to 1.645 and the unshaded upper tail is 5% — the critical region for a one-tailed test. Drag to 1.960 and it is 2.5%, which is what each tail gets when 5% must be split between two.

03

The method, in the order the marks are awarded

Hypothesis testing is generously marked because the structure is fixed. Marks are given for each stage, so a wrong final answer built on correct stages still scores well — provided the stages are actually written down.

Two routes are available and both are accepted. The critical value route compares the test statistic against a boundary; the p-value route compares a probability against the significance level. Mixing them up — comparing a probability against a z-value — is the error to guard against.

test statistic for a sample mean:z = (x̄ − μ) / (σ/√n)reject H₀ if:|z| > critical value(critical value method)p-value < significance level(p-value method)the denominator is the standard error, never σ alone
the observed sample meanwhat the data gave
μ
the value claimed by H₀the assumption being tested
σ/√n
the standard errorhow much x̄ would vary by chance alone
Worked example

A machine is set to fill bottles with a mean of 500 ml and known standard deviation 8 ml. A sample of 40 bottles has mean 502.6 ml. Test at the 5% level whether the mean has increased.

  1. H₀: μ = 500; H₁: μ > 500, where μ is the population mean fill volume.The word "increased" makes this one-tailed in the upper direction. Defining μ is part of the mark.
  2. One-tailed test at the 5% level, so the critical value is z = 1.645.The whole 5% sits in the upper tail because H₁ specifies a direction.
  3. Standard error = 8/√40 = 1.2649.The spread of the sample mean, not of a single bottle.
  4. z = (502.6 − 500)/1.2649 = 2.055.The observed mean is just over two standard errors above the claimed value.
  5. 2.055 > 1.645, so H₀ is rejected.The test statistic falls inside the critical region.
  6. There is sufficient evidence at the 5% level to conclude that the mean fill volume has increased above 500 ml.The conclusion must be in context and must not claim proof — "sufficient evidence" is the required register.

z = 2.06 > 1.645; reject H₀ — evidence of an increase

The six stages

  1. State H₀ and H₁ in symbols, with the parameter defined.
  2. State the significance level and whether the test is one- or two-tailed.
  3. Compute the test statistic, using the standard error as the denominator.
  4. Find the critical value, or the p-value.
  5. Compare, and state whether H₀ is rejected.
  6. Write a conclusion in the context of the question, not just "reject H₀".
04

The two ways a test can be wrong

A test decides on incomplete information, so it can reach the wrong verdict in two distinct ways, and they are not symmetric.

A Type I error rejects a true H₀ — a false alarm. Its probability is exactly the significance level, which is what makes that level a genuine choice: setting 1% rather than 5% means accepting a false alarm one time in a hundred rather than one in twenty.

A Type II error fails to reject a false H₀ — a missed detection. Reducing the significance level makes Type I errors rarer but Type II errors more common, so the two cannot be minimised together. Which matters more depends entirely on the consequences: a smoke alarm should tolerate false alarms, while a test that condemns a batch of expensive product should not.

H₀ is actually trueH₀ is actually false
Reject H₀Type I error (probability = α)correct decision
Do not reject H₀correct decisionType II error

The significance level is a deliberate choice

P(Type I error) is exactly the significance level, so choosing 5% means accepting a one-in-twenty chance of a false alarm. That is a judgement about consequences, not a mathematical fact — which is why the level is stated at the start of a test rather than chosen after seeing whether the result comes out significant.

Practice questions

5 questions · 18 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Explain why the conclusion of a hypothesis test should say "insufficient evidence to reject H₀" rather than "accept H₀".
Model answer

A test only measures whether the data is surprising under H₀; it can never demonstrate that H₀ is true. Failing to find evidence may simply mean the sample was too small to detect a real effect. So the correct conclusion is that the evidence was insufficient, not that H₀ has been shown correct.

Examiner tip. Marks are for the logic, not the phrase. Mentioning that a small sample can hide a genuine effect makes the point convincingly.

SQ2[2 marks]
Define a Type I error and state its probability.
Model answer

A Type I error occurs when H₀ is rejected even though it is actually true — a false alarm. Its probability is exactly the significance level of the test, α.

Examiner tip. The second mark is specifically for identifying the probability as the significance level.

SQ3[2 marks]
A test at the 5% level gives a p-value of 0.032. State the conclusion, and say whether it would change at the 1% level.
Model answer

At 5%: 0.032 < 0.05, so H₀ is rejected — there is sufficient evidence against it. At 1%: 0.032 > 0.01, so H₀ would not be rejected. The same data supports different conclusions because the level sets how much evidence is demanded.

Examiner tip. The second mark is for recognising that a stricter level demands stronger evidence, so significance can disappear.

Solved numericals

1 · 5 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[5 marks]
A manufacturer claims the mean lifetime of its batteries is 40 hours, with standard deviation 5 hours. A sample of 50 batteries has mean 38.4 hours. Test at the 5% level whether the mean lifetime is less than claimed.
Full working
  1. H₀: μ = 40; H₁: μ < 40, where μ is the mean lifetime"Less than claimed" makes this one-tailed in the lower direction.[1]
  2. Standard error = 5/√50 = 0.7071Using the standard error, not σ.[1]
  3. z = (38.4 − 40)/0.7071 = −2.263Negative, since the sample mean is below the claimed value.[1]
  4. Critical value for a 5% one-tailed lower test is −1.645; −2.263 < −1.645The test statistic is further into the tail than the boundary.[1]
  5. Reject H₀: there is sufficient evidence at the 5% level that the mean lifetime is less than 40 hours.Conclusion in context. Simply writing "reject H₀" does not earn this mark.[1]

z = −2.26 < −1.645; reject H₀ — evidence the mean is below 40 hours

Exam questions

1 · 7 marks

Multi-part questions with a full mark scheme.

Q1[7 marks]
A coin is suspected of being biased. It is tossed 200 times and gives 115 heads.
(a) State suitable hypotheses.
(b) Explain why a two-tailed test is appropriate.
(c) Carry out the test at the 5% level using a normal approximation.
(d) State what a Type II error would mean in this context.
Mark scheme
  1. (a) H₀: p = 0.5; H₁: p ≠ 0.5, where p is the probability of a head"Biased" does not specify a direction, so H₁ uses ≠.[1]
  2. (b) Bias could be towards heads or towards tails, so evidence in either tail counts against H₀The reason must reference the lack of a stated direction.[1]
  3. (c) Under H₀, X ~ B(200, 0.5) with mean 100 and variance 50, so σ = 7.071np = 100 and np(1 − p) = 50, both large enough for a normal approximation.[1]
  4. With continuity correction: z = (114.5 − 100)/7.071 = 2.051The correction uses 114.5 because a discrete count of 115 or more spans from 114.5 upwards.[1]
  5. Two-tailed at 5%, so the critical value is 1.960The 5% splits into 2.5% in each tail.[1]
  6. 2.051 > 1.960, so reject H₀: there is evidence at the 5% level that the coin is biased.Just significant — with a one-tailed test it would have been more comfortably so.[1]
  7. (d) A Type II error would mean concluding there is insufficient evidence of bias when the coin is in fact biased.It must be stated in context, not just as the general definition.[1]

(a) H₀: p = 0.5, H₁: p ≠ 0.5; (c) z = 2.05 > 1.96, reject H₀; (d) missing a real bias