Statistics / Unit 9: Hypothesis Testing Basics
9.3 The Test Statistic for a Proportion
Notes
A test statistic measures how many standard errors the sample result is from the value in $H_0$.
- For a proportion: $\displaystyle z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1 - p_0)}{n}}}$, where $p_0$ is the null value.
- The p-value is the area in the tail(s) beyond $z$. For $H_a: p \ne p_0$ (two-sided), double the one-tail area.
- Example: $p_0 = 0.5$, $n = 100$, $\hat{p} = 0.6$: $\text{SE} = 0.05$, so $\displaystyle z = \frac{0.1}{0.05} = 2$.
Practice
Testing $H_0: p = 0.5$ with $n = 100$ and $\hat{p} = 0.6$, the test statistic is:
$\displaystyle \text{SE} = \sqrt{\frac{0.25}{100}} = 0.05$ and $\displaystyle z = \frac{0.6 - 0.5}{0.05} = 2$.
Testing $H_0: p = 0.2$ with $n = 400$ and $\hat{p} = 0.23$, the test statistic is:
$\displaystyle \text{SE} = \sqrt{\frac{0.2 \cdot 0.8}{400}} = 0.02$ and $\displaystyle z = \frac{0.03}{0.02} = 1.5$.
For $H_a: p \ne 0.5$ the test statistic is $z = 2$. The area to the right of $z = 2$ is $0.0228$. The p-value is:
A two-sided test doubles the tail area: $2(0.0228) = 0.0456$.
Ready for more? Take the Unit 9 test.