Problem
Analysts rarely accept random groups. They re-draw until the groups look alike, or let an algorithm pick similar users into control and pilot. The groups become dependent, yet the team still sizes the test with the population variance and analyses it with the two-sample Student's test. The group size is then overstated, the type I error falls far below the planned level, and a smaller sample cannot find a real effect.
Example from the article: a synthetic metric and an effect of 5 need 6279 users per group. With matched groups whose pairwise differences have a standard deviation of 50, the same test needs 784 per group, but only as a test of pairwise differences.
Solution in brief
Treat matched groups as pairs: test the pairwise differences with the one-sample Student's test and size the groups from the standard deviation of the differences. Synthetic data show this keeps the planned error rates at a much smaller size. On real data, cosine-distance matching cuts the group size almost 3 times.
Questions this case answers
- How to run a controlled experiment with matched control and treatment units while keeping the false-positive and false-negative rates at their planned levels
- How to reduce the required sample size of an experiment by pairing similar units and testing pairwise differences
- How to size and analyse an A/B test when the control group is matched to the pilot group instead of drawn at random
- How to keep type I error and power at the planned levels when the two samples are dependent
Tools and methods
- One-sample Student's test on pairwise differences — paired test for equal-sized matched groups
- Sample size formula — group size from the standard deviation of the differences
- Batch-wise cosine-distance matching — pairs pilot and control users
- A/A and A/B simulation with a synthetic effect — check of real type I error and power
Google or a one-time email code. No password.
