Two-Proportion Z-Test

Compare two independent proportions to determine if they differ significantly. Ideal for A/B testing and clinical trials.

Please verify you are human to use the calculator.

About the Two-Proportion Z-Test

The two-proportion z-test compares proportions from two independent groups to determine whether they differ significantly. It is the standard test for A/B testing, clinical trial response rate comparisons, and quality control defect rate comparisons. The test statistic uses the pooled proportion under the null hypothesis and follows a standard normal distribution for sufficiently large samples.

The test is valid when the normal approximation to the binomial holds: np ≥ 5 and n(1 − p) ≥ 5 in both groups. When this condition is not met (common with rare events or small samples), Fisher’s exact test should be used instead. The confidence interval for the difference in proportions uses unpooled standard errors, which is the correct approach for interval estimation even though the test statistic uses the pooled proportion.

Key assumptions include independent observations within and between groups, random sampling, and binary outcomes. In A/B testing, the independence assumption means each user must be assigned to exactly one variant. Violations such as repeated exposures or cross-contamination between variants invalidate the test.

A test result carries weight only when the hypothesis, the sample size and the decision rule were fixed before the data arrived. Every pilot we scope is built the same way, with success criteria and kill gates agreed in advance. That work is described under AI pilot design.

Related calculations

  • Chi-square independence test: Use a contingency table to represent association between categorical variables.
  • Fisher exact: Inspect Fisher's exact test when a two-by-two table is too sparse for the normal approximation.
  • One-proportion z-test: Compare one proportion with a specified reference probability.
  • Binomial: Inspect the independent binary count model for each group.
  • Ab test calculator: Use the A/B interface to enter visitor and conversion counts from two independent groups.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Two-Proportion Z-Test FAQ

Common questions about the two-proportion z-test