Formula Used
Sample proportions are p1 = x1 / n1 and p2 = x2 / n2.
The observed difference is d = p1 - p2.
The pooled estimate is p = (x1 + x2) / (n1 + n2).
Pooled standard error is SE = sqrt[p(1 - p)(1 / n1 + 1 / n2)].
Unpooled standard error is SE = sqrt[p1(1 - p1) / n1 + p2(1 - p2) / n2].
The test statistic is z = (d - d0) / SE.
The confidence interval is d ± z critical × unpooled SE.
How to Use This Calculator
Enter successes and total observations for both independent groups.
Set the null difference. Use zero for most equality tests.
Select the alternative hypothesis that matches your research question.
Choose pooled testing for a usual zero-difference z test.
Choose unpooled testing when you want separate group variability.
Press calculate. The result appears above the form.
Download the report as CSV or PDF after calculation.
Understanding the Test
A two sample proportion test compares rates from two independent groups. It is useful when each observation has two outcomes. Examples include pass or fail, click or no click, and yes or no. The calculator turns raw counts into proportions. Then it measures the difference against a null value. Most studies use zero as the null difference.
Why Proportions Need Care
Proportions have changing variability. A rate near one half is usually more variable than a rate near zero. Sample size also matters. Larger samples make the standard error smaller. Smaller samples create wider intervals and weaker evidence. That is why the tool asks for both successes and total trials.
Pooled and Unpooled Choices
The pooled method assumes both groups share one population proportion under the null hypothesis. It is common for a z test when the null difference is zero. The unpooled method keeps each group separate. It is often preferred for confidence intervals. This calculator shows the selected test standard error. It also reports the interval standard error.
Interpreting the Result
The z score shows how many standard errors the observed difference is from the null. A large positive z supports a greater alternative. A large negative z supports a less alternative. A two sided test looks for evidence in either direction. The p value converts the z score into a probability scale. Reject the null when the p value is below alpha.
Practical Use
Do not rely on significance alone. Also review the difference in proportions. A small difference can be statistically significant in a huge sample. A large difference can be uncertain in a small sample. Confidence intervals help explain practical size. They show a range of plausible differences. Check that groups are independent. Avoid using the test for paired before and after results. Use clear definitions for success. Report the counts, proportions, z score, p value, and confidence interval together. This gives readers enough context to judge the conclusion.
Assumption Checks
Use enough expected successes and failures in each group. Many classroom rules prefer at least five or ten. When counts are tiny, consider an exact method. Treat this page as an analytical aid, not final study design advice for planning work.
FAQs
What is a two sample proportion test?
It is a z test that compares two independent proportions. It checks whether the observed difference is large enough to reject a chosen null difference.
When should I use pooled standard error?
Use pooled standard error for the common hypothesis test where the null difference is zero. It assumes the two groups share one true proportion under that null.
When should I use unpooled standard error?
Use unpooled standard error when you want each group to keep its own variance. It is commonly used for confidence intervals.
What does the p value mean?
The p value measures evidence against the null hypothesis. Smaller values mean the observed difference is less compatible with the null model.
What is the null difference?
The null difference is the value tested against the observed difference. Most two proportion tests use zero, meaning no difference between groups.
Can I use this for paired data?
No. This calculator is for independent groups. Paired before and after outcomes need a paired proportion method, such as McNemar testing.
What if one group has zero successes?
The z test may be weak with extreme counts. The page still reports corrected ratios, but exact methods may be better for tiny samples.
Why does the confidence interval use unpooled error?
Intervals usually estimate the observed difference directly. Unpooled error reflects each sample proportion separately, so it is a common simple choice.