Tests for one proportion (z-test and exact binomial test)
Tests whether a population proportion equals p₀, by the score z-test (large samples) or the exact binomial test (any size).
- Number of successes and trials.
- Sample proportion .
- Proportion stated by H₀ (0 < p₀ < 1).
- Binomial probability .
When to use
A binary outcome (yes/no) from n independent trials and a benchmark proportion: a claimed defect rate, a historical pass rate, 50% for "no preference". Use the exact test for small samples or when or is below about 10; the z-test is the usual large-sample choice.
Assumptions
- Independent trials with a common probability of success (random sample).
- z-test: and (a common rule of thumb).
How to interpret
- The z-test is reported with a Wilson interval and the exact test with a Clopper–Pearson interval (each is the interval that inverts its test). The engine's z-test uses no continuity correction by default.
- The exact test is conservative: its actual Type I error rate is at most α, often less.
Common mistakes
- Using instead of in the test's SE.
- Doubling a one-sided exact p-value: the exact two-sided rule is different (sum of probabilities ≤ the observed).
- Applying the z-test to 3 successes out of 15.
Example
14 of 20 customers prefer the new design; . z-test: , , , Wilson 95% CI 0.481 to 0.855. Exact binomial test: , Clopper–Pearson CI 0.457 to 0.881. Neither gives significant evidence at α = 0.05; 20 customers are too few to pin down the preference.