An A/B test asks whether a gap is bigger than chance could make
The practice hands you two conversion rates. Before any formula, guess what chance alone could do to them.
Predict
A converts 10.0% and B 12.5%, on 2,000 users each. Could chance alone make a gap this big?
The practice problem's example
A, current
10.0%
B, new
12.5%
200 of 2,000 against 250 of 2,000, with users split at random. A gap of 2.5 points: the change, or chance?
Users are split at random between a control, A, and a treatment, B. Each user converts or doesn't, and a group's conversion rate is its conversions over its users: p^A=xA/nA. The hat marks a rate measured from the data, an estimate of A's true rate pA. B's rate p^B works the same way.
Randomization makes the groups alike in everything except the change. So a gap comes from the change or from chance, and your job is to say how much chance could do. Interviewers notice when you can: one Airbnb candidate came out of a hiring manager screen saying "they seem to really care about experiments" (1 report).
In the editor, write rates(conv_a, n_a, conv_b, n_b): each group's rate and the gap, the first three numbers the practice function computes.
Pick an answer above to see the rest
Instructions
1
Write rates(conv_a, n_a, conv_b, n_b): each group's conversion rate, then B's rate minus A's, as a tuple of three.