4.18 · AHL · HL onlyPaper 1Paper 2Paper 3

Further hypothesis tests and errors

In a minute

HL adds tests for a mean (z or t), a proportion (binomial), a Poisson rate and (ρ=0\rho = 0). You also find and the probabilities of and .

You'll be able to

  • Find and critical regions for a test on a normal mean, and decide a test with them.
  • Test a mean with a z-test when σ\sigma is known and a when it is not, including .
  • Test a proportion with the and a mean rate with the , one-tailed, and choose the critical region.
  • Use your GDC to test H0\mathrm{H}_0: ρ=0\rho = 0 and interpret the result.
  • Describe Type I and Type II errors in context and calculate their probabilities.
Before you start3 quick questions on what this builds on
Check yourself
X∼N(80,122)X \sim \mathrm{N}(80, 12^{2}). A random sample of 1616 values is taken. Write down the standard deviation of the sample mean Xˉ\bar{X}.
Check yourself
X∼B(10,0.2)X \sim \mathrm{B}(10, 0.2). Find P(X≥4)\mathrm{P}(X \ge 4), to 3 s.f.
Check yourself
A test at the 5%5\% gives a of 0.0720.072. What do you conclude?

Revise first: 4.1 Sampling, data quality and outliers, 4.4 Correlation and regression (y on x), 4.7 Discrete random variables and expected value, 4.8 Binomial distribution, 4.9 Normal distribution, 4.11 Chi-squared tests and the t-test, 4.14 Linear combinations and unbiased estimates, 4.15 Sample mean and the central limit theorem, 4.16 Confidence intervals for the mean and 4.17 Poisson distribution

Critical values and critical regions

In 4.11 you decided with a p-value. Another route: fix in advance which results reject H0\mathrm{H}_0, then see where your result lands.

To test the mean of a with known σ\sigma, use xˉ\bar{x} as the test statistic. If H0\mathrm{H}_0: μ=μ0\mu = \mu_0 is true, the is:

Learn this
Xˉ∼N(μ0,σ2n)\bar{X} \sim \mathrm{N}\left(\mu_0, \frac{\sigma^{2}}{n}\right)

The critical region is the tail H1\mathrm{H}_1 points to, with area equal to the ; a puts half in each tail. Find the boundary with the .

Standardising, z=xˉ−μ0σ/nz = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}, gives critical values of zz instead, such as −1.645-1.645 for a lower-tail 5%5\% test. The decision is the same.

Worked exampleBags of rice have masses that are normally distributed with σ=15\sigma = 15 g. The label says the mean is 10001000 g. An inspector weighs 99 bags and tests H0\mathrm{H}_0: μ=1000\mu = 1000 against H1\mathrm{H}_1: μ<1000\mu < 1000 at the 5%5\% level. Find the critical value of xˉ\bar{x}, to 1 decimal place, and state the critical region.

Try it first, then reveal one step at a time.

  1. Under H0\mathrm{H}_0, Xˉ∼N(1000,1529)\bar{X} \sim \mathrm{N}\left(1000, \frac{15^{2}}{9}\right), a standard deviation of 159=5\frac{15}{\sqrt{9}} = 5 g.
Worked exampleA machine cuts bolts whose lengths are normally distributed with σ=0.12\sigma = 0.12 mm. The target mean is 4040 mm. A sample of 1616 bolts is used to test, at the 1%1\% level, whether the mean length has changed. Find the critical region for xˉ\bar{x}, giving the critical values to 3 decimal places.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: μ=40\mu = 40; H1\mathrm{H}_1: μ≠40\mu \neq 40, two-tailed. Under H0\mathrm{H}_0, Xˉ∼N(40,0.032)\bar{X} \sim \mathrm{N}(40, 0.03^{2}), since 0.1216=0.03\frac{0.12}{\sqrt{16}} = 0.03.
Check yourself
Find the critical value of zz for a test with H1\mathrm{H}_1: μ>μ0\mu > \mu_0 at the 1%1\% level. Give it to 3 s.f.

Testing a population mean: z or t

σ\sigma is known only when the question gives the population value. A standard deviation from the sample is not σ\sigma. The t-test uses t=xˉ−μ0sn−1/nt = \frac{\bar{x} - \mu_0}{s_{n-1}/\sqrt{n}} with n−1n - 1 .

Worked exampleA machine fills cereal boxes. The mass is normally distributed with σ=3.2\sigma = 3.2 g, and the target mean is 375375 g. A sample of 1010 boxes has masses, in grams: 373.1,376.0,371.5,374.3,372.8,375.2,370.9,373.7,374.6,372.0373.1, 376.0, 371.5, 374.3, 372.8, 375.2, 370.9, 373.7, 374.6, 372.0. Test at the 10%10\% level whether the mean mass is below target. Give the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: μ=375\mu = 375; H1\mathrm{H}_1: μ<375\mu < 375, where μ\mu is the population mean mass in grams.
Worked exampleA helpline says its mean waiting time is 66 minutes. A journalist thinks it is longer. She records 99 waits, in minutes: 6.8,7.4,5.9,8.1,6.5,7.0,6.2,7.7,6.96.8, 7.4, 5.9, 8.1, 6.5, 7.0, 6.2, 7.7, 6.9. Assume waiting times are normally distributed. Test her claim at the 5%5\% level, giving the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: μ=6\mu = 6; H1\mathrm{H}_1: μ>6\mu > 6, where μ\mu is the population mean waiting time in minutes.

You won't be asked for a critical region in a t-test: decide with the p-value.

Check yourself
A courier's delivery times are normally distributed with σ=6\sigma = 6 minutes. The usual mean is 5050 minutes. On a new route, 1212 deliveries have mean 52.652.6 minutes. Find the p-value for testing H0\mathrm{H}_0: μ=50\mu = 50 against H1\mathrm{H}_1: μ>50\mu > 50. Give it to 3 s.f.
Check yourself
Bottle volumes are normally distributed. A sample of 200200 bottles has mean 498.6498.6 ml and sn−1=4.1s_{n-1} = 4.1 ml. Which test of H0\mathrm{H}_0: μ=500\mu = 500 should you use?

Matched pairs

Sometimes each subject is measured twice, such as before and after a course. The lists are linked, so the two-sample t-test from 4.11 does not apply.

Worked exampleEight runners time a 55 km run before and after a six-week training plan. Times, in minutes, before: 24.6,26.1,22.8,25.4,27.0,23.5,24.9,26.324.6, 26.1, 22.8, 25.4, 27.0, 23.5, 24.9, 26.3. After (same runners, same order): 24.1,25.3,22.9,24.6,26.2,23.4,24.0,25.824.1, 25.3, 22.9, 24.6, 26.2, 23.4, 24.0, 25.8. Assume the differences are normally distributed. Test at the 5%5\% level whether the plan reduces the mean time. Give the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. Matched pairs: let d=before−afterd = \text{before} - \text{after}, so a faster time after gives d>0d > 0. H0\mathrm{H}_0: μd=0\mu_d = 0; H1\mathrm{H}_1: μd>0\mu_d > 0, where μd\mu_d is the population mean difference.
Worked exampleA teacher gives 1212 students a spelling test in silence and a similar test with music playing. (a) Explain why a matched pairs test is suitable. (b) Write down hypotheses to test whether music changes the mean score.

Try it first, then reveal one step at a time.

  1. (a) Each student sits both tests, so the scores pair up. Each student's difference removes the big variation in spelling ability.
Check yourself
Which study gives matched pairs?
Check yourself
Six people have their grip strength measured with each hand. The differences, right minus left, in kg, are 2.1,−0.4,1.8,0.9,1.5,0.62.1, -0.4, 1.8, 0.9, 1.5, 0.6. Find the t statistic for testing H0\mathrm{H}_0: μd=0\mu_d = 0. Give it to 3 s.f.

Tests with the binomial and Poisson distributions

When the test counts things, the count is a . Test a proportion pp with the X∼B(n,p)X \sim \mathrm{B}(n, p), and a mean rate mm with the X∼Po(m)X \sim \mathrm{Po}(m).

Worked exampleA seed company claims 85%85\% of its tomato seeds germinate. A gardener plants 4040 seeds and 2929 germinate. Test at the 5%5\% level whether the germination rate is lower than claimed. Give the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. Let pp be the proportion of all the company's seeds that germinate. H0\mathrm{H}_0: p=0.85p = 0.85; H1\mathrm{H}_1: p<0.85p < 0.85.
Worked exampleAn airline finds that 12%12\% of passengers with bookings don't turn up. It thinks this rate has risen. It will check 5050 bookings and test at the 5%5\% level. Find the critical region for XX, the number of passengers who don't turn up.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: p=0.12p = 0.12; H1\mathrm{H}_1: p>0.12p > 0.12, where pp is the proportion of all booked passengers who don't turn up. Under H0\mathrm{H}_0, X∼B(50,0.12)X \sim \mathrm{B}(50, 0.12). A rise means large XX, so find the smallest cc with P(X≥c)<0.05\mathrm{P}(X \ge c) < 0.05.
Worked exampleAccidents on a road have happened at a mean rate of 2.42.4 per week. After a speed camera is installed, the council will count accidents over 33 weeks and test at the 5%5\% level whether the rate has fallen. Assume the number of accidents follows a Poisson distribution. (a) Find the critical region. (b) There are 33 accidents in the 33 weeks. State the conclusion.

Try it first, then reveal one step at a time.

  1. (a) Over 33 weeks, H0\mathrm{H}_0: m=3×2.4=7.2m = 3 \times 2.4 = 7.2; H1\mathrm{H}_1: m<7.2m < 7.2, where mm is the mean number of accidents in 33 weeks. So X∼Po(7.2)X \sim \mathrm{Po}(7.2).
Check yourself
Emails reach a help desk at a mean rate of 4.54.5 per hour. A manager thinks the rate has increased. She counts emails in one hour and tests at the 5%5\% level, assuming a Poisson distribution. Which is the critical region?
Check yourself
A school says 30%30\% of its students walk to school. A student thinks the proportion is higher. In a random sample of 2020 students, 1010 walk. Find the p-value for her test, to 3 s.f.

Testing for correlation: is ρ = 0?

In 4.4 you found rr for a sample. A sample can show some even when the has none. This test asks whether rr is far enough from 00 to count as evidence.

H0\mathrm{H}_0: ρ=0\rho = 0, and H1\mathrm{H}_1 is ρ>0\rho > 0, ρ<0\rho < 0 or ρ≠0\rho \neq 0, following the claim. The test assumes the come from a bivariate normal distribution. Your GDC gives rr and the p-value.

Worked exampleA chain of 1010 shops records weekly advertising spend, xx (£ hundred), and weekly sales, yy (units). xx: 3.2,5.8,7.1,4.5,8.3,6.0,2.9,7.6,5.1,6.73.2, 5.8, 7.1, 4.5, 8.3, 6.0, 2.9, 7.6, 5.1, 6.7. yy: 410,470,520,520,560,430,440,490,500,610410, 470, 520, 520, 560, 430, 440, 490, 500, 610. Assume a bivariate normal distribution. Test at the 5%5\% level whether there is positive correlation between spend and sales. Give the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: ρ=0\rho = 0; H1\mathrm{H}_1: ρ>0\rho > 0, where ρ\rho is the population correlation between spend and sales.
Worked exampleFor 1212 houses, xx is the distance from a city centre (km) and yy is the price (£ thousand). xx: 11,35,48,20,62,41,29,55,8,33,70,1811, 35, 48, 20, 62, 41, 29, 55, 8, 33, 70, 18. yy: 148,131,140,152,118,126,135,139,141,122,127,150148, 131, 140, 152, 118, 126, 135, 139, 141, 122, 127, 150. Assume a bivariate normal distribution. Test at the 1%1\% level whether distance and price are correlated. Give the p-value to 3 s.f.

Try it first, then reveal one step at a time.

  1. H0\mathrm{H}_0: ρ=0\rho = 0; H1\mathrm{H}_1: ρ≠0\rho \neq 0. "Correlated" has no direction, so choose ≠0\neq 0 on the GDC.
Check yourself
A biologist thinks that, in a bird species, longer wings go with lower body mass. Which hypotheses should she test?
Check yourself
A test of H0\mathrm{H}_0: ρ=0\rho = 0 against H1\mathrm{H}_1: ρ>0\rho > 0 at the 5%5\% level gives r=0.41r = 0.41 and a p-value of 0.120.12. Which conclusion is correct?

Type I and Type II errors

A test decides from a sample, so it can go wrong in two ways.

So for a Type II probability: find the critical region with the H0\mathrm{H}_0 distribution, switch to the true parameter value, then find the probability of landing outside the region.

Two normal curves for the sample mean bulb life. The right curve, centred on 1500 hours, is the distribution if H0 is true. The left curve, centred on 1440 hours, is the distribution if the true mean is 1440. A dashed vertical line at the critical value 1460.5 splits the axis into reject H0 on the left and do not reject H0 on the right. The small area under the H0 curve left of the line is shaded and labelled Type I, 0.05. The area under the 1440 curve right of the line is shaded and labelled Type II, 0.196. true μ = 1440 H₀: μ = 1500 c = 1460.5 1440 1500 reject H₀ do not reject H₀ x̄ Type I: 0.05 Type II: 0.196
Type I: the H0\mathrm{H}_0 curve inside the critical region. Type II: the true curve outside it.
Worked exampleA maker claims its bulbs last a mean of 15001500 hours. Lifetimes are normally distributed with σ=96\sigma = 96 hours. A buyer tests 1616 bulbs, with H0\mathrm{H}_0: μ=1500\mu = 1500 against H1\mathrm{H}_1: μ<1500\mu < 1500 at the 5%5\% level. (a) Find the critical region. (b) Write down P(Type I error)\mathrm{P}(\text{Type I error}). (c) The true mean is 14401440 hours. Find P(Type II error)\mathrm{P}(\text{Type II error}), to 3 s.f.

Try it first, then reveal one step at a time.

  1. (a) Under H0\mathrm{H}_0, Xˉ∼N(1500,242)\bar{X} \sim \mathrm{N}(1500, 24^{2}), since 9616=24\frac{96}{\sqrt{16}} = 24. Inverse normal, area 0.050.05: c=1460.523…c = 1460.523\ldots, so the critical region is xˉ<1460.5\bar{x} < 1460.5 hours.
Worked exampleIn the airline test, X∼B(50,0.12)X \sim \mathrm{B}(50, 0.12) under H0\mathrm{H}_0 and the critical region is X≥11X \ge 11. (a) Find P(Type I error)\mathrm{P}(\text{Type I error}). (b) In fact 25%25\% of passengers now don't turn up. Find P(Type II error)\mathrm{P}(\text{Type II error}), to 3 s.f.

Try it first, then reveal one step at a time.

  1. (a) Type I: X≥11X \ge 11 when p=0.12p = 0.12. 1−P(X≤10)=0.0324…≈0.03251 - \mathrm{P}(X \le 10) = 0.0324\ldots \approx 0.0325, below the 5%5\% level as the discrete rule requires.
Check yourself
In the road test, X∼Po(7.2)X \sim \mathrm{Po}(7.2) under H0\mathrm{H}_0 and the critical region is X≤2X \le 2. With the camera, the true rate is 1.21.2 accidents per week. Find P(Type II error)\mathrm{P}(\text{Type II error}) for the 33-week count, to 3 s.f.
Check yourself
A food inspector tests H0\mathrm{H}_0: a restaurant meets hygiene standards. Which is a Type I error?

Common mistakes

  • Writing hypotheses about the sample, such as H0\mathrm{H}_0: xˉ=375\bar{x} = 375. Use population parameters: μ\mu, pp, mm or ρ\rho.
  • Stating "reject H0\mathrm{H}_0" with no reason. Compare first (p-value with level, or result with critical region), then decide.
  • Picking a discrete critical region whose probability is closest to 5%5\% but above it. It must stay below the significance level.
  • Rounding the critical value before a Type II calculation. Store the full GDC value and round only the final answer.

Exam tips

  • **State** hypotheses with the parameter (μ\mu, pp, mm or ρ\rho) and say in words what it is, such as "the population mean waiting time".
  • **Find** a discrete critical region: show the tail probabilities either side of the boundary, such as P(X≥10)=0.0708\mathrm{P}(X \ge 10) = 0.0708 and P(X≥11)=0.0325\mathrm{P}(X \ge 11) = 0.0325.
  • A conclusion needs its reason: the comparison, the decision and the meaning in context, such as "0.0299<0.050.0299 < 0.05, so reject H0\mathrm{H}_0: evidence that fewer than 85%85\% germinate". Never write "proves".
  • Write down the test and what you enter in the GDC: the distribution, its parameters and the direction of H1\mathrm{H}_1.

Key takeaways

Learn thisXˉ∼N(μ0,σ2n) under H0: μ=μ0(normal population, σ known)\bar{X} \sim \mathrm{N}\left(\mu_0, \frac{\sigma^{2}}{n}\right) \text{ under } \mathrm{H}_0\text{: } \mu = \mu_0 \quad (\text{normal population, } \sigma \text{ known})
Learn thisMean of a normal population: z-test when σ\sigma is known, t-test when σ\sigma is unknown, whatever the sample size. IB questions don't ask for a critical region in a t-test: decide with the p-value.
Learn thisMatched pairs: take differences dd in a fixed order, then a one-sample t-test with H0\mathrm{H}_0: μd=0\mu_d = 0, assuming the differences are normally distributed.
Learn thisIn IB AI, binomial and Poisson tests are one-tailed. The critical region has the largest probability under H0\mathrm{H}_0 that is still less than the significance level.
Learn thisCorrelation: test H0\mathrm{H}_0: ρ=0\rho = 0 with the GDC, assuming a bivariate normal distribution.
Learn thisType I error: rejecting a true H0\mathrm{H}_0. Its probability is the significance level for a normal test with known σ\sigma, and the critical region's probability under H0\mathrm{H}_0 for a binomial or Poisson test.
Learn thisType II error: not rejecting a false H0\mathrm{H}_0. Its probability is P(not in the critical region)\mathrm{P}(\text{not in the critical region}), using a stated true parameter value.

Practise this

35 past-paper questions on Further hypothesis testing in the AI HL bank, each with a mark scheme and a worked explanation.

Also: Type I and Type II errors (11)

Practise Further hypothesis testing →