Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›4 Statistics and probability
  4. ›4.18 Hypothesis testing

IB Mathematics: Applications and Interpretation · Topic 4 · Statistics and probability

4.18 Hypothesis testing

Formulate null and alternative hypotheses, carry out a test with sample data, interpret the p-value, and distinguish Type I from Type II errors.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
  • HL only
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A hypothesis test weighs sample evidence against a claim
  1. 1A hypothesis test weighs sample evidence against a claim
  2. 2A small p-value is evidence against the null hypothesis
  3. 3A test follows five steps from hypotheses to conclusion
  4. 4A conclusion must be worded carefully and in context
  5. 5A test can make a Type I or a Type II error
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: A hypothesis test weighs sample evidence against a claim

A cereal company claims that 30% of its boxes contain a prize. A student suspects the true figure is higher.

The company’s claim becomes the null hypothesis, H0H_0H0​. It says nothing unusual is happening, so H0:p=0.3H_0: p=0.3H0​:p=0.3. Here ppp is the proportion of boxes with a prize. The null hypothesis always contains an equals sign.

The student’s suspicion is the alternative hypothesis, H1H_1H1​. In this case H1:p>0.3H_1: p>0.3H1​:p>0.3. A test with H1H_1H1​ in one direction is one-tailed, and one with ≠\neq= is two-tailed.

Forms of the alternative hypothesis

TestH1H_1H1​ for H0:p=0.3H_0: p=0.3H0​:p=0.3What it looks for
One-tailed, upperp>0.3p>0.3p>0.3An increase
One-tailed, lowerp<0.3p<0.3p<0.3A decrease
Two-tailedp≠0.3p\neq0.3p=0.3A change in either direction
Test
One-tailed, upper
H1H_1H1​ for H0:p=0.3H_0: p=0.3H0​:p=0.3
p>0.3p>0.3p>0.3
What it looks for
An increase
Test
One-tailed, lower
H1H_1H1​ for H0:p=0.3H_0: p=0.3H0​:p=0.3
p<0.3p<0.3p<0.3
What it looks for
A decrease
Test
Two-tailed
H1H_1H1​ for H0:p=0.3H_0: p=0.3H0​:p=0.3
p≠0.3p\neq0.3p=0.3
What it looks for
A change in either direction

Key terms · tap one for its definition

null hypothesis

The null hypothesis H0H_0H0​ is the default claim about a population parameter, assumed true unless the sample gives strong evidence against it.

alternative hypothesis

The alternative hypothesis H1H_1H1​ is the statement about the population parameter that the data support when H0H_0H0​ is rejected.

Part 1 done

2

Part 2 of 5: A small p-value is evidence against the null hypothesis

Before collecting data, decide how much surprise counts as convincing. This threshold is the significance level, α\alphaα, usually 5% or 1%.

After sampling, we find the p-value. It is the probability of a result at least as extreme as ours, assuming H0H_0H0​ is true.

If the p-value is smaller than α\alphaα, we reject H0H_0H0​. Otherwise, we do not reject H0H_0H0​. A p-value near 0 means the sample would be very surprising if H0H_0H0​ were true.

Figure 1. The shaded tail has area α. A test statistic that falls in it leads to rejecting H₀.

A smaller α\alphaα demands stronger evidence before H0H_0H0​ is rejected. Choosing α\alphaα after seeing the data would let you bend the result.

Key terms · tap one for its definition

significance level

The significance level α\alphaα is the probability, set before the test, below which a p-value leads to rejecting H0H_0H0​.

p-value

The p-value is the probability, assuming H0H_0H0​ is true, of obtaining a result at least as extreme as the one observed.

Part 2 done

Quick check

One question on the part you just read

Easy

A bakery claims that the mean mass of its loaves is 400 g. A test looks for any change. Identify the correct hypotheses.
Show answer and explanation

Answer: A · Worked explanation

The null hypothesis states the claim about the population mean μ\muμ, and a test for any change has a two-tailed alternative μ≠400\mu\neq400μ=400. Hypotheses must not be written about the sample mean xˉ\bar{x}xˉ, which is known from the data.
3

Part 3 of 5: A test follows five steps from hypotheses to conclusion

Now we can put the pieces together. Take the cereal claim. A student buys 20 boxes and finds 10 with a prize. If H0H_0H0​ is true, the number of prizes is X∼B(20,0.3)X\sim\mathrm{B}(20,0.3)X∼B(20,0.3). The calculator’s cumulative binomial function then gives the tail probability.

  • State H0H_0H0​ and H1H_1H1​.
  • Choose the significance level.
  • Calculate the p-value from the sample, using technology.
  • Compare the p-value with the significance level.
  • Conclude in the context of the question.

Exam tip

The letter ppp means a success probability. With a hyphen, p-value means something different. Keep the two apart in your working.

Worked example

Test a claim about a proportion

A company says 30% of its boxes contain a prize. A student buys 20 boxes and finds 10 prizes. Test at the 5% significance level whether the true proportion is greater than 30%.
  1. 1
    Hypotheses: H0:p=0.3H_0: p=0.3H0​:p=0.3 and H1:p>0.3H_1: p>0.3H1​:p>0.3. Take α=0.05\alpha=0.05α=0.05.
  2. 2
    Under H0H_0H0​, X∼B(20,0.3)X\sim\mathrm{B}(20,0.3)X∼B(20,0.3), where XXX is the number of prizes.
  3. 3
    The p-value is P(X≥10)=1−P(X≤9)P(X\ge10)=1-P(X\le9)P(X≥10)=1−P(X≤9).
  4. 4
    Calculator: P(X≤9)≈0.9520P(X\le9)\approx0.9520P(X≤9)≈0.9520, so the p-value is about 0.0480.
  5. 5
    Compare: 0.0480<0.050.0480<0.050.0480<0.05, so reject H0H_0H0​.

Answer: There is sufficient evidence, at the 5% level, that more than 30% of the boxes contain a prize.

Part 3 done

4

Part 4 of 5: A conclusion must be worded carefully and in context

The decision is only half of the answer. Rejecting H0H_0H0​ means the sample gives evidence for H1H_1H1​. It does not prove that H1H_1H1​ is true.

Not rejecting H0H_0H0​ means the evidence is insufficient. It does not prove that H0H_0H0​ is true, because the sample may simply be too small. Write the conclusion in context.

Common mistake

Never write “accept H0H_0H0​” or “the claim is proved”. Write “reject H0H_0H0​” or “do not reject H0H_0H0​”, then add the context.

In a two-tailed test, the p-value counts both tails. For a symmetric distribution, double the probability in the tail you calculated.

Part 4 done

Quick check

One question on the part you just read

Easy

A test gives a p-value of 0.08, and the significance level is 5%. State the correct decision.
Show answer and explanation

Answer: A · Worked explanation

The p-value 0.08 is greater than the significance level 0.05, so the result is not surprising enough to reject H0H_0H0​, and we do not reject it. This does not prove that H0H_0H0​ is true. It only means the evidence against it is insufficient, so saying we accept H0H_0H0​ as proved true overstates the result.
5

Part 5 of 5: A test can make a Type I or a Type II error

A jury can convict an innocent person or free a guilty one. Tests can fail in two matching ways. A Type I error is rejecting H0H_0H0​ when it is true.

The probability of a Type I error equals the significance level α\alphaα. A Type II error is failing to reject H0H_0H0​ when it is false.

Decisions and errors

TruthReject H0H_0H0​Do not reject H0H_0H0​
H0H_0H0​ is trueType I errorCorrect decision
H0H_0H0​ is falseCorrect decisionType II error
Truth
H0H_0H0​ is true
Reject H0H_0H0​
Type I error
Do not reject H0H_0H0​
Correct decision
Truth
H0H_0H0​ is false
Reject H0H_0H0​
Correct decision
Do not reject H0H_0H0​
Type II error

Lowering α\alphaα makes a Type I error less likely but a Type II error more likely. A larger sample reduces the chance of a Type II error without changing α\alphaα.

Exam tip

When asked to describe an error, state the conclusion reached and the truth, in the words of the question.

Key terms · tap one for its definition

Type I error

A Type I error is the rejection of H0H_0H0​ when H0H_0H0​ is true; its probability equals the significance level.

Type II error

A Type II error is the failure to reject H0H_0H0​ when H0H_0H0​ is false.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Distinguish[2 marks]

    Distinguish between the null hypothesis and the alternative hypothesis.

    Show mark schemeHide mark scheme

    Model answer

    The null hypothesis is the default claim, assumed true unless the sample gives strong evidence against it. The alternative hypothesis is the statement the data support if the null hypothesis is rejected.

    • 1 mark for describing the null hypothesis as the default claim assumed true
    • 1 mark for describing the alternative hypothesis as what is supported if H0H_0H0​ is rejected
  2. 2.Define[2 marks]

    Define the p-value.

    Show mark schemeHide mark scheme

    Model answer

    The p-value is the probability of obtaining a result at least as extreme as the one observed, assuming the null hypothesis is true.

    • 1 mark for stating that it is a probability of a result at least as extreme as observed
    • 1 mark for stating the assumption that the null hypothesis is true
  3. 3.Determine[3 marks]

    A company claims that 40% of its customers renew. In a sample of 25 customers, 6 renew. Test H0:p=0.4H_0: p=0.4H0​:p=0.4 against H1:p<0.4H_1: p<0.4H1​:p<0.4 at the 5% level. Under H0H_0H0​, X∼B(25,0.4)X\sim\mathrm{B}(25,0.4)X∼B(25,0.4) and P(X≤6)=0.0736P(X\le6)=0.0736P(X≤6)=0.0736. Determine the conclusion.

    Show mark schemeHide mark scheme

    Model answer

    The p-value is P(X≤6)=0.0736P(X\le6)=0.0736P(X≤6)=0.0736. Since 0.0736>0.050.0736>0.050.0736>0.05, do not reject H0H_0H0​. There is insufficient evidence at the 5% level that fewer than 40% of customers renew.

    • 1 mark for identifying the p-value as 0.0736
    • 1 mark for comparing 0.0736 with 0.05 and not rejecting H0H_0H0​
    • 1 mark for stating the conclusion in context
  4. 4.Describe[2 marks]

    Describe a Type I error and a Type II error in the test of the cereal company’s claim that 30% of boxes contain a prize.

    Show mark schemeHide mark scheme

    Model answer

    A Type I error is concluding that more than 30% of boxes contain a prize when the true proportion is 30%. A Type II error is finding insufficient evidence of this when the true proportion really is higher.

    • 1 mark for describing a Type I error in context
    • 1 mark for describing a Type II error in context
  5. 5.Explain[2 marks]

    Explain why not rejecting the null hypothesis does not prove that it is true.

    Show mark schemeHide mark scheme

    Model answer

    Not rejecting means only that the sample gave insufficient evidence against H0H_0H0​. A small sample may fail to show a real difference.

    • 1 mark for stating that the evidence is insufficient rather than proof
    • 1 mark for giving a reason, such as the sample being too small
  6. 6.Explain[3 marks]

    Explain how lowering the significance level from 5% to 1% affects the chances of Type I and Type II errors for a fixed sample size.

    Show mark schemeHide mark scheme

    Model answer

    The probability of a Type I error equals α\alphaα, so it falls from 5% to 1%. Rejecting H0H_0H0​ becomes harder, so a Type II error becomes more likely.

    • 1 mark for stating that the Type I error probability equals the significance level
    • 1 mark for stating that a Type I error becomes less likely
    • 1 mark for stating that a Type II error becomes more likely

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy·State[1 mark]

State the probability of making a Type I error.
Show answer and explanation

Answer: A · Worked explanation

A Type I error occurs when H0H_0H0​ is true but rejected, and the chance of this is set by the significance level α\alphaα. The p-value comes from one sample and is not the long-run error probability. A p-value comes from one sample and varies between samples, whereas the significance level is chosen before the test.
4.

Medium·Determine[1 mark]

A test gives a p-value of 0.0214. Determine at which significance levels H0H_0H0​ is rejected.
Show answer and explanation

Answer: A · Worked explanation

Compare the p-value 0.0214 with each level. Since 0.0214<0.050.0214<0.050.0214<0.05, we reject H0H_0H0​ at the 5% level. Since 0.0214>0.010.0214>0.010.0214>0.01, we do not reject H0H_0H0​ at the 1% level. Rejection at both levels would need a p-value below 0.01, which is a stricter requirement than the one met here.
5.

Medium·Determine[2 marks]

A two-tailed test uses a test statistic with a symmetric distribution. The probability in the upper tail beyond the observed value is 0.031. At the 5% level, determine the decision.
Show answer and explanation

Answer: A · Worked explanation

A two-tailed test counts both tails, and the distribution is symmetric, so the p-value is 2×0.031=0.0622\times0.031=0.0622×0.031=0.062. This is greater than 0.05, so we do not reject H0H_0H0​. Comparing 0.031 directly with 0.05 would ignore the second tail and wrongly lead to rejecting H0H_0H0​.
6.

Medium·Determine[2 marks]

Under H0:p=0.5H_0: p=0.5H0​:p=0.5 with H1:p>0.5H_1: p>0.5H1​:p>0.5, X∼B(10,0.5)X\sim\mathrm{B}(10,0.5)X∼B(10,0.5). The observed value is 8. Determine the p-value.
Show answer and explanation

Answer: A · Worked explanation

The p-value is P(X≥8)=P(8)+P(9)+P(10)=45+10+11024=561024≈0.0547P(X\ge8)=P(8)+P(9)+P(10)=\frac{45+10+1}{1024}=\frac{56}{1024}\approx0.0547P(X≥8)=P(8)+P(9)+P(10)=102445+10+1​=102456​≈0.0547, because every result at least as extreme as 8 must be included. The value 0.0439 is P(X=8)P(X=8)P(X=8) alone, which leaves out the more extreme results. The value 0.0107 is P(X≥9)P(X\ge9)P(X≥9). Always include every result at least as extreme as the one observed.
7.

Medium·Identify[1 mark]

A trial finds no significant improvement from a medicine, although the medicine really does help. Identify the error made.
Show answer and explanation

Answer: A · Worked explanation

The medicine really helps, so H0H_0H0​ (no improvement) is false. Failing to reject a false H0H_0H0​ is a Type II error. A Type I error would need H0H_0H0​ to be true and rejected. It is wrong to say that no error was made, because not rejecting does not guarantee a correct decision.
8.

Hard·Identify[2 marks]

Identify the change that reduces the probability of a Type II error without raising the probability of a Type I error.
Show answer and explanation

Answer: A · Worked explanation

A larger sample gives stronger evidence against a false H0H_0H0​ while α\alphaα stays the same, so Type II errors become less likely with no extra Type I risk. Raising α\alphaα cuts Type II errors but makes Type I errors more likely. Lowering α\alphaα does the reverse, and a smaller sample makes Type II errors more likely.
9.

Hard·Identify[2 marks]

A test gives a p-value of 0.03. Identify the correct interpretation.
Show answer and explanation

Answer: A · Worked explanation

The p-value is calculated assuming H0H_0H0​ is true, so it measures how surprising the data are under H0H_0H0​. It is not the probability that H0H_0H0​ is true, and so 0.97 is not the probability of H1H_1H1​ either. The p-value is a statement about the data given H0H_0H0​, not about the hypothesis itself.
10.

Hard·Deduce[2 marks]

A bus company claims that 90% of buses are on time. In a sample of 15, 11 are on time. For H0:p=0.9H_0: p=0.9H0​:p=0.9 and H1:p<0.9H_1: p<0.9H1​:p<0.9, P(X≤11)=0.0556P(X\le11)=0.0556P(X≤11)=0.0556 under H0H_0H0​. Deduce the correct conclusion.
Show answer and explanation

Answer: A · Worked explanation

The p-value is 0.0556. It is greater than 0.05, so do not reject at 5%. It is less than 0.10, so reject at 10%. The reverse conclusion would need the p-value below 0.05 and above 0.10, which is impossible.

Keep going

Next topic4.19 Transition matrices and Markov chainsPrevious topic4.17 Poisson distribution

More in Topic 4 · Statistics and probability

  1. 4.11Chi-squared and t-testsNotes · 10 questions
  2. 4.12Designing data collectionNotes · 10 questions· HL only
  3. 4.13Non-linear regressionNotes · 10 questions· HL only
  4. 4.14Linear combinations of random variablesNotes · 10 questions· HL only
  5. 4.15Central limit theoremNotes · 10 questions· HL only
  6. 4.16Confidence intervalsNotes · 10 questions· HL only
  7. 4.17Poisson distributionNotes · 10 questions· HL only
  8. 4.18Hypothesis testingNotes · 10 questions· HL only
  9. 4.19Transition matrices and Markov chainsNotes · 10 questions· HL only

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1A hypothesis test weighs sample evidence against a claim
  2. 2A small p-value is evidence against the null hypothesis
  3. 3A test follows five steps from hypotheses to conclusion
  4. 4A conclusion must be worded carefully and in context
  5. 5A test can make a Type I or a Type II error
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe