Why Equal Allocation Simplifies the Calculation
Suppose two independent groups are each observed the same number of times, and each observation has one of two outcomes, such as a hypothetical device passing or failing a test. The parameter of interest is often the difference between the groups’ population proportions. An interval for that difference quantifies sampling uncertainty while preserving the direction of the subtraction.
When the two sample sizes are equal, the Wald interval has a compact standard error. The equal sample size does not make the groups’ observed proportions equal, and it does not justify pooling their outcomes. The interval uses a separate estimated variance for each group.
The equal-allocation Wald interval estimates the standard error using the two sample proportions separately. For a two-sided confidence level \(1-\alpha\), its endpoints are the estimate plus and minus the standard normal critical value times that estimated standard error.
Here \(z_{1-\alpha/2}\) is the standard normal quantile with cumulative probability \(1-\alpha/2\). Common values are approximately 1.645 for a 90% interval, 1.960 for a 95% interval, and 2.576 for a 99% interval. Keep the subtraction order consistent: if the requested difference is group 1 minus group 2, the estimate and the interval are centered on \(\hat p_1-\hat p_2\).
Why the Standard Error Has This Form
The formula follows from the sampling variability of two independent sample proportions. Each observation in group \(j\) is a Bernoulli random variable with success probability \(p_j\), so its variance is \(p_j(1-p_j)\). The sample proportion averages \(n\) such independent outcomes, giving variance \(p_j(1-p_j)/n\).
Independence between groups means the variance of the difference is the sum of the two variances. Replacing the unknown population proportions with their sample estimates gives the estimated standard error. With equal sample sizes, the same \(n\) appears in both terms:
The arrow indicates estimation: the population proportions are unknown and are replaced by the observed proportions. The Wald interval uses a normal approximation for the sampling distribution of the difference. It is intended for settings with independent observations, a binary outcome in each group, and enough observed successes and failures for that approximation to be reasonable. If the data are dependent, the outcome is not binary, or the approximation is poor, this formula may not be appropriate.
Calculate the Interval in a Consistent Order
Write down whether the target is \(p_1-p_2\) or \(p_2-p_1\). Use that same order throughout.
Divide the number of specified outcomes by the sample size in that group.
Use the separate terms \(\hat p_1(1-\hat p_1)/n\) and \(\hat p_2(1-\hat p_2)/n\), then take the square root of their sum.
Multiply the standard error by the chosen critical value, subtract and add that margin to the estimated difference, and describe the endpoints in the original context.
Worked Example: Comparing Two Hypothetical Service Teams
Method: Construct a 95% equal-allocation Wald interval for group 1 minus group 2, using the unpooled standard error. In a hypothetical review, 100 independently selected cases from each of two service teams are classified as resolved on the first contact or not. Team 1 has 68 first-contact resolutions and team 2 has 54. Treat the two groups as independent and the outcome as binary.
Step 1: Estimate the proportions and their difference.
Step 2: Calculate the standard error. The estimated variance terms are \(0.68(0.32)/100=0.002176\) and \(0.54(0.46)/100=0.002484\). Their sum is \(0.004660\), so the estimated standard error is \(\sqrt{0.004660}=0.068264\), to six decimal places.
Step 3: Find the margin and endpoints. For a 95% interval, use \(z_{0.975}=1.960\). The margin of error is \(1.960(0.068264)=0.133797\). Therefore the interval is \(0.14-0.133797\) to \(0.14+0.133797\), or \((0.006203,\,0.273797)\). Rounded to four decimal places, it is \((0.0062,\,0.2738)\).
Interpretation and check. Under the model and approximation used, the interval estimates that Team 1’s population first-contact resolution proportion is higher than Team 2’s by between 0.0062 and 0.2738, or about 0.62 to 27.38 percentage points. The interval is centered at 0.14: the average of its rounded endpoints is \((0.0062+0.2738)/2=0.14\). The common mistake avoided here is using a pooled proportion to calculate the interval’s standard error.
Worked Intervals at Different Confidence Levels
Worked Example: A 90% Interval for Two Independent Groups
Method: Use a two-sided Wald interval with separate estimated variances. A hypothetical usability study records whether participants complete a task without assistance. There are 80 independent participants in each of two groups; 52 in group 1 and 44 in group 2 complete the task. Find a 90% interval for \(p_1-p_2\).
Step 1: Find the estimate. The sample proportions are \(\hat p_1=52/80=0.65\) and \(\hat p_2=44/80=0.55\). The estimated difference is \(0.65-0.55=0.10\).
Step 2: Find the standard error. The two variance contributions are \(0.65(0.35)/80=0.2275/80=0.00284375\) and \(0.55(0.45)/80=0.2475/80=0.00309375\). Their sum is \(0.00593750\), giving \(\widehat{\operatorname{SE}}=\sqrt{0.00593750}=0.077055\), to six decimal places.
Step 3: Calculate the interval. For 90% confidence, use \(z_{0.95}=1.645\). The margin is \(1.645(0.077055)=0.126755\). Thus the endpoints are \(0.10-0.126755=-0.026755\) and \(0.10+0.126755=0.226755\). Rounded to four decimal places, the interval is \((-0.0268,\,0.2268)\).
Interpretation and check. The interval estimates the group 1 minus group 2 difference in task-completion proportions as between about 2.68 percentage points lower and 22.68 percentage points higher. Its midpoint is 0.10, as required. The common mistake avoided is treating the observed difference of 0.10 as the interval’s margin of error; the margin is instead the critical value multiplied by the standard error.
Worked Example: A 95% Interval for Hypothetical Quality Checks
Method: Apply the equal-allocation Wald formula to two independent samples of equal size. A hypothetical quality audit checks 250 items from each of two production processes. A passing check is the specified outcome. Process 1 has 175 passes and process 2 has 150. Calculate a 95% interval for \(p_1-p_2\).
Step 1: Calculate the sample proportions and difference. They are \(\hat p_1=175/250=0.70\) and \(\hat p_2=150/250=0.60\). The estimated difference is \(0.70-0.60=0.10\).
Step 2: Calculate the standard error. The group 1 contribution is \(0.70(0.30)/250=0.2100/250=0.00084\). The group 2 contribution is \(0.60(0.40)/250=0.2400/250=0.00096\). Their sum is \(0.00180\), so the standard error is \(\sqrt{0.00180}=0.042426\), to six decimal places.
Step 3: Calculate the interval. Using \(z_{0.975}=1.960\), the margin is \(1.960(0.042426)=0.083155\). The endpoints are \(0.10-0.083155=0.016845\) and \(0.10+0.083155=0.183155\). Rounded to four decimal places, the interval is \((0.0168,\,0.1832)\).
Interpretation and check. The estimated passing proportion for process 1 is higher by between 0.0168 and 0.1832, or about 1.68 to 18.32 percentage points, under this model. The interval midpoint is 0.10, and its width is \(0.1832-0.0168=0.1664\), consistent with twice the unrounded margin after rounding. The common mistake avoided is reversing the group order midway through the calculation, which would change the estimate’s sign.
Do Not Substitute a Pooled Standard Error
For a confidence interval, the unpooled standard error estimates the sampling variation using each group’s own observed proportion. A pooled estimate instead combines the successes and sample sizes into one proportion. That pooled standard error is used in certain tests under a null hypothesis that the population proportions are equal; it is not the standard error in the Wald interval presented here.
For example, in the first worked example the pooled proportion would be \((68+54)/(100+100)=0.61\). A pooled standard error would be \(\sqrt{0.61(0.39)(1/100+1/100)}=\sqrt{0.004758}=0.068978\), not the interval standard error \(0.068264\). The resulting calculation may look similar, but it uses a different estimate of variability and is not the equal-allocation Wald interval.
Check Your Understanding
For each problem, construct the requested interval for group 1 minus group 2. Use the unpooled Wald standard error and round final endpoints to four decimal places.
- A hypothetical survey records a binary response from 50 independent members of each of two groups. There are 31 responses of interest in group 1 and 25 in group 2. Find a 95% interval. (Answer: \((-0.0732,\,0.3132)\))
- Two independent groups of 120 people each are observed in a hypothetical program evaluation. The outcome of interest occurs 78 times in group 1 and 66 times in group 2. Find a 90% interval. (Answer: \((-0.0035,\,0.2035)\))
- A hypothetical inspection compares two independent processes, with 200 inspected items per process. There are 136 specified outcomes in group 1 and 112 in group 2. Find a 95% interval. (Answer: \((0.0256,\,0.2144)\))
- In a hypothetical independent-group study with 160 observations per group, the specified outcome occurs 104 times in group 1 and 120 times in group 2. Find a 99% interval. (Answer: \((-0.2312,\,0.0312)\))