Inference for a Proportion
Same \( \hat{p} \), two different standard errors — and a reason each one is right.
One \( \hat{p} \), two jobs
A sample proportion \( \hat{p} \) has its own sampling distribution: center it at the true proportion p, and its spread is the standard error \( \sqrt{p(1-p)/n} \), Normal-shaped once the conditions below hold. That machinery was built in the CLT and standard-error lessons, and this lesson does not re-derive it — it puts it to work two ways.
A hypothesis test asks whether the data are consistent with a claimed value \( p_0 \). A confidence interval asks for a plausible range of values for the unknown p. Both use a standard error built from \( \sqrt{p(1-p)/n} \) — but which p goes inside that square root is not the same for the two procedures.
Conditions for the test
Before trusting the z above, check that the sampling distribution really is close to Normal, and that the sample is trustworthy:
- Success/failure, checked against \( p_0 \): \( n\,p_0 \geq 10 \) and \( n(1-p_0) \geq 10 \). This course uses the \( \geq 10 \) convention throughout (some texts use 5 or 15 — stick to 10 here, consistently).
- Random sample.
- Independence: the sample is no more than 10% of the population, if sampling without replacement.
Notice the check uses \( p_0 \), the claimed value — not \( \hat{p} \) — because the test's whole premise is \'assume \( H_0 \) is true and see if the data fights back\'.
- Conditions (checked against p0): \( n p_0 = 100(0.5) = 50 \geq 10 \) and \( n(1-p_0) = 50 \geq 10 \). Random sample assumed, and n is well under 10% of all adults. Proceed.
- Standard error for the test (uses p0): \( \sqrt{p_0(1-p_0)/n} = \sqrt{(0.5)(0.5)/100} = \sqrt{0.0025} = 0.05 \).
- Test statistic: \( z = (\hat{p} - p_0)/\text{SE} = (0.60 - 0.50)/0.05 = 2.00 \).
- Two-sided p-value: \( P(|Z| \geq 2.00) = 2(1 - 0.9772) \approx 0.0455 \).
- Decision: \( 0.0455 < 0.05 \), so reject \( H_0 \).
Conditions for the interval
The interval has its own version of the same three checks — but aimed at \( \hat{p} \), not \( p_0 \), because there is no \( p_0 \) in an interval problem at all:
- Success/failure, checked against \( \hat{p} \): \( n\hat{p} \geq 10 \) and \( n(1-\hat{p}) \geq 10 \), using the same \( \geq 10 \) convention.
- Random sample.
- Independence: no more than 10% of the population.
- Conditions (checked against p-hat): \( n\hat{p} = 60 \geq 10 \) and \( n(1-\hat{p}) = 40 \geq 10 \). Proceed.
- Standard error for the interval (uses p-hat): \( \sqrt{\hat{p}(1-\hat{p})/n} = \sqrt{(0.6)(0.4)/100} = \sqrt{0.0024} \approx 0.04899 \).
- Margin of error: \( z^{*}\,\text{SE} = 1.96 \times 0.04899 \approx 0.09602 \).
- Interval: \( 0.60 \pm 0.096 \), i.e. about (0.504, 0.696).
WRONG (the mirror-image mistake): writing the confidence interval as \( \hat{p} \pm z^{*}\sqrt{p_0(1-p_0)/n} \). RIGHT: the interval's standard error uses \( \hat{p} \) — there is no null value in an interval problem to plug in at all.
WRONG: \'since p > alpha, we accept \( H_0 \).\' RIGHT: we fail to reject \( H_0 \) — insufficient evidence against it, never proof that it is true.
WRONG: \'there is a 95% probability that p lies in this interval.\' RIGHT: the 95% describes the procedure — repeated over many samples, about 95% of the intervals it builds capture the true p. Any one interval you compute is a single outcome of that long-run game, not a 95%-likely event.
Check your understanding
- The test statistic for a proportion uses p0 in the standard error, because H0 assumes p = p0 is true.
- The confidence interval uses p-hat in the standard error, because there is no null value to assume.
- Success/failure conditions are checked against p0 for the test and against p-hat for the interval, both using this course's n >= 10 convention.
- A p-value is P(data | H0), not the probability H0 is true; a small p-value means 'reject H0', a large one means 'fail to reject H0' — never 'accept H0'.
- '95% confidence' describes the long-run capture rate of the procedure, not the probability that one specific interval contains p.