A/B Tests and Statistical Significance
Design a fair A/B test, read conversion results with a significance check, and avoid common pitfalls like peeking early and testing too many metrics.
Welcome back!
Step 1 of 10Learn
Did the new button work?
A product team changes the checkout button text from "Continue" to "Complete my order". The week after the change, the conversion rate rises from 3.1% to 3.4%. Success?
Not necessarily. That week also had a holiday sale, a competitor's website outage and a new email campaign. Any of these, or just normal week-to-week noise, could explain the change. Comparing before and after mixes the effect of the change with everything else that happened at the same time.
The solution is an A/B test: a randomized controlled experiment. During the same period, visitors are randomly assigned to see either version A (the original, the control) or version B (the change, the variant). Because assignment is random and both groups experience the same week, holidays and outages, the only systematic difference between them is the button. If B converts better by more than chance can explain, the button gets the credit.
A/B tests are standard practice in digital products, email marketing, pricing and ad design, and the same logic powers clinical trials in medicine. The ingredients:
- A clear hypothesis: "Changing the button text will increase checkout conversion."
- One primary metric, chosen in advance: checkout conversion rate.
- Random assignment of users, not of days or pages.
- A sample size and test duration decided before starting.
- A plan for judging whether the difference is statistically significant.
The randomization is what makes it work. Letting users choose a version, or showing B only to mobile users, brings back all the confounding the test was designed to remove.
Step 2 of 10Practice · Put in order
Put the steps of a well-run A/B test in order.
Drag the items, or use the arrow buttons, to put them in order.
- State the hypothesis and choose one primary metric
- Check whether the difference is statistically significant and practically meaningful
- Decide the sample size and test duration
- Run the test for the full planned duration
- Randomly assign users to version A or version B
- Roll out the winner or record what was learned
Step 3 of 10Diagram
Anatomy of an A/B test
Tap a shape with to see more.
- Pick metric and duration
Decide before you start.
- Randomly split visitors
- A sees old, B sees new
Same period, so holidays and outages hit both.
- Run the full duration
No peeking and stopping early.
- Test significance
- Decide
Step 4 of 10Learn
Is the difference real? Significance in plain terms
Even if the button made no difference at all, two random groups would almost never convert at exactly the same rate. So we need a way to judge whether an observed gap is bigger than chance would typically produce.
The standard approach starts by assuming there is no real difference (the null hypothesis) and asks: if that were true, how surprising would a gap this large be? The answer is the p-value: the probability of seeing a difference at least this large by chance alone if there were truly no effect.
- A small p-value (commonly below 0.05) means the result would be unusual under pure chance, so we call it statistically significant and conclude the variant likely has a real effect.
- A large p-value means the gap is within normal random variation. It doesn't prove the versions are equal; the test may simply be too small to detect a modest effect.
For comparing two conversion rates, a common quick check is the z-test for two proportions. The z-value measures how many standard errors apart the two rates are; a |z| above about 1.96 corresponds to p < 0.05 for a two-sided test.
Sample size drives everything. Detecting a lift from 3.0% to 3.3% takes tens of thousands of visitors per group; detecting a lift from 3% to 6% takes far fewer. Small effects need big samples. That's why many tests that "found nothing" were simply too short to find a real but modest improvement. Online sample size calculators help you plan this before starting.
Step 5 of 10Practice · Diagram
Reading p-values
Tap the result that is NOT significant at the 5% level.
Tap the shape that answers the question, then press Check.
- p = 0.001
Very surprising if there were no effect.
- p = 0.01
0.01
- 0.05 cutoff
The common threshold for "statistically significant".
- p = 0.3
A gap this size happens often by chance alone.
Step 6 of 10Try the calculator
A/B test significance check
Enter visitors and conversions for each version. The calculator shows both conversion rates, the relative lift and a z-value from a two-proportion z-test. |z| above 1.96 is significant at the 5% level (two-sided).
- Conversion rate A
- 3 %
- Conversion rate B
- 3.6 %
- Relative lift of B over A
- 20 %
- z-value
- 2.38
Step 7 of 10Practice · Estimate
Use the calculator with the default numbers (A: 300 of 10,000; B: 360 of 10,000). What is the z-value? (Pick the closest value.)
Step 8 of 10Learn
Common A/B testing mistakes
A/B tests are simple in principle and easy to get wrong in practice. Watch for these pitfalls:
- Peeking and stopping early. Checking results every day and stopping the moment p dips below 0.05 dramatically increases false positives, because random swings cross the line by chance along the way. Decide the duration in advance, or use methods designed for continuous monitoring.
- Testing too many metrics. If you check 20 metrics, one will probably look "significant" at p < 0.05 by chance alone. Name one primary metric before the test, and treat other findings as hypotheses for future tests.
- Too short a test. Behavior differs by weekday and time of month. Run tests for at least one full weekly cycle, often two.
- Novelty effects. Returning users sometimes click a new design just because it's new, and the lift fades after a few weeks.
- Ignoring practical significance. With millions of users, a 0.01-point lift can be statistically significant but not worth the engineering cost. Ask whether the effect is big enough to matter.
- Broken randomization. If the same user sees both versions, or one version loads more slowly for technical reasons, the comparison isn't fair. Check that the groups are similar in size and makeup (a sample ratio check).
A good analyst reports the estimated effect with its uncertainty, not just "significant" or "not significant": "Version B increased conversion from 3.0% to 3.6% (z ≈ 2.4); the likely true lift is somewhere between about 0.1 and 1.1 percentage points."
Step 9 of 10Practice · Select all that apply
Which practices make an A/B test result MORE trustworthy? Select all that apply.
Select all that apply.
Step 10 of 10Practice · Choose one
An A/B test with 2 million users per group shows conversion rising from 4.00% to 4.02%, with p < 0.05. What is the best interpretation?
Lesson complete!