Two-proportion z-test
Compares two independent proportions, using the pooled proportion for the test and the unpooled standard error for the confidence interval.
- Successes and trials in group i.
- .
- Pooled proportion.
- Standard normal quantile (1.96 for 95%).
When to use
Two independent groups with a binary outcome: conversion in A vs B, default rate in two segments, recovery under two treatments. Without continuity correction, equals the Pearson chi-square statistic of the 2×2 table.
Assumptions
- Independent observations, independent groups (random assignment or random samples).
- At least about 10 successes and 10 failures in each group; otherwise use Fisher's exact test.
How to interpret
Report the difference in percentage points with its CI, the relative lift (), and the p-value. The pooled test and unpooled interval can disagree slightly at the margin of significance.
Common mistakes
- Mixing up percentage points and percent ("from 12% to 15% is a 3-point or 25% increase").
- Treating repeated visits by the same user as independent trials.
- Peeking at the p-value daily and stopping when it dips below 0.05 (see peeking).
Example
Variant: 150 conversions of 1000; control: 120 of 1000. , , , ; 95% CI for the difference 0.0001 to 0.0599 (0.01 to 6.0 points). The evidence of a lift is borderline, and its size is very uncertain.