How it’s calculated
The one-proportion z-test checks whether a sample proportion is consistent with a claimed population proportion p₀. Under the null hypothesis the sample proportion p̂ is approximately normal with mean p₀ and standard error √(p₀(1 − p₀)/n), as long as n·p₀ and n·(1 − p₀) are both greater than 5.
Example (OpenStax Introductory Statistics 2e, Example 9.17): Joon samples 100 first-time brides and 53 say they are younger than their grooms. Is the proportion different from 50%? p̂ = 0.53, the standard error is √(0.5 × 0.5 ÷ 100) = 0.05, so z = 0.03 ÷ 0.05 = 0.6 and the two-sided p-value is 0.5485. At the 1% (or 5%) level there is not enough evidence that the proportion differs from 50%. These are the default values.
A p-value is the probability of a result at least this far from p₀ if p₀ were true. It is not the probability that the null hypothesis is true, and “not significant” does not show that p₀ is correct.
Frequently asked questions
When can I use the one-proportion z-test?
When the data are a random sample of yes/no outcomes and both n·p₀ and n·(1 − p₀) are greater than 5. Otherwise the normal approximation is poor and an exact binomial test is better.
Why does the standard error use p₀ and not p̂?
The test asks how unusual the sample would be if the null hypothesis were true, so it uses the null value p₀. A confidence interval for the proportion uses p̂ instead.
Should I choose a one-sided or two-sided test?
Decide before seeing the data. Use one-sided only if you would draw no conclusion from a difference in the other direction. If in doubt, use two-sided.
How does this relate to the A/B test calculator?
This page compares one sample with a fixed value. To compare two samples with each other (version A against version B), use a two-proportion test.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Introductory Statistics 2e, §9.5 Additional Information and Full Hypothesis Test Examples (Examples 9.17 and 9.18) — OpenStax
- Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator