One-Proportion Z-Test Calculator

Test a sample proportion against a claimed value: p̂, standard error, z statistic, p-value and decision, with the normal-approximation check.

%
The value you are testing against, e.g. 50% for “half of all brides are younger than their grooms”.
Choose this before looking at the data.

Results

p-value
0.5485
Decision at α = 5%
Do not reject H₀ (p ≥ 0.05). The data do not give enough evidence that the true proportion is different from 50%. That is not the same as showing it equals 50%.
Sample proportion (p̂ = x ÷ n)
53.00 %
z statistic
0.60
Standard error under H₀, √(p₀(1 − p₀)/n)
0.05
Critical values ± z* at α = 5%
1.96
Normal-approximation check
n·p₀ = 50 and n·(1 − p₀) = 50 are both greater than 5, so the normal approximation is reasonable.

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.

p̂ = x / n z = (p̂ − p₀) / √( p₀ (1 − p₀) / n ) two-sided p = 2 × P(Z ≥ |z|) right-tailed p = P(Z ≥ z) left-tailed p = P(Z ≤ z) reject H₀ when p < α

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

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