NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sequential Nonparametric Testing with the Law of the Iterated Logarithm.

Akshay Balsubramani, Aaditya Ramdas

Introduction

In traditional statistical hypothesis testing, researchers typically employ a "batch" approach. This requires pre-determining a sample size $N$ before data collection begins. However, this fixed-sample paradigm presents a significant dilemma: choosing $N$ too small risks missing a real effect (low power), while choosing $N$ too large wastes valuable time and resources.

A common temptation in practice is to "peek" at the data as it arrives and stop the experiment early if the results appear significant. Unfortunately, standard statistical tests are not designed for this behavior. Repeatedly checking for significance—a practice known as continuous monitoring—drastically inflates the Type I error rate (false positives). This paper introduces a new framework for sequential nonparametric hypothesis testing that allows researchers to stop an experiment as soon as a result is statistically significant while maintaining rigorous error control.

Methodology

The authors propose a framework where the test statistic is constructed as a zero-mean martingale under the null hypothesis ($H_0$). The core innovation lies in leveraging a finite-time version of the Law of the Iterated Logarithm (LIL) to establish rejection thresholds.

In essence, the LIL defines a mathematical "envelope" that a random walk (the test statistic) is unlikely to exit if the null hypothesis is true. If the observed data ever strays outside this boundary, the test rejects the null hypothesis. Unlike traditional corrections (like Bonferroni) which can be overly conservative, the LIL-based threshold naturally accounts for the high dependency between sequential tests.

Comparison of the logic between a fixed-sample batch test and the proposed sequential approach.

This approach is designed for modern data streams, offering several key advantages:

  • Computational Efficiency: Updates take $O(d)$ time, where $d$ is the dimensionality.
  • Memory Efficiency: The algorithm requires only constant space, storing summary statistics rather than the full dataset.
  • Non-asymptotic Guarantees: The statistical guarantees hold for finite samples, providing reliability even in early stages of data collection.

Empirical Results

The framework was validated using synthetic simulations, including multivariate Gaussian mean testing in 10 dimensions to simulate nonparametric-style problems. The results highlight two primary strengths of the LIL-based test: error control and adaptive power.

Type I Error and Power

Simulations confirmed that the test successfully keeps false positives below the target significance level $\alpha$, even with continuous monitoring. Furthermore, the sequential test achieves "power parity" with batch tests. It effectively matches the performance of a batch test that was perfectly tuned to the optimal sample size in advance, without needing that information beforehand.

Power curves for the sequential test across various effect sizes (delta), demonstrating how the test adapts to the difficulty of the problem.

Adaptive Stopping

The test acts as an "oracle," adapting its stopping time $\tau$ to the effect size $\delta$. When the difference between groups is large, the test terminates rapidly. When the difference is subtle, it continues until sufficient evidence is gathered. The expected stopping time was found to scale as $1/\delta^4$ for two-sample mean testing, matching theoretical lower bounds for this class of problems.

Conclusion

By applying the Law of the Iterated Logarithm to sequential testing, this paper provides a robust solution to the "peeking" problem in A/B testing and other streaming data applications. The resulting framework is nonparametric, computationally light, and statistically efficient. While current constants in the threshold can be conservative, the underlying method offers a mathematically sound path toward more flexible and responsive experimental designs.

Summary updated

BibTeX
@inproceedings{balsubramani2016sequential,
  author = {Akshay Balsubramani and Aaditya Ramdas},
  title = {{Sequential Nonparametric Testing with the Law of the Iterated Logarithm.}},
  booktitle = {UAI},
  year = {2016},
  url = {https://openreview.net/forum?id=PkcF0uQ923C},
}
Figure