Hypothesis Testing: Single sample; significance — TMJC 2025 H2 Math Prelim Paper 2
What this question tests
Question
A coffee shop owner claims that its signature coffee has a mean caffeine content of \(120\) mg per cup. To investigate this claim, a random sample of \(60\) cups of coffee is selected and the caffeine content, \(x\) mg per cup, is summarised as follows. \[ \textstyle\sum x = 6960 \qquad \sum x^2 = 822465 \]
(a) Calculate unbiased estimates of the population mean and variance for the caffeine content per cup.
(b) Test, at the \(5\%\) level of significance, whether the coffee shop owner's claim is supported by the data. You should state your hypotheses and define any symbols that you use.
The coffee shop also sells premium coffee, where its caffeine content is normally distributed with population variance \(200\) mg\(^2\). The coffee shop owner now claims that its premium coffee has a mean caffeine content less than \(120\) mg per cup. Another large random sample of \(n\) cups of premium coffee is selected and the sample mean caffeine content per cup is found to be \(116.6\) mg. A test is carried out at the \(2\tfrac{1}{2}\%\) level of significance and the result supports the owner's claim.
(c) Find the set of values that \(n\) can take.
Show full worked solution▾
(a) \[\begin{aligned} \bar{x} &= \frac{\sum x}{n} = \frac{6960}{60} = 116.\\ s^2 &= \frac{1}{n-1}\!\left[\sum x^2 - \frac{(\sum x)^2}{n}\right]\\ &= \frac{1}{59}\!\left[822465 - \frac{6960^2}{60}\right]\\ &= \frac{15105}{59} \\ &= 256.0169\ldots\\ &\approx 256. \end{aligned}\]
(b) Let \(X\) be the caffeine content per cup of signature coffee in mg, and let \(\mu\) denote the population mean caffeine content per cup of signature coffee in mg. \[ \mathrm{H}_0:\mu = 120,\qquad \mathrm{H}_1:\mu\ne 120. \] Under \(\mathrm{H}_0\), since \(n = 60\) is large, by the Central Limit Theorem \[ \bar{X}\;\dot\sim\;\mathrm{N}\!\left(120,\;\frac{256.0169}{60}\right)\quad\text{approximately.} \] Test statistic: \[ Z = \frac{\bar{X} - 120}{\sqrt{256.0169/60}}. \] Level of significance: \(5\%\). Reject \(\mathrm{H}_0\) if \(p\text{-value} < 0.05\).
Using GC, \(p\text{-value} = 0.0528\) (3 s.f.).
Since \(p\text{-value} = 0.0528 > 0.05\), we do not reject \(\mathrm{H}_0\) and conclude that there is insufficient evidence, at the \(5\%\) level of significance, that the population mean caffeine content per cup of coffee is not \(120\) mg. Hence the coffee shop owner's claim is supported by the data at the \(5\%\) level of significance.
(c) Let \(Y\) be the caffeine content per cup of premium coffee in mg, and \(\mu_Y\) the population mean. \[ \mathrm{H}_0:\mu_Y = 120,\qquad \mathrm{H}_1:\mu_Y < 120. \] Under \(\mathrm{H}_0\), \(Y\sim\mathrm{N}(120,200)\) so \(\bar{Y}\sim\mathrm{N}\!\left(120,\tfrac{200}{n}\right)\). Test statistic \[ Z = \frac{\bar{Y} - 120}{\sqrt{200/n}}. \] Level of significance: \(2.5\%\), so reject \(\mathrm{H}_0\) if \(z\text{-value} < -1.95996\).
The observed \(z\text{-value}\) is \[ z = \frac{116.6 - 120}{\sqrt{200/n}} = \frac{-3.4}{\sqrt{200/n}}. \] For the test to reject \(\mathrm{H}_0\): \[\begin{aligned} \frac{-3.4}{\sqrt{200/n}} &< -1.95996\\ -3.4\sqrt{n} &< -1.95996\sqrt{200}\\ \sqrt{n} &> \frac{1.95996\sqrt{200}}{3.4}\\ n &> 200\!\left(\frac{1.95996}{3.4}\right)^{\!2}\\ n &> 66.461. \end{aligned}\]