Because of the relationship between confidence intervals and hypothesis tests, a hypothesis test at significance level \(\alpha\) for

can be performed in the following way.

  1. Find a \((1 - \alpha)\) confidence interval for \(\theta\).
  2. Reject H0 if the confidence interval does not include \(\theta_0\).

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

Concentrating on the probability that a North Island T-shirt is Small, \(\pi\), we have the approximate pivot,

\[ \frac{x - n\pi}{\sqrt{n \pi(1 - \pi)}} \;\;\underset{\text{approx}}{\sim} \;\; \NormalDistn(0,1) \]

where \(x = 2\) and \(n = 50\). This can be rearranged to get a 95% confidence interval

\[ 0.011 \;\;\lt\;\; \pi \;\;\lt\;\; 0.135 \]

If we wanted to perform a test about \(\pi\),

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.