Loading…

Inferences About the Difference Between Two Population Proportions for Large and Independent Samples

Statistics • Estimation and Hypothesis Testing, Two Populations

View all topics

Use when you have two large, independent samples and you want inference for p₁ − p₂. For confidence intervals we use an unpooled standard error; for hypothesis testing we typically use a pooled standard error under H₀.

Number with the characteristic (successes).

Total observations in sample 1.

Number with the characteristic (successes).

Total observations in sample 2.

Interval form: (p̂₁ − p̂₂) ± z* · sp̂₁−p̂₂ (unpooled).

Ready
Standard normal visualization
-4 -2 0 2 4
The shaded area updates after calculation.

When this method applies

Use this calculator when:

  1. The two samples are independent.
  2. Each sample is large (rule-of-thumb: n₁p̂₁, n₁q̂₁, n₂p̂₂, n₂q̂₂ are all > 5).
  3. The sampling distribution of p̂₁ − p̂₂ is approximately normal.
Key formulas used
\[ \begin{aligned} \hat{p}_1 &= \frac{x_1}{n_1}, \quad \hat{p}_2 = \frac{x_2}{n_2}, \quad \widehat{(p_1-p_2)} = \hat{p}_1-\hat{p}_2 \\ s_{\hat{p}_1-\hat{p}_2} &= \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_1}+\frac{\hat{p}_2(1-\hat{p}_2)}{n_2}} \quad (\text{CI, unpooled}) \\ \bar{p} &= \frac{x_1+x_2}{n_1+n_2}, \quad \bar{q} = 1-\bar{p} \\ s_{\hat{p}_1-\hat{p}_2}^{(pooled)} &= \sqrt{\bar{p}\bar{q}\left(\frac{1}{n_1}+\frac{1}{n_2}\right)} \quad (\text{HT, pooled when }\delta_0=0) \\ z &= \frac{(\hat{p}_1-\hat{p}_2)-\delta_0}{s_{\hat{p}_1-\hat{p}_2}^{(\cdot)}} \end{aligned} \]
For hypothesis tests, δ₀ is usually 0.
Enter values and click Calculate.
Batch mode: paste CSV data (compute many rows at once)

Paste rows as CSV (comma-separated; tabs also work). Header is optional. Supported columns: x1, n1, x2, n2, and (optional) conf, alpha, delta0, alt (two/gt/lt), task (ci/ht).

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does a two-proportion z test measure?

A two-proportion z test evaluates whether two population proportions differ by testing a claim about p1 - p2. It uses the sampling distribution of (p1hat - p2hat) under a large-sample normal approximation.

Why is a pooled proportion used in the hypothesis test for p1 - p2?

When H0 states p1 - p2 = d0 (commonly 0), the test standard error is typically based on a pooled estimate of the common proportion. The pooled proportion is phat = (x1 + x2) / (n1 + n2) and is used to compute the pooled standard error.

When is the normal approximation valid for two proportions?

The large-sample z method is appropriate when each sample has enough successes and failures, so that n1p1hat, n1(1-p1hat), n2p2hat, and n2(1-p2hat) are all reasonably large. Independence between the two samples is also required.

How do I interpret a confidence interval for p1 - p2?

The interval gives a plausible range of values for the true difference p1 - p2 at the chosen confidence level. If the interval includes 0, the data are consistent with no difference between the population proportions at that confidence level.