What an A/B test answers
An A/B test randomly splits users into two groups, shows each a different version and compares an outcome such as conversion rate. Randomisation means any systematic difference is likely caused by the change. The statistics tell you whether the difference could be chance.
A worked example
A website tests a new checkout button. The control and variant each get 5,000 visitors.
| Group | Visitors | Conversions | Conversion rate |
|---|---|---|---|
| Control | 5,000 | 250 | 5.0% |
| Variant | 5,000 | 300 | 6.0% |
The variant converts at 6.0% against 5.0%, a difference of 1 percentage point. Is that real?
The test, step by step
| Step | Calculation | Result |
|---|---|---|
| Null hypothesis | No true difference between the groups | — |
| Pooled rate | (250 + 300) ÷ (5,000 + 5,000) | 5.5% |
| Standard error | √(pooled × (1 − pooled) × (1/5,000 + 1/5,000)) | 0.456 percentage points |
| z statistic | (6.0% − 5.0%) ÷ 0.456% | 2.19 |
| Two-sided p-value | Probability of a difference this large by chance if there were no real effect | 0.028 |
With a p-value of about 0.03, the result is below the common 0.05 threshold, so the difference is statistically significant at that level. A 95% confidence interval for the improvement runs from about 0.1 to 1.9 percentage points: positive, but the true gain could be small.
Reading it sensibly
- Significance is not the same as importance — check that the size of the gain matters to the business
- A wide interval means more uncertainty; a larger sample narrows it
- Decide the sample size and the metric before the test starts
Mistakes that invalidate tests
- Stopping the test the moment the result looks good, which inflates false positives
- Testing many variants or metrics without adjusting for multiple comparisons
- Running too short, missing weekday and seasonal patterns
- Letting users switch groups or changing the setup mid-test
- Ignoring guardrail metrics such as revenue per visitor or complaints
Related: model evaluation metrics and the product-side view in product metrics every PM should know.
Building a data career?
Talk to an advisor about data science programmes that fit your background.
Frequently Asked Questions
What does a p-value mean in an A/B test?
It is the probability of seeing a difference at least this large by chance if there were truly no difference between the groups.
Is a significant result always worth acting on?
No. Check that the size of the improvement matters for the business and consider the confidence interval.
Why should I not stop a test early?
Checking repeatedly and stopping when the result looks good raises the chance of a false positive.
How big should my sample be?
Decide before the test, based on the smallest improvement you care about and your baseline rate.