Z-Test for One Population Proportion

Use this calculator to test if a population proportion differs from a hypothesized value (e.g., testing if success rate equals claim).

When to Use

  • Large sample size: $np_0 \geq 5$ and $n(1-p_0) \geq 5$
  • Binary outcomes (success/failure, yes/no)
  • Testing against a claim about the population proportion
  • Examples: Testing if defect rate equals 5%, testing if conversion rate is 20%

How to Use

Step 1: Enter the hypothesized proportion (p₀, as decimal)

Step 2: Enter the sample size (n)

Step 3: Enter the number of successes (k)

Step 4: Enter level of significance (α, typically 0.05)

Step 5: Select tail type (left, right, or two-tailed)

Step 6: Click “Calculate”

Step 7: Interpret results:

  • If p-value < α: Reject H₀ (proportion differs from claimed value)
  • If p-value ≥ α: Fail to reject H₀ (insufficient evidence of difference)
Z test Calculator for proportion
Population proportion ($p$)
Sample size ($n$)
No.Successes ($X$)
Level of Significance ($\alpha$)
Tail Left tailed Right tailed Two tailed
Results
Sample Proportion :
Standard Error of $p$:
Test Statistics Z:
Z-critical value:
p-value:

Test Formula

$$Z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$$

Where:

  • $\hat{p} = k/n$ = sample proportion
  • $p_0$ = hypothesized proportion
  • $n$ = sample size

Decision Rule

For two-tailed test (α = 0.05):

  • Reject H₀ if p-value < 0.05 or |Z| > 1.96
  • Otherwise: Fail to reject H₀

Assumptions

  1. Large sample: $np_0 \geq 5$ AND $n(1-p_0) \geq 5$
  2. Random sample with independent observations
  3. Binary outcome (two possible results only)

If sample too small: Use Plus-Four method


Worked Example

Scenario: Manufacturer claims defect rate is 2%. Sample: n=500, found 15 defects.

Hypotheses:

  • H₀: p = 0.02 (defect rate is 2% as claimed)
  • H₁: p ≠ 0.02 (defect rate differs, two-tailed)

Check requirements:

  • $np_0 = 500 × 0.02 = 10$ ✓
  • $n(1-p_0) = 500 × 0.98 = 490$ ✓

Calculation:

  • $\hat{p} = 15/500 = 0.03$
  • $SE = \sqrt{\frac{0.02 × 0.98}{500}} = 0.00626$
  • $Z = (0.03 - 0.02)/0.00626 = 1.596$
  • For α=0.05, two-tailed: critical Z = ±1.96
  • p-value = 0.110

Decision: p-value (0.110) > α (0.05), fail to reject H₀. No significant evidence that defect rate differs from 2%.


Common P-Value Misinterpretations

“p-value = 0.11 means 11% chance H₀ is true”“If H₀ is true, we’d see this result 11% of the time”

“Significant difference = practical importance”“Significant = statistically unlikely under H₀, may not be practically important”


Related: One Mean Z-Test, Tutorial