📊 StatCalc Hypothesis Testing · Single & Two Proportions
Statistics Guide

Hypothesis Testing for Proportions

Master single-proportion tests and two-proportion comparisons with worked examples, formulas, and free interactive calculators.

6 Worked Examples
2 Free Calculators
z Test Based
statistical-calculators.site Published October 15, 2025 Updated April 1, 2026

In our data-driven world, understanding proportions is crucial for making informed decisions. Whether you're analyzing election polls, clinical trial results, or market research data, proportions help us quantify and compare parts of a whole. This guide walks you through the fundamentals of single and two-proportion hypothesis testing with practical examples and free tools.

Single Proportion Analysis

A proportion represents a part of a whole — typically a value between 0 and 1. In statistics, we test whether a sample proportion differs significantly from a hypothesized population proportion. For example, if a company claims 60% of customers prefer their product, we can take a sample and test whether that claim holds.

Key Concepts

Population Proportion (p)

The true proportion in the entire population we are trying to estimate or test.

Sample Proportion (p̂)

The proportion calculated from your sample data: number of successes ÷ sample size.

Standard Error

Measures how much sample proportions vary. Smaller with larger samples.

Confidence Interval

A range of values likely to contain the true population proportion at a given confidence level.

Two normal distributions showing the concept of sampling distribution for proportions

Sampling distributions help us understand how sample proportions vary around the true population proportion.

Difference of Two Proportions

When we want to compare two groups, we analyze the difference between their proportions. This approach helps answer questions like:

Statistical Framework

The difference between two proportions follows a normal distribution when sample sizes are sufficiently large. Here are the components you'll compute:

Component Formula Description
Point Estimate p̂₁ − p̂₂ The observed difference between sample proportions
Pooled Proportion (x₁ + x₂) / (n₁ + n₂) Combined proportion used when testing H₀: p₁ = p₂
Standard Error √[p̂(1−p̂)(1/n₁ + 1/n₂)] Uses the pooled proportion p̂
Test Statistic z = (p̂₁ − p̂₂) / SE Compared against z critical value to reach a conclusion

Practice Questions & Solutions

Single Proportion

Question 1

A company claims that 75% of its customers are satisfied with their service. In a survey of 200 randomly selected customers, 140 reported satisfaction. Test whether the actual satisfaction rate differs from 75% at a 5% significance level.

Solution

1
Hypotheses

H₀: p = 0.75  |  H₁: p ≠ 0.75  (two-tailed)

2
Sample proportion

p̂ = 140 / 200 = 0.70

3
Standard error

SE = √[0.75 × 0.25 / 200] = √0.0009375 ≈ 0.0306

4
Test statistic

z = (0.70 − 0.75) / 0.0306 ≈ −1.634

5
Decision

Critical value at α = 0.05 two-tailed: ±1.96. Since −1.634 falls between ±1.96, fail to reject H₀.

Conclusion There is not enough evidence to conclude that the satisfaction rate differs from 75%.
Question 2

A political candidate believes she has more than 50% support. In a poll of 500 voters, 270 expressed support. Test her claim at a 5% significance level.

Solution

1
Hypotheses

H₀: p ≤ 0.50  |  H₁: p > 0.50  (one-tailed, right)

2
Sample proportion

p̂ = 270 / 500 = 0.54

3
Standard error

SE = √[0.50 × 0.50 / 500] = √0.0005 ≈ 0.02236

4
Test statistic

z = (0.54 − 0.50) / 0.02236 ≈ 1.789

5
Decision

Critical value at α = 0.05 one-tailed: 1.645. Since 1.789 > 1.645, reject H₀.

Conclusion There is sufficient evidence to support the claim that the candidate has more than 50% support.
Question 3

A manufacturer claims that no more than 5% of its products are defective. In a sample of 300 products, 24 are found defective. Test the manufacturer's claim at a 1% significance level.

Solution

1
Hypotheses

H₀: p ≤ 0.05  |  H₁: p > 0.05  (one-tailed, right)

2
Sample proportion

p̂ = 24 / 300 = 0.08

3
Standard error

SE = √[0.05 × 0.95 / 300] = √0.0001583 ≈ 0.01258

4
Test statistic

z = (0.08 − 0.05) / 0.01258 ≈ 2.385

5
Decision

Critical value at α = 0.01 one-tailed: 2.326. Since 2.385 > 2.326, reject H₀.

Conclusion There is sufficient evidence to conclude that the defective rate exceeds 5%.

Difference of Two Proportions

Question 1

A company tests two marketing strategies. Strategy A was presented to 150 customers, with 45 making a purchase. Strategy B was presented to 200 customers, with 80 making a purchase. Is there a significant difference in effectiveness at a 5% significance level?

Solution

1
Hypotheses

H₀: p₁ = p₂  |  H₁: p₁ ≠ p₂  (two-tailed)

2
Sample proportions

p̂₁ = 45/150 = 0.30   p̂₂ = 80/200 = 0.40

3
Pooled proportion

p̂ = (45 + 80) / (150 + 200) = 125/350 ≈ 0.3571

4
Standard error

SE = √[0.3571 × 0.6429 × (1/150 + 1/200)] ≈ 0.0517

5
Test statistic

z = (0.30 − 0.40) / 0.0517 ≈ −1.934

6
Decision

Critical value at α = 0.05 two-tailed: ±1.96. Since −1.934 is within ±1.96, fail to reject H₀.

Conclusion There is not enough evidence to conclude that the strategies have different effectiveness.
Question 2

A clinical trial tests two drugs. Drug A was given to 120 patients, with 78 showing improvement. Drug B was given to 130 patients, with 65 showing improvement. Test whether Drug A is more effective than Drug B at a 5% significance level.

Solution

1
Hypotheses

H₀: p₁ ≤ p₂  |  H₁: p₁ > p₂  (one-tailed, right)

2
Sample proportions

p̂₁ = 78/120 = 0.65   p̂₂ = 65/130 = 0.50

3
Pooled proportion

p̂ = (78 + 65) / (120 + 130) = 143/250 = 0.572

4
Standard error

SE = √[0.572 × 0.428 × (1/120 + 1/130)] ≈ 0.0626

5
Test statistic

z = (0.65 − 0.50) / 0.0626 ≈ 2.396

6
Decision

Critical value at α = 0.05 one-tailed: 1.645. Since 2.396 > 1.645, reject H₀.

Conclusion There is sufficient evidence to conclude that Drug A is more effective than Drug B.
Question 3

A survey asks men and women about their preference for a new product. Of 180 men surveyed, 108 liked the product. Of 220 women surveyed, 154 liked the product. Is there a significant difference in preference between genders at a 10% significance level?

Solution

1
Hypotheses

H₀: p₁ = p₂  |  H₁: p₁ ≠ p₂  (two-tailed)

2
Sample proportions

p̂₁ = 108/180 = 0.60 (men)   p̂₂ = 154/220 = 0.70 (women)

3
Pooled proportion

p̂ = (108 + 154) / (180 + 220) = 262/400 = 0.655

4
Standard error

SE = √[0.655 × 0.345 × (1/180 + 1/220)] ≈ 0.0478

5
Test statistic

z = (0.60 − 0.70) / 0.0478 ≈ −2.092

6
Decision

Critical value at α = 0.10 two-tailed: ±1.645. Since −2.092 < −1.645, reject H₀.

Conclusion There is sufficient evidence of a difference in product preference between men and women.

Interactive Calculators

Use these free calculators to verify your results instantly. Enter your values and the calculator handles all the computation — including the test statistic, p-value, and decision.

🎯

Single Proportion Hypothesis Test

Enter your sample size (n), number of successes (x), hypothesized proportion (p₀), and significance level. The calculator returns the z-statistic, p-value, and verdict.

Free Embed

Add this calculator to your website

Give your visitors the power of statistics — embed this tool for free with one line of code.

✓ Code copied successfully!

Powered by statistical-calculators.site

⚖️

Difference of Two Proportions

Enter sample sizes and successes for both groups, choose your significance level and tail direction. The calculator returns the pooled proportion, z-statistic, p-value, and decision.

Free Embed

Add this calculator to your website

Give your visitors the power of statistics — embed this tool for free with one line of code.

✓ Code copied successfully!

Powered by statistical-calculators.site

Conclusion

Understanding proportions and their differences is fundamental to statistical analysis across many fields. Whether you're working in business, healthcare, social sciences, or any data-driven field, these concepts help you make informed decisions based on evidence.

Remember that statistical significance doesn't always equate to practical importance. Always consider the context and potential impact of your findings beyond just the p-values.

With practice and the right tools, you can confidently analyze proportions and draw meaningful conclusions from your data.

proportion hypothesis testing statistical significance confidence interval z-test sample size p-value standard error null hypothesis alternative hypothesis statistical power type I error type II error binomial distribution normal approximation