Why Pooling Is Part of the Null Model
A two-proportion test asks whether two population proportions differ. Under the null hypothesis of equality, the model treats both groups as having the same underlying success probability. That shared probability is estimated using the data from both groups, which is why the test uses a pooled proportion. The resulting standard error also reflects the null model: it estimates the variability of the difference when the two population proportions are equal.
A confidence interval for the difference answers a different question. It estimates the difference without imposing equality, so it estimates variability separately in each group. Pooling is therefore not a rule that applies to every calculation involving two proportions; it follows from the model used for the equality test.
The pooled estimate is a weighted average of the two sample proportions, with weights determined by their sample sizes. It is the overall fraction of successes across the two groups. It is generally not the unweighted average \((\hat{p}_1+\hat{p}_2)/2\), unless the group sizes are equal.
The Model and the Pooled Estimate
For the standard two-proportion test, suppose outcomes within each group are modeled as independent Bernoulli observations: each observation is either a success or a failure, and within group \(i\) each has the same success probability \(p_i\). The two groups are independent of each other, and the sample sizes are treated as fixed. Thus the success counts have binomial distributions, \(X_1\sim\operatorname{Binomial}(n_1,p_1)\) and \(X_2\sim\operatorname{Binomial}(n_2,p_2)\). The null hypothesis imposes the restriction \(p_1=p_2=p\), leaving one common probability to estimate.
Under this null model, the likelihood of the observed counts, as a function of \(p\), is proportional to \(p^{x_1+x_2}(1-p)^{n_1+n_2-x_1-x_2}\). The omitted binomial coefficients do not depend on \(p\), so they do not change which value of \(p\) maximizes the likelihood. For an interior maximum, take the logarithm and differentiate:
Here \(C\) is constant with respect to \(p\). When the total number of successes is strictly between zero and the total sample size, set the derivative equal to zero:
Multiplying by \(p(1-p)\) and rearranging gives \((x_1+x_2)(1-p)=(n_1+n_2-x_1-x_2)p\), and therefore \(x_1+x_2=(n_1+n_2)p\). The maximizing value is the pooled fraction of successes.
The boundary cases must be handled separately because the derivative equation has no interior solution there. If \(x_1+x_2=0\), every observation is a failure and the likelihood is proportional to \((1-p)^{n_1+n_2}\), which is maximized at \(p=0\). If \(x_1+x_2=n_1+n_2\), every observation is a success and the likelihood is proportional to \(p^{n_1+n_2}\), which is maximized at \(p=1\). The pooled formula gives these same values, so it holds for all possible counts.
This is the key reason for pooling: once \(H_0\) says the probabilities are equal, the likelihood estimates one shared probability from all observations. It does not estimate two unrelated probabilities and then average them without regard to sample size.
Worked Example: Calculating the Pooled Estimate
In a hypothetical comparison, group 1 has 36 successes among 80 observations, and group 2 has 30 successes among 100 observations. Find the pooled estimate required by the equal-proportions null model.
The sample proportions are \(\hat{p}_1=36/80=0.4500\) and \(\hat{p}_2=30/100=0.3000\). Under \(H_0:p_1=p_2\), estimate the shared probability from the combined counts:
There are 66 successes among 180 observations in total. The pooled estimate is 0.3667, not the unweighted average \((0.4500+0.3000)/2=0.3750\). The larger second group contributes more observations to the combined estimate.
Deriving the Test Standard Error
The quantity tested is the difference in sample proportions, \(\hat{p}_1-\hat{p}_2\). To understand its standard error under the null, first consider its variance if the common population probability \(p\) were known. For a sample proportion from \(n_i\) independent Bernoulli observations, the variance is \(p(1-p)/n_i\). Because the groups are independent, the variance of their difference is the sum of the two variances; subtracting one independent random quantity does not subtract its variance.
The standard deviation is the square root of this variance. Since the common \(p\) is unknown, the test estimates it with \(\hat{p}_{\text{pool}}\). This gives the pooled standard error used for the two-proportion equality test:
The variance calculation follows from the independent Bernoulli model. Using a normal approximation for the standardized statistic is an additional approximation: it is most credible when the data provide enough successes and failures for the sampling distribution to be reasonably close to normal. A computed pooled standard error does not by itself guarantee that this approximation is adequate.
Worked Example: Finding the Null-Based Standard Error
Use the hypothetical counts from the previous example: \(x_1=36\), \(n_1=80\), \(x_2=30\), and \(n_2=100\). The pooled estimate is \(\hat{p}_{\text{pool}}=0.3667\). Calculate the test standard error.
Substitute the pooled estimate and both sample sizes into the null-based formula:
The arithmetic is \(0.3667(0.6333)\approx0.2322\), and \(1/80+1/100=0.02250\). Thus \(SE_{\text{test}}=\sqrt{0.2322(0.02250)} =\sqrt{0.005225}\approx0.07228\). In this hypothetical setting, the null-based standard error of the difference in sample proportions is about 0.0723, or 7.23 percentage points.
The sample difference is \(0.4500-0.3000=0.1500\), or 15.00 percentage points. The standard error describes the estimated sampling variability of that difference under the common-proportion null model; it is not the size of the difference itself.
Why a Confidence Interval Uses a Different Standard Error
A confidence interval for \(p_1-p_2\) does not begin by assuming \(p_1=p_2\). It estimates each population proportion separately with its own sample proportion. Under the same independent Bernoulli model, the estimated standard error for that interval is
The two formulas differ because they estimate variability under different models. The test standard error estimates both group variances using one common probability, as specified by \(H_0\). The interval standard error uses each group’s own estimated probability, allowing the proportions to differ. Neither formula is a universal replacement for the other.
Worked Example: Comparing Test and Interval Standard Errors
Consider a different hypothetical data set with 28 successes among 40 observations in group 1 and 12 successes among 40 observations in group 2. Compare the standard error for an equality test with the standard error used for an interval estimate of the difference.
The sample proportions are \(\hat{p}_1=28/40=0.7000\) and \(\hat{p}_2=12/40=0.3000\). For the test, the pooled estimate is \((28+12)/(40+40)=0.5000\). Therefore,
For the interval standard error, retain the two separate sample proportions:
The estimates differ because the equality test imposes one common probability of 0.5000, whereas the interval calculation uses 0.7000 for group 1 and 0.3000 for group 2. The difference in this example is noticeable, but the formulas can produce similar values in other data sets. Similarity in one case does not make the two standard errors interchangeable.
Boundary Counts and What the Formula Does Not Guarantee
The pooled estimate formula remains well-defined when the combined sample contains no successes or when every observation is a success. In those cases it equals 0 or 1, respectively. Substitution into the usual test standard error gives zero. That result signals a boundary situation, not evidence that the observed difference has no uncertainty in every relevant sense. The ordinary standardized statistic would divide by zero, so this normal-based calculation cannot be used as written.
Worked Example: All Observations Are Failures
Suppose, hypothetically, that group 1 has 0 successes among 20 observations and group 2 has 0 successes among 30 observations. The combined success count is zero, so the likelihood under the common-proportion model is maximized at \(p=0\). The pooled estimate is
Putting this value into the usual test standard error gives \[ SE_{\text{test}} =\sqrt{0(1-0)\left(\frac{1}{20}+\frac{1}{30}\right)}=0. \] Both sample proportions are also zero, so the observed difference is zero. The usual \(z\) ratio would be \(0/0\), which is undefined. The pooled estimate is still the likelihood maximizer, but this boundary data set does not support the ordinary normal test calculation.
Common Mistake: Pooling Every Time
- Wrong reasoning: “The problem compares two proportions, so I should combine the success counts for every standard error.” This ignores whether the calculation imposes the equal-proportions null.
- Correction: For a test of \(H_0:p_1=p_2\), use the common-proportion estimate and the pooled test standard error. For a confidence interval for \(p_1-p_2\), use the separate estimates and the interval standard error.
- Wrong reasoning: “The pooled estimate is the simple average of the two sample proportions.” This is only generally true when the sample sizes are equal.
- Correction: Pool the counts, or equivalently take the sample-size-weighted average of the proportions.
The distinction is about the assumptions of the calculation, not a cosmetic choice of formula. A test standard error describes variability under a specified null model. An interval standard error describes estimated variability when each group has its own estimated proportion. Choosing between them begins by identifying the inferential question.
Check Your Understanding
Try these questions using the definitions and reasoning in this tutorial.
- Group 1 has 18 successes among 60 observations, and group 2 has 24 among 80. Calculate the pooled estimate under \(H_0:p_1=p_2\). Why is it not generally the unweighted average of the sample proportions?
- State the null-model assumption that justifies using one pooled probability in a two-proportion test.
- Explain why the variance of \(\hat{p}_1-\hat{p}_2\) under the null is the sum, rather than the difference, of the two sample-proportion variances.
- What is the conceptual difference between the pooled test standard error and the standard error for a confidence interval for \(p_1-p_2\)?
- If the combined count has no successes, what is the pooled maximum-likelihood estimate, and what issue arises if it is substituted into the usual test standard error?