Art of DS

Appearance

Palette
Theme
Unlock $20 one time
Sign in, or create an account

Sign in to Art of DSCreate your Art of DS account

We email you a link and a six-digit code. Either one signs you in; there is no password.Enter your email. We send a link and a six-digit code to confirm it — no password to remember. The account is free.

  • You come back to this page, right where you were.
  • Already have an account? The same email simply signs you in.

By continuing you accept the Terms and the Privacy policy.

Your account

Free accountLifetime access

difficulty 3/5

A/B testing

Definition

Randomly assigning subjects to two variants and comparing an outcome, so that the difference you measure can be attributed to the change rather than to who happened to see it.

Formula
z=p^1−p^2p^ (1−p^)(1n1+1n2),p^=x1+x2n1+n2z = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\hat{p}\,(1-\hat{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}, \qquad \hat{p} = \frac{x_1 + x_2}{n_1 + n_2}

Intuition

You change the button and conversions go up 3%. The question is not whether the number moved — it always moves. The question is whether it moved for the reason you think.

Two things could have produced that 3%. The change might work. Or this week's visitors might simply have been slightly keener than last week's, in the way that any two samples differ. Nothing in the 3% itself distinguishes these, and you cannot resolve it by staring at the number harder [2, §9.1].

Randomisation is what makes the difference interpretable. Assign each arriving visitor to A or B by coin flip and the two groups are, in expectation, alike in every respect except the change — including the respects you never thought to measure [3, §7.8]. Then the second question becomes answerable: how big a difference would two identical variants have shown, purely by chance? If the answer is "routinely bigger than 3%", you have learned nothing yet [2, §9.1].

Formal definition

How it works

Where it's used

Why & when

Worked example

Pitfalls

Check yourself

3 questions

The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.

Unlock all quizzes

On the cheat sheet: Statistical testing →

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods — Product and Process Comparisonsstandard · retrieved 2026-09-05https://www.itl.nist.gov/div898/handbook/prc/prc.htm
  2. Downey. Think Stats — Ch. 9, Hypothesis Testing, 2nd ed.book · retrieved 2026-09-05https://greenteapress.com/thinkstats2/html/thinkstats2010.html
  3. Allen B. Downey. Think Stats — Ch. 7, Relationships between variablesbook · retrieved 2026-10-04https://greenteapress.com/thinkstats2/html/thinkstats2008.html

Have a promo code?

A code that takes 100% off unlocks everything at once. A smaller one takes its share off the price in the payment window: enter the same code there.

Write to support

A question, a problem with access, a refund? Write to us and we answer by email.

What is it about?

Your address is used only to answer you.

Message sent

Thank you. We will reply to the address you gave, by email.

Or write to us directly

support@artofds.com

Message sent Thank you. We will reply to the address you gave, by email.

Check the email address: we need it to reply.

That is our own address. Enter yours, so the reply reaches you.

This address cannot receive email. Check it for a typo.

Write a little more: at least 10 characters.

Too many messages in a short time. Try again in a few minutes.

The message could not be sent. Please write to us directly: support@artofds.com