Math paradoxes

Courses / A/B testing paradoxes

Course · for marketers

A/B testing paradoxes

Test: a new "Buy" buttonday 9
A250 of 5,000 · 5.00% B293 of 5,000 · 5.86%
B +17%confidence 94%

Anyone who has run an A/B test has seen a line like this. Ship B? The course follows the questions that come next: isn't it noise, how many people do you need, can you stop early, what to do with a win in one segment. Five cases show traps the dashboard does not notice. A checklist closes it. Formulas are kept to a minimum, and every named term is first shown in a picture.

Solved 0 of 8 course puzzles
1

Noise or effect

"B +17%. Is that a real effect, or just luck?"

Each visitor either buys or not, a bit like a coin. So even two identical pages never give identical numbers. Below that is exactly the case: A and B are the same, both truly convert at 5%, and each gets 1,000 people. Run a few such tests and watch where the lift jumps.

An A/A test: two identical pages

A–
B–
Lift of B over A–

The typical size of this wobble is called the : how far a number from a sample usually lands from the true one. Run hundreds of A/A tests and the lifts pile up into a bell: the . The more visitors, the narrower the bell. Notice that lifts of tens of percent are ordinary here, even though the pages do not differ at all.

The A/A test: two identical pages

The same page is shown as "A" and as "B", converting at 5%, with 1,000 visitors each. How often will one of two identical pages "win" by 20% or more?

  • With 1,000 visitors per page, one of two identical pages "wins" by 20% or more in about 36% of tests. A +17% lift at this sample size proves nothing.
2

How many people you need, and how to check

"Fine, noise happens. How many visitors do I need not to be fooled by it? And how do I check my result?"

The size of a test depends on three things: the usual conversion rate, the smallest effect that matters to you, and how strictly you judge. The industry standard: at most 5% false winners between identical pages and 80% power, meaning the test spots a real effect of the chosen size 4 times out of 5. A small effect hides in the noise, so it needs many people: a lift half as big needs about four times the sample.

Sample size calculator

Per variant–
Duration–

Once a test has its sample, the result has to be checked. The check answers one question: if the pages were identical, how often would noise produce a gap at least as big as yours? That share is the . If it is below 5%, the result is called significant. The shows something else: all the effects your data are still compatible with. The numbers from the dashboard at the top of the page are already filled in below.

Result checker

Lift of B–
p-value–
Test could detect–lift, with 80% power

"Confidence 94%" in many tools means 1 minus the p-value. It is not the probability that B is better. It only measures how rarely noise produces a gap like this. Distributions, power and the winner's curse are covered in more depth in round 4 of the A/A test puzzle and round 5, with a calculator and a traffic split check.

3

May I stop once it shows 95%?

"The test is planned for a month, but on day nine the dashboard already shows 95%. Why wait?"

The dashboard updates every evening, and every evening you want a look. The 95% threshold is designed for one look at the end of the test. What happens when you look every day and stop at the first "95%" is shown in the puzzle below: the two pages are identical, and the marketer checks every evening for 30 days.

Peeking at an A/B test

Two identical pages, a 30-day test, a check every evening and a stop at the first "95%". How often is one of the identical pages declared the winner?

  • Daily looks over 30 days turn one of two identical pages into a "winner" in about 28% of tests instead of the promised 5%. Every look gives noise one more chance.
  • If you really need to be able to stop early, plan the looks in advance with stricter bounds (next chapter).
4

I can't wait a month

"The calculator says 5 weeks. I don't have that long. What now?"

There is no free way: each option below pays with something. The numbers follow the calculator example: 5% conversion, we want to detect +10%, the 95% standard and 80% power, that is 31,234 visitors per page. Each option is worked through with an interactive in round 5 of the peeking puzzle.

What to doWhat it costsWhen it fits
1. Plan the looks in advanceA few looks on fixed days with stricter bounds (O'Brien–Fleming) What it costsA somewhat larger maximum sample, and discipline: look only on the planned days When it fitsThe effect may be large, and then you want to stop early
2. Test a bolder change+20% needs 8,158 per page instead of 31,234 What it costsYou won't see small improvements When it fitsLow traffic: a new offer, price or page structure instead of a button shade
3. Remove noise with "before" data (CUPED)Noise is multiplied by 1 − ρ²; at ρ = 0.5 the test is a quarter shorter What it costsYou need data on the same people before the test When it fitsLogged-in or returning customers, not new visitors from ads
4. A more sensitive metricA click happens more often than a purchase, so there is relatively less noise What it costsIt is a proxy: more clicks do not guarantee more money (chapter 7) When it fitsThe link between the proxy and revenue has been checked separately
5. A weaker standard, knowingly90% and 80% power: 24,603; 95% and 50%: 15,288; 90% and 50%: 10,767 per page What it costsMore false winners or more missed ideas When it fitsCheap changes that are easy to roll back; the standard is written down before the start
6. A multi-armed banditTraffic gradually shifts to the better variant What it costsA weak conclusion: the worse variant sees few people, so little is known about it When it fitsThe goal is to earn, not to learn: a short promotion, email subject lines
7. Don't call it an experimentShip the change and keep a small holdout on the old version What it costsYou won't learn whether the change helped; the holdout only catches big failures When it fitsThere is too little traffic for any test
5

But it won in Poland!

"Overall B did nothing. But in Poland, on mobile, among new customers, it is significantly better. Ship it there?"

After a test that showed nothing, it is tempting to slice the result: countries, devices, traffic sources, new and returning customers. Each slice is a separate check, and each has its own chance of a false winner. The puzzle below works out what happens when a new email is no better than the old one and the result is split into 20 countries.

Slice it until something wins

The new email is no better than the old one. The analyst checks the result in 20 countries. What is the chance at least one shows a "significant" difference?

  • With 20 independent slices and no real effect at all, the chance of at least one "significant" one is 1 − 0.95²⁰ ≈ 64%. With many slices, each one needs a stricter threshold (the Bonferroni or Holm corrections).
6

Case: a careful rollout

"We started B on 10% of traffic and added more every day. B is better on every day of the week. So it is better for the week too?"

A gradual rollout sounds sensible: if B is broken, few people suffer. But it quietly changes which days end up in each group. A shop gets 10,000 visitors a day. On Monday 10% of them go to B, the share grows every day, and by Sunday it is half. People here buy half as often on weekends as on weekdays. And every day, B converts 5% better than A.

The classic version of this trap is in the catalogue. If you want to solve it yourself, do it before the case.

Simpson's paradox

Treatment A beats treatment B for small kidney stones and for large ones. Can B be better for all the patients together?

A week of gradual rollout

Who won the week, if you add all visitors together?

ABcircle size = how many people saw the variant that day

Week combined: B vs A–
Comparing within days–

7

Case: fewer buy from the cart

"A new product card: more people add to cart, but fewer buy from the cart. Cart conversion fell from 40% to 33%. Is B worse?"

Visitors differ. Some came to buy, some are comparing, some are just browsing. The new card does not change those who were ready anyway. It persuades some of the lukewarm to put the item in the cart. These new people buy less often than those who added to cart before, so the share of carts that end in a purchase falls. Each dot below stands for 10 visitors.

The funnel: 10,000 visitors per variant

hot, 20%: came to buywarm, 30%: comparinglukewarm, 50%: browsing

Cart → purchase · A and B–
Purchases per visitor · A and B–

People are split at random only at the entrance: each visitor has an equal chance of seeing A or B. So A and B are fairly comparable only at the level of all visitors. Those who reached the cart have already been selected by the page itself, and in B they are different people than in A.

Berkson's paradox

In town, looks and kindness are unrelated. You only date people who are good-looking and kind enough together. Are the two linked among your dates?

Survivorship bias: Wald's planes

Bombers come back with holes in the fuselage and wings, and hardly any on the engines. Where should the armour go?

  • This is a relative of Berkson's paradox: selecting by a later step creates a picture that is not there in the whole crowd, just as "good-looking" and "kind" become opposites among the people you date.
8

Case: +15% in the first week, then nothing

"After a week of testing the new banner gave +15%. We shipped it, and a month later revenue is the same as before. Where did the effect go?"

Returning customers notice something new and click out of curiosity. After a few days they get used to it, and the effect fades. Below is a model of such a test: the banner's true long-run effect is +2%, but on the first day novelty adds another +30%, and that extra halves every two days. Each variant gets 5,000 people a day, A converts at 5%. Choose the day you stop the test.

The lift day by day

lift on a single daycumulative lift, as on the dashboardthe model's true daily effectwhat stays for good

Dashboard on the stop day–
Stays after the launch+2%

Even a month does not fully save you: the cumulative lift all days, and the first week pulls it up. It is more honest to look at the lift in the last weeks, or at the lift by days since a person's first visit: if it is large in the first days of acquaintance and then melts, that is novelty. The reverse happens too: people get used to an unfamiliar interface, and the effect grows over time.

Regression to the mean

After praise players do worse, and after criticism they do better. Does that mean criticism works?

  • Besides novelty, regression to the mean is at work: a test stopped when the lift looked its best records a lucky streak of noise, and the following days will most likely be more ordinary.
9

Case: the wins add up, revenue doesn't

"Over the year we shipped every significant winner. In the report they add up to a big gain. Why has revenue barely moved?"

A team runs 40 tests a year. Only some of the ideas really work, and their effect is modest: +5% on a 5% conversion rate. The other ideas change nothing. Every significant winner goes into the product, and its lift from the dashboard is written into the report. Assume also that half a year later a third of a real effect has faded, as in chapter 8. Compare three numbers: what was written in the report, what was real, and what a holdout group that saw the old site all year will show.

A year of tests

shipped, the idea really worksshipped, the idea is emptynot shipped

Three mechanisms are at work here. First: false winners, empty ideas that won thanks to noise. Second: the winner's curse. A low-power test lets a real idea through only when noise happened to help it this time, so the recorded lift of a real winner is usually several times its true effect. Third: effects fade after the launch. The bigger the sample, the weaker the first two mechanisms: move the second slider to the right.

The false positive paradox

1% of people have a disease. The test is 99% accurate, and you test positive. What is the chance you're really ill?

  • The share of false winners among the winners depends on how rare good ideas are. It is the same mechanism as in the false positive paradox: when the real thing is rare, even an accurate test gives many false "yes" answers.
10

Case: we counted sessions, not people

"The tool splits people into A and B, and the report shows session conversion. What's the difference?"

One loyal customer comes twenty times a month, and those sessions are alike: if they like to buy, they buy often. For the test they are not 20 observations but roughly one. A check that counts every session separately believes it has far more data than it does, and so sees "significant" differences where there are none. Below is an A/A test: 1,000 people per variant, 90% of them visit once, and 10% are loyal customers who visit many times.

A thousand A/A tests, counting sessions

Each column is one person, each square a session, a filled one a session with a purchase. Loyal customers' purchases come in bunches.

z in the tests, counting sessions"significant": |z| > 1.96the curve the check assumes

"Significant", counting sessions–
By the formula–
Counting people (delta method)–

How wrong the check is can be estimated with the simple design-effect formula: the noise is really 1 + (m − 1)·ρ times bigger, where m is the number of sessions per person (for unequal visits, the average weighted by sessions) and ρ is how alike one person's sessions are. When everyone visits once, or one person's sessions are independent, the formula gives 1 and there is no error.

✓

A/B test checklist

Before the test

  1. One main metric per visitor — purchases or revenue per randomised person, not a rate at a later step.
  2. Sample and duration worked out in advance, in whole weeks.
  3. No time — an honest compromise is chosen and written down before the start.
  4. Segments named in advance; the rest only as hypotheses.
  5. Split and count the same unit: people, not sessions.

During the test

  1. Don't stop at the first "95%": decisions only on the planned day.
  2. B's share stays constant; if not, compare within days.
  3. Traffic split as planned, and an A/A test gives about 5% "significant" results.
  4. Lift week by week: does it melt after the first week?

After the test

  1. p-value and confidence interval, not just the lift; "not significant" ≠ "nothing".
  2. Discount the recorded lift of a small test, and repeat important wins.
  3. A long-term holdout shows what all the changes gave together.

What next