Skip to content
BIASED

Hypothesis tests and A/B testing

Block 1 of 8~2 min

The button or the noise?

The topic Confidence intervals and the bootstrap taught us to put an honest error bar around an estimate. A product team usually asks a sharper question, one with a yes-or-no answer: is the effect real, or could chance alone have produced it?

Here is the example we will carry through the whole topic. A team tests a new "Buy" button. Users are split at random into two groups of n=20 000n = 20\,000 each: group A sees the old button, group B the new one. The conversion rates come out as

p^A=0.020,p^B=0.023.\hat p_A = 0.020, \qquad \hat p_B = 0.023.

Group B converted better by 0.3 percentage points. But even two identical buttons would never give exactly equal rates. Each rate is a sample proportion, and by the central limit theorem it wobbles around its true value pAp_A or pBp_B.

The random split matters as much as the arithmetic. Because a coin decides who sees which button, the groups differ in only two ways: the button and chance. The test will account for chance, so whatever is left is the button's doing. Show the new button only to this week's sign-ups instead, and the groups differ in a hundred other ways that no calculation can separate.

A hypothesis test turns the question into a calculation. Assume there is no effect, compute how surprising the data would be under that assumption, and act only if they are surprising enough.

Answers are saved on the server and tied to this browser until you sign in.