Problem
A/B tests sometimes have to run on a metric with a heavy right tail and only a few observations per group. In that regime the sample mean is itself skewed. Student's t-test assumes normal means, so its p-values are wrong. Replacing the t-test with Mann-Whitney does not fix it, because that test does not compare means. Bootstrap does not help either, since a small sample cannot describe a distribution with a heavy tail.
Example from the article: groups of 10 observations drawn from a lognormal distribution with , tested for equal means.
Solution in brief
Build the test yourself. Take the difference of means as the statistic, then estimate its distribution under the null hypothesis by running many synthetic A/A tests on historical data. Comparing the observed difference with that distribution gives the p-value.
Questions this case answers
- How to get a valid p-value for a difference in means when samples are small and the metric is heavily skewed, so the t-test, rank tests and bootstrap are unreliable
- How to test a difference in means on small samples of a skewed metric when Student's t-test gives a wrong false-positive rate?
- How to build a statistical test with a valid p-value from historical data when no classical test fits?
- How to check that a home-made test is valid before using it on real experiments?
Tools and methods
- Synthetic A/A tests on history — random splits of past data into two groups, giving the null distribution of the statistic
- Student's t-test, Mann-Whitney test, bootstrap — classical options the article shows failing on small skewed samples
- NumPy, SciPy — simulation and the baseline tests in the article's code
Google or a one-time email code. No password.
