Abstract
In modern e-commerce experimentation, practitioners frequently encounter two significant challenges: the prevalence of non-normal, heavy-tailed metrics (such as revenue per user) and the practical necessity of continuous monitoring. Traditional fixed-horizon parametric tests, like the z-test, are ill-suited for these conditions, often resulting in inflated Type 1 error rates when results are "peeked" at before the pre-determined sample size is reached. This paper introduces the Bootstrap Mixture Sequential Probability Ratio Test (mSPRT), a nonparametric framework that provides always-valid p-values. By leveraging studentized statistics and bootstrap-based likelihood estimation, the proposed method maintains statistical rigor under sequential observation while remaining robust to complex data distributions.
1. Introduction
Online randomized experiments, or A/B tests, are the gold standard for data-driven decision-making in industry. However, the standard statistical toolkit often relies on assumptions that do not hold in practice. Specifically, metrics like revenue per user session typically exhibit a large mass at zero and a heavy right tail, violating the normality assumptions of the t-test. Furthermore, the "peeking problem"—the practice of monitoring results as they arrive and stopping early if a result appears significant—drastically increases the probability of false positives. To address these issues, we propose a sequential testing framework that is both nonparametric and robust to continuous monitoring.
2. Methodology
The core of our approach is the Bootstrap Mixture SPRT. The method operates through several key stages:
- Data Blocking and Studentization: Data is processed in blocks (e.g., 5,000 sessions). For each block, we calculate a studentized statistic—the difference between the estimate and the null hypothesis, normalized by its standard deviation. This transformation is critical as it accelerates the rate of convergence to the true distribution, making the subsequent bootstrap approximation more accurate.
- Likelihood Estimation via Bootstrap: Rather than assuming a parametric form for the data (e.g., Poisson or Normal), we use the bootstrap method to estimate the likelihood function. By resampling the observed data with replacement and applying a Gaussian kernel density estimate, the model "learns" the underlying distribution dynamically.
- Mixture SPRT and Martingales: These estimated likelihoods are integrated into a Mixture Sequential Probability Ratio Test. This construction creates a mathematical martingale, ensuring that the probability of the test statistic ever crossing the significance threshold under the null hypothesis is strictly controlled, regardless of how many times the data is monitored.
3. Experimental Results
We evaluated the Bootstrap Mixture SPRT using real-world search performance data from Walmart Labs, comprising approximately 1.8 million user sessions. The evaluation focused on two primary metrics: query success rate (a ratio of sums) and revenue per user (a heavy-tailed metric).
3.1 Type 1 Error Control
A critical finding of our study is the failure of standard tests under sequential observation. As shown in Figure 1(a), the standard z-test exhibits significant p-value inflation when monitored continuously, with false positive rates climbing as high as 30% for a nominal 5% alpha level. In contrast, our proposed Bootstrap Mixture SPRT (Figure 1(b)) produces p-values that are well-calibrated or conservative, effectively maintaining the Type 1 error rate at or below the target threshold.
3.2 Statistical Power and Efficiency
On synthetic Bernoulli data, our nonparametric approach achieved power levels nearly identical to the MaxSPRT, which requires prior knowledge of the data distribution. On real-world revenue data, the Bootstrap Mixture SPRT actually outperformed the z-test in terms of power, as it more effectively handled the extreme outliers and heavy tails characteristic of e-commerce revenue metrics.
4. Discussion and Conclusion
The Bootstrap Mixture SPRT offers a robust solution for modern experimentation, allowing engineers to stop tests early when a significant effect is detected without compromising statistical integrity. While the method introduces some computational overhead due to the bootstrap resampling process, this is manageable within modern distributed computing frameworks. Future work will focus on optimizing block size selection and refining the choice of prior distributions for expected effect sizes to further enhance the speed of inference.
Summary updated