One Proportion Z-Test Calculator

Test if proportion differs from a value.

Number of successes must be a non-negative integer

Examples:

Enter sample data and hypothesized proportion to test

What Is a One-Proportion Z-Test?

The one-proportion z-test determines whether a sample proportion differs significantly from a hypothesized population proportion.

Question answered: "Is the true proportion different from this specific value?"

Examples:

  • "Is our conversion rate different from the industry standard of 3%?"
  • "Is the defect rate below the acceptable threshold of 2%?"
  • "Is voter approval above 50%?"

The Hypotheses

Null hypothesis (Hβ‚€): p = pβ‚€ (population proportion equals hypothesized value)

Alternative hypothesis (H₁):

  • Two-tailed: p β‰  pβ‚€ (proportion is different)
  • Right-tailed: p > pβ‚€ (proportion is greater)
  • Left-tailed: p < pβ‚€ (proportion is less)

The Test Statistic

z=p^βˆ’p0p0(1βˆ’p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

Where:

  • p^\hat{p} = sample proportion (x/n)
  • p0p_0 = hypothesized proportion
  • nn = sample size

The denominator is the standard error under the null hypothesis.

Example Calculation

Scenario: A company claims 20% of customers repurchase. We observe 85 repurchases in 500 customers. Is this different from 20%?

Data:

  • x = 85 repurchases
  • n = 500 customers
  • pΜ‚ = 85/500 = 0.17
  • pβ‚€ = 0.20

Calculation: SE = √[0.20 Γ— 0.80 / 500] = √[0.00032] = 0.0179

z = (0.17 - 0.20) / 0.0179 = -1.68

P-value: For two-tailed test, p = 0.093

Conclusion: The repurchase rate (17%) is not significantly different from 20% at Ξ± = 0.05 (p = 0.093).

Sample Proportion and Count

The test can be formulated two ways:

Proportion form: pΜ‚ = x/n

Count form: Test whether x differs from npβ‚€

Both give identical results. Use whichever is more natural for your problem.

Assumptions

Adequate Sample Size

Both npβ‚€ and n(1-pβ‚€) should be β‰₯ 10 (some sources say β‰₯ 5).

This ensures the normal approximation to the binomial is valid.

Example: n = 100, pβ‚€ = 0.05

  • npβ‚€ = 5 (borderline)
  • Consider exact binomial test instead

Independence

Each observation is independent. One outcome doesn't affect another.

Random Sampling

Sample represents population of interest.

Simple Random Sample

Or at least a sampling design that approximates it.

When to Use Exact Binomial Test

Use one-proportion z-test when:

  • n is large (β‰₯ 30)
  • npβ‚€ β‰₯ 10 and n(1-pβ‚€) β‰₯ 10
  • Quick approximation is acceptable

Use binomial test when:

  • Sample is small
  • Proportion is near 0 or 1
  • Exact p-value is required

Continuity Correction

The z-test approximates a discrete distribution (binomial) with a continuous one (normal).

Corrected z: z = (|pΜ‚ - pβ‚€| - 1/(2n)) / √[pβ‚€(1-pβ‚€)/n]

Effect: Makes the test slightly more conservative (higher p-values).

Modern view: Often unnecessary with adequate sample sizes.

Confidence Interval

A related calculation is the confidence interval for a proportion:

CI=p^Β±zβˆ—Γ—p^(1βˆ’p^)nCI = \hat{p} \pm z^* \times \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

If p0p_0 falls outside the 95% CI, you'd reject H0H_0 at Ξ± = 0.05.

Applications

Quality Control

Is defect rate at or below target?

Hβ‚€: p = 0.02 (2% defect rate) Observed: 15 defects in 600 items (2.5%)

Marketing

Is conversion rate above baseline?

Hβ‚€: p = 0.03 (3% conversion) Observed: 45 conversions in 1200 visitors (3.75%)

Political Polling

Does candidate have majority support?

Hβ‚€: p = 0.50 (50% support) Observed: 525 supporters in 1000 respondents (52.5%)

Medical Research

Is treatment success rate above standard?

Hβ‚€: p = 0.70 (70% historical success) Observed: 82 successes in 100 patients (82%)

A/B Testing

Is new variant's rate different from control?

Note: For comparing two variants, use two-proportion z-test.

One-Tailed Tests

Right-tailed (p > pβ‚€): Testing if proportion exceeds threshold. "Is success rate above 80%?"

Left-tailed (p < pβ‚€): Testing if proportion is below threshold. "Is defect rate below 1%?"

P-value: For one-tailed, divide two-tailed p-value by 2 (in the predicted direction).

Effect Size: Cohen's h

For proportions:

h=2arcsin⁑(p1)βˆ’2arcsin⁑(p2)h = 2 \arcsin(\sqrt{p_1}) - 2 \arcsin(\sqrt{p_2})

hInterpretation
0.2Small
0.5Medium
0.8Large

This transformation stabilizes variance, making h comparable across different baseline proportions.

Relationship to Chi-Square

For one proportion against expected:

zΒ² = χ² (with df = 1)

The one-proportion z-test is equivalent to a chi-square goodness-of-fit test with two categories.

Common Mistakes

Using Wrong Standard Error

The SE formula uses pβ‚€ (hypothesized), not pΜ‚ (observed).

For confidence intervals, use pΜ‚. For hypothesis test, use pβ‚€.

Ignoring Sample Size Requirements

If npβ‚€ < 10, the normal approximation is poor. Use exact binomial test.

One-Tailed Without Justification

One-tailed tests require prior directional hypothesis. Don't choose after seeing data.

Interpreting Non-Significance as Equality

p > 0.05 doesn't prove p = pβ‚€. It only means you can't rule out equality.

Power and Sample Size

For planning studies:

Minimum n = [z₁₋α/β‚‚ Γ— √(pβ‚€qβ‚€) + z₁₋β Γ— √(p₁q₁)]Β² / (p₁ - pβ‚€)Β²

Use sample size calculator for proportions for proper planning.

Reporting Results

APA format:

"A one-sample z-test for proportions indicated that the observed repurchase rate (17%, n = 500) did not differ significantly from the hypothesized 20%, z = -1.68, p = .093."

Include:

  • Sample proportion and n
  • Hypothesized value
  • z-statistic
  • P-value
  • Confidence interval (optional)

Historical Context

The one-proportion z-test emerged from the general framework of large-sample theory developed in the late 19th and early 20th centuries.

The test applies the Central Limit Theorem to proportions: with sufficient n, sample proportions are approximately normally distributed around the true proportion.

Abraham de Moivre (1733) and Pierre-Simon Laplace (1812) established the theoretical foundations. The modern formulation became standard in mid-20th century statistical practice.

Related Calculations

Summary

The one-proportion z-test determines whether a sample proportion differs from a hypothesized value by calculating z = (pΜ‚ - pβ‚€) / SE, where SE uses the null hypothesis proportion. The test requires npβ‚€ β‰₯ 10 and n(1-pβ‚€) β‰₯ 10 for valid normal approximation; otherwise use exact binomial test. Report the sample proportion, hypothesized value, z-statistic, and p-value. For small samples or extreme proportions, the binomial test provides exact p-values without relying on the normal approximation.