Using a confidence interval to perform a test
A hypothesis test at significance level \(\alpha\) for
can be performed in the following way.
T-shirt sizes
A retail clothing outlet has collected the following data from random sampling of invoices of T-shirts over the past month.
Small | Medium | Large | XL | Total | |
---|---|---|---|---|---|
North Island | 2 | 15 | 24 | 9 | 50 |
South Island | 4 | 17 | 23 | 6 | 50 |
We earlier found a 95% confidence interval for the proportion of Small T-shirts sold in the North Island using the pivot
\[ \frac{x - n\pi}{\sqrt{n \pi(1 - \pi)}} \;\;\underset{\text{approx}}{\sim} \;\; \NormalDistn(0,1) \]where \(x = 2\) and \(n = 50\). This was rearranged to get
\[ -1.96 \;\;\lt\;\; \frac{2 - 50\pi}{\sqrt{50 \pi(1 - \pi)}} \;\;\lt\;\; 1.96 \]with the resulting confidence interval
\[ 0.011 \;\;\lt\;\; \pi \;\;\lt\;\; 0.135 \]In order to perform a hypothesis test for whether 15% of T-shirts sold in the North Island are of the Small size,
we note that 0.15 is not in the 95% confidence interval. This means that we would reject the null hypothesis in a test at the 5% significance level.