Stop the Count! Why Putting A Time Limit on Metrics is Critical for Fast and Accurate Experiments

Zach Flynn17 Jul 2024

Problem

Many experiments compare the total count of an event after exposure: purchases, minutes watched, clicks on a call-to-action. If the metric keeps counting events from exposure until the analysis day, its variance per unit grows with experiment length. Running longer then does not guarantee significance, the average treatment effect may not exist, and standard sample-size formulas give wrong run times. The symptom is a confidence interval that stays wide however long the test runs, with no way to tell how long to wait.

Illustrative example: a video team measures "minutes watched since exposure" and extends the test for weeks, but the confidence interval stays as wide as in week one.

Solution in brief

Count events only in a fixed window of d time units after each unit's own exposure, for example the 2 days after exposure. The per-unit variance then stays constant, so adding data only adds observations. A standard t-test gains power as the sample grows, and standard sample-size formulas hold again.

Questions this case answers
  • How to define a per-unit cumulative metric so that its variance stays fixed and a standard hypothesis test gains power as the sample grows
  • How to define a count or sum metric in an A/B test so that the test can reach significance if the effect is real?
  • How to know why the confidence interval of a cumulative metric does not shrink however long the experiment runs?
  • How to size an experiment on a cumulative count metric when standard sample-size formulas do not apply?

Tools and methods

  • Time-limited (windowed) metric — sum of events in a fixed number of days after each unit's exposure
  • t-test on the metric mean — significance test on the mean of the windowed metric
  • Power analysis — sample size and run time, valid only for windowed metrics
  • Power simulation — checks the unlimited and windowed metric on simulated data
Continue reading — it's free

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