Skip to content

9709 · 6.5

Hypothesis tests — practice questions

Practice and worked examples for 9709 Hypothesis tests. Short previews only — attempt the full question in MarkScheme against the official scheme.

Worked example 1

The mass of a certain type of chocolate bar is claimed to be 50g. The masses are known to be normally distributed with a standard deviation of 1.5g. A quality control manager suspects that the machine is producing underweight bars. She takes a random sample of 10 bars and finds their mean mass is 49.2g. Test her suspicion at the 5% significance level.

Show solution outline
  1. Hypotheses: Let μ\mu be the population mean mass of the chocolate bars. H0:μ=50H_0: \mu = 50 (The mean mass is 50g). H1:μ<50H_1: \mu < 50 (The mean mass is less than 50g, i.e., underweight). This is a one-tailed test.
  2. Significance Level: α=0.05\alpha = 0.05 (5%).
  3. Critical Value: For a one-tailed test at the 5% level, we need the Z-value that gives a lower tail probability of 0.05. From tables, this corresponds to P(Z<1.645)=0.05P(Z < -1.645) = 0.05. So, the critical value is -1.645. The critical region is Z1.645Z \le -1.645.
  4. Test Statistic: The population is XN(μ,1.52)X \sim N(\mu, 1.5^2). We have n=10n=10, xˉ=49.2\bar{x}=49.2, σ=1.5\sigma=1.5. Z=xˉμ0σ/n=49.2501.5/10=0.80.4743...=1.686...Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}} = \frac{49.2 - 50}{1.5 / \sqrt{10}} = \frac{-0.8}{0.4743...} = -1.686...
  5. Comparison and Conclusion: The test statistic Z=1.687Z = -1.687 is less than the critical value of 1.645-1.645. Therefore, the result falls in the critical region. We reject H0H_0. There is sufficient evidence at the 5% significance level to suggest that the machine is producing underweight chocolate bars.

Worked example 2

In the past, 30% of customers at a coffee shop ordered oat milk. After a marketing campaign, the manager wants to know if this proportion has changed. In a random sample of 150 customers, 57 ordered oat milk. Test at the 10% significance level whether the proportion has changed. Also, find the p-value of this test.

Show solution outline
  1. Hypotheses: Let pp be the population proportion of customers ordering oat milk. H0:p=0.3H_0: p = 0.3 H1:p0.3H_1: p \neq 0.3 (The proportion has 'changed'). This is a two-tailed test.
  2. Significance Level: α=0.10\alpha = 0.10 (10%). For a two-tailed test, this means 5% in each tail.
  3. Test Statistic: Sample proportion p^=57150=0.38\hat{p} = \frac{57}{150} = 0.38. We use a Normal approximation to the Binomial distribution. Under H0H_0, the distribution of the sample proportion is approximately N(p,p(1p)n)N(p, \frac{p(1-p)}{n}). Mean μ=p=0.3\mu = p = 0.3. Variance σ2=p(1p)n=0.3×0.7150=0.0014\sigma^2 = \frac{p(1-p)}{n} = \frac{0.3 \times 0.7}{150} = 0.0014. Standard deviation σ=0.00140.03742\sigma = \sqrt{0.0014} \approx 0.03742. Z=p^pp(1p)/n=0.380.30.03742=2.138...Z = \frac{\hat{p} - p}{\sqrt{p(1-p)/n}} = \frac{0.38 - 0.3}{0.03742} = 2.138...
  4. Comparison (p-value method): The p-value is the probability of getting a result at least as extreme as the one observed. Since this is a two-tailed test, we find the probability of Z>2.138Z > 2.138 and multiply by 2. P(Z>2.138)=1Φ(2.138)=10.9837=0.0163P(Z > 2.138) = 1 - \Phi(2.138) = 1 - 0.9837 = 0.0163. p-value =2×0.0163=0.0326= 2 \times 0.0163 = 0.0326.
  5. Conclusion: The p-value (0.0326) is less than the significance level α\alpha (0.10). Therefore, we reject H0H_0. There is sufficient evidence at the 10% significance level to conclude that the proportion of customers ordering oat milk has changed.