z-test for a single proportion
Compares the proportion of patients with a yes/no outcome in one group with a known reference proportion.
Clinical example
Whether the proportion of patients with a postoperative infection on your ward differs from the proportion reported in the literature.
When to use it
- The outcome is yes or no, one per patient.
- You have one group and a known reference proportion.
- The sample is large enough for the z-test; otherwise use the exact binomial test.
Assumptions to check
Independent observations
One value per patient.
Enough patients for the z-test
With small samples, use the exact binomial test instead.
What to report
- Proportion with 95% CI
In your software
# R: exact binomial test (also fine for small samples)
binom.test(x = 12, n = 150, p = 0.05)
# R: z-test (normal approximation)
prop.test(x = 12, n = 150, p = 0.05)
* The first category of the variable counts as the 'success'.
NPAR TESTS
/BINOMIAL (0.05)=infection.