Problem
Teams randomize customers but often measure a ratio, such as the average check: the sum of purchases divided by their number. One customer can make several purchases, and the checks of one person are related. A plain t-test over checks assumes independence, understates the standard error and finds effects that are not there. The ratio needs its own correct effect, variance, p-value and confidence interval.
Example from the article: an online store adds a "Pay in installments" button, randomizes customers into test and control, and wants to know whether the average check grew.
Solution in brief
Treat the ratio as a function of two per-customer means and linearize it with the Taylor formula. Delta-linearization turns this into one number per customer whose mean equals the ratio and whose variance equals the delta-method variance. The usual per-user t-test and CUPED then work, and the effect stays in the original units.
Questions this case answers
- How to estimate the effect of a randomized change on a ratio metric whose analysis unit (event) differs from the randomization unit (user), keeping the result in the metric's own units
- How to reduce variance with pre-experiment covariates when the metric is a ratio of two per-user sums
- How to test the effect of a feature on the average check when one customer makes several purchases?
- How to get an effect and a confidence interval in the original units of a ratio metric while keeping a per-user t-test pipeline?
Tools and methods
- Delta-linearization — one metric per customer; mean equals the ratio, variance equals the delta-method variance
- Delta method — Taylor-based variance of a ratio of two means
- Yandex linearization — per-customer proxy metric; gives a valid test, not an effect in original units
- CUPED — variance reduction on the linearized metric
- OLS with clustered errors — check-level regression, an equivalent form (statsmodels)
Google or a one-time email code. No password.
