Problem
Many analysts run Mann-Whitney on A/B metrics because it is billed as the nonparametric, outlier-proof sibling of the t-test that "finds effects more often". On revenue or deal counts, where most users have zeros and the rest are skewed, it often says "the mean grew" when the mean fell. Teams then ship discounts that lose money or kill changes that work.
Example from the article: in a simulated discount case modeled on Avito experiments, paying users rose from 50% to 55% but the average check fell, so mean revenue dropped from 3.5 to 3.3 rubles. Mann-Whitney still reported growth in 32% of runs, the t-test in 0.7%.
Solution in brief
Mann-Whitney tests whether two samples come from the same distribution, not whether means or medians are equal. Compare tests by simulations with a known true effect, in both directions. Use the t-test for means, the bootstrap for medians, and Kolmogorov-Smirnov when the change is known to shift or scale the distribution.
Questions this case answers
- How to choose a statistical test for comparing the mean of a skewed, zero-inflated metric between two groups so that a positive result really means the mean moved in that direction
- How to check by simulation that a significance test keeps its false-positive rate and its direction of error under the effects you expect in an experiment
- How to choose a significance test for a skewed revenue or deals metric with many zeros in an A/B test?
- How to tell whether the Mann-Whitney test is valid for comparing means in your experiment?
Tools and methods
- Mann-Whitney test — rank-based homogeneity test, the subject of the critique
- t-test — correct test for the mean in all the author's simulations
- Kolmogorov-Smirnov test — homogeneity test that is more powerful than Mann-Whitney under a shift or scaling
- Bootstrap — suggested for medians
- A/A tests on historical data — source of realistic distributions for the simulations
Google or a one-time email code. No password.