Z Test for a Proportion Calculator

Test one sample proportion against a target value. Compare tails, alpha levels, methods, and intervals. Download clear results for assignments, surveys, exams, and reports.

Calculator

Formula Used

The calculator uses the one sample z test for a population proportion.

Sample proportion: p̂ = x / n

Standard error under the null: SE0 = √[p0(1 − p0) / n]

Z statistic: z = (p̂ − p0) / SE0

For a two tailed test, the p value is 2 × P(Z ≥ |z|). For a right tailed test, it is P(Z ≥ z). For a left tailed test, it is P(Z ≤ z).

How to Use This Calculator

  1. Enter the number of observed successes.
  2. Enter the total sample size.
  3. Enter the hypothesized population proportion.
  4. Select the correct alternative hypothesis.
  5. Choose alpha and confidence level.
  6. Select an interval method.
  7. Add a planning proportion if power is needed.
  8. Press Calculate, then export CSV or PDF if required.

Example Data Table

Scenario Successes Sample Size p0 Alternative Alpha
Survey support test 64 100 0.50 p ≠ p0 0.05
Quality pass rate 188 220 0.80 p > p0 0.01
Defect reduction 14 300 0.07 p < p0 0.05

About the Z Test for a Proportion

A z test for a proportion checks one sample result against a claimed population proportion. It is useful when the outcome has two categories. Examples include pass or fail, yes or no, defect or no defect, and support or opposition.

Why This Test Matters

The test converts the sample difference into a standard z score. That score shows how far the observed sample proportion sits from the null value. The distance is measured in standard errors. A large distance gives stronger evidence against the null hypothesis.

Choosing the Correct Tail

The tail choice should match the research claim. Use a two tailed test when any change matters. Use a right tailed test when the true proportion is expected to be greater. Use a left tailed test when the true proportion is expected to be lower.

Understanding the P Value

The p value measures how unusual the sample result would be if the null claim were true. A small p value means the sample result is unlikely under the null model. When the p value is less than or equal to alpha, the calculator rejects the null hypothesis.

Confidence Intervals

The calculator also reports a confidence interval for the observed proportion. Wilson score is often stable for many sample sizes. Wald is simple, but it can perform poorly near zero or one. Agresti-Coull adds a small adjustment and can be useful for practical reporting.

Assumptions and Checks

This test relies on a normal approximation. The expected success count and expected failure count should usually be large enough. A common rule requires both values to be at least five. Smaller counts may need an exact binomial method instead.

Practical Use

Researchers use this test for surveys, audits, experiments, product testing, website conversion studies, and quality control. The result should be read with context. Statistical significance does not always mean practical importance. Review the sample proportion, confidence interval, effect size, and sample conditions together.

FAQs

What is a z test for a proportion?

It is a hypothesis test for one population proportion. It compares an observed sample proportion with a claimed value using the normal distribution.

When should I use this calculator?

Use it when your data has two outcomes and you want to test one sample proportion against a target or historical value.

What does p0 mean?

p0 is the hypothesized population proportion. It is the value assumed true under the null hypothesis before sample evidence is tested.

What is the sample proportion?

The sample proportion is successes divided by sample size. It estimates the true population proportion from your observed data.

What does the p value show?

The p value shows how unusual your result is under the null hypothesis. Smaller values give stronger evidence against the null claim.

Which confidence interval method should I choose?

Wilson score is a good default for many cases. Wald is simple. Agresti-Coull is adjusted and often better than Wald.

What is continuity correction?

Continuity correction adjusts the z statistic for discrete count data. It can make the normal approximation more conservative.

Can I export my result?

Yes. Use the CSV button for spreadsheet work. Use the PDF button for a simple report copy.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.