The test statistic for a proportion
How many standard errors the sample is from H₀.
In a one-proportion z test, the test statistic measures how far the sample proportion is from the null value, in standard errors: z = (p̂ − p₀) / √(p₀(1 − p₀)/n). Use p₀ from H₀ in the standard error. A z far from 0 (beyond about ±2) gives a small p-value.
Example: H₀: p = 0.5; 60 of 100 say yes
- (0.60 − 0.5) ÷ √(0.5 × 0.5 ÷ 100)
- 0.10 ÷ 0.05
- z = 2 — Two standard errors above
Why it works: The test statistic counts how many standard errors the sample result is from the claimed value. The farther it is, the stronger the evidence.
Tip: Use the null value p₀ in the standard error for a test, but p̂ in a confidence interval.