Which Test?

Draft: This page has not been reviewed by a statistician yet. Use it as a starting point and check important choices with a statistician.

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
# 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)
SPSS
* The first category of the variable counts as the 'success'.
NPAR TESTS
  /BINOMIAL (0.05)=infection.

Sources