How to Select the Right Statistical Tests for Different A/B Metrics

Mintao Wei1 Aug 2022

Problem

Analysts often run a t-test on every A/B metric out of habit. That works for a well-behaved average, but business metrics are often skewed, binary, ratios of event counts or percentiles. A wrong test gives wrong p-values. For event-level metrics the usual failure is an underestimated variance, which produces false positives and shipped features that do nothing. The author sorts metrics into five types with a default test for each.

Example from the article: the number of gifts sent or share actions per user is highly skewed with serious outliers, so a plain t-test on it is unreliable.

Solution in brief

Ask two questions per metric: does its sampling distribution meet the test's assumptions (independence, normality), and does the randomization unit match the analysis unit? The answers point to Welch's t-test or Mann-Whitney, a proportion z-test, the delta method with a t-test, a CLT-based z-test for percentiles, or simulation for sums.

Questions this case answers
  • How to pick a valid significance test for an experiment metric when its distribution is skewed or its analysis unit differs from the randomization unit
  • How to choose the right significance test for each type of A/B test metric?
  • How to test a click-through rate when users are randomized but clicks and views are the unit of analysis?
  • How to test a 95th percentile metric such as page load time in an A/B test?

Tools and methods

  • Welch's t-test — per-user averages that are not heavily skewed
  • Mann-Whitney U-test — sparse or heavily skewed per-user metrics
  • Proportion z-test — user-level conversion and retention rates
  • Delta method — correct variance for ratio metrics such as CTR
  • Bootstrap — resampling variance estimate, a check for critical decisions
  • SciPy — normality checks named by the author (QQ plot, Shapiro-Wilk, Kolmogorov-Smirnov)
Continue reading — it's free

Google or a one-time email code. No password.