Anytime-Valid Linear Models and Regression Adjusted Causal Inference in Randomized Experiments

Michael Lindon, Dae-Woong Ham, Martin P. Tingley, Iavor BojinovarXiv 2022 · DOI

Introduction

Linear models are the workhorses of modern statistics, yet their standard application—relying on fixed-sample $t$-tests and $F$-tests—is fundamentally incompatible with the iterative nature of modern data science. In environments like online A/B testing, practitioners frequently "peek" at results to make real-time decisions. This practice, known as optional stopping, violates the assumptions of classical frequentist inference, leading to inflated Type-I error rates and contributing to the broader replication crisis.

This paper introduces a rigorous framework for anytime-valid inference in linear models. By developing sequential analogues of classical tests, the authors provide statistical guarantees that hold uniformly over all sample sizes, allowing for continuous monitoring and early stopping without compromising the integrity of the results.

The Challenge of Optional Stopping

Traditional statistical tests assume that the sample size $n$ is fixed before data collection begins. If a researcher stops an experiment early because a p-value has crossed a significance threshold, or extends an experiment until it does, the resulting p-value is no longer valid. In the context of A/B testing, where businesses aim to minimize the time spent on "losing" treatments or ship "winning" features faster, this creates a tension between statistical rigor and operational efficiency. The anytime-valid approach resolves this by providing Type-I error control and coverage guarantees regardless of when or why the data is analyzed.

Methodology: From P-values to E-variables

The core of the proposed framework is the transition from p-values to e-variables. An e-variable is a random variable whose expectation is at most 1 under the null hypothesis. A sequence of these variables forms a test martingale, which allows for valid inference under optional stopping via Ville’s Inequality. Unlike p-values, martingales have a "memory" that preserves the validity of the test across multiple looks.

The authors bridge the gap between classical Ordinary Least Squares (OLS) and sequential analysis through several key innovations:

  1. Group Invariance: By utilizing group-invariance principles, the authors handle "nuisance parameters" such as unknown variance. They focus on "maximal invariant statistics" to reduce complex hypotheses into simpler, testable forms.
  2. Invariantly Sufficient Statistics: The paper demonstrates that the standardized OLS estimator ($\hat{\delta}_n / \text{SE}$) is an "invariantly sufficient statistic." This allows the construction of anytime-valid tests that utilize the same point estimates and standard errors familiar to practitioners.
  3. Asymptotic Robustness: Recognizing that real-world data often violates Gaussian and homoskedastic assumptions, the authors introduce "asymptotic t" confidence sequences. These sequences are robust to heteroskedasticity, making them suitable for the "messy," heavy-tailed data typical of industrial A/B tests.

Regression-Adjusted Causal Inference

A significant contribution of this work is the integration of sequential testing with regression-adjusted causal inference. In randomized controlled experiments, regression adjustment is often used to increase the precision of treatment effect estimates by accounting for baseline covariates. The authors show that their anytime-valid framework can be applied to these adjusted estimates, providing a powerful tool for experimentalists who require both high precision and the flexibility of sequential monitoring. This formally allows experiments to be continuously monitored for significance while safeguarding against statistical malpractices.

Empirical Performance and Real-World Application

The framework was evaluated using both simulations and real-world data from Netflix.

Simulation Results

In scenarios where fixed-sample tests failed—rejecting the null up to 25% of the time due to peeking—the anytime-valid e-processes maintained strict Type-I error control below the 5% threshold. Furthermore, the tests demonstrated GROW (Growth Rate Optimal in the Worst case) properties, ensuring they detect true effects as quickly as possible, leading to the shortest possible stopping times.

Netflix PlayDelay Data

The authors applied their method to Netflix's "PlayDelay" dataset, which measures the latency between a user's click and the start of a video. This data is notoriously difficult because it is highly right-skewed and contains extreme outliers. While purely non-parametric methods (like Empirical Bernstein bounds) were too conservative to be practical, the authors' "asymptotic t" method detected effects significantly faster while remaining robust to the non-Gaussian nature of the data.

Conclusion

This research provides a bridge between the theoretical requirements of sequential analysis and the practical needs of applied data science. By enabling anytime-valid inference within the familiar OLS framework, the authors offer a solution that protects against the pitfalls of optional stopping while maintaining the efficiency required for modern experimentation. While the current theory relies on independence assumptions, future work aims to extend these heteroskedasticity-robust processes to handle serial correlation and complex longitudinal designs.

Summary updated

BibTeX
@misc{lindon2022anytime,
  author = {Michael Lindon and Dae-Woong Ham and Martin P. Tingley and Iavor Bojinov},
  title = {{Anytime-Valid Linear Models and Regression Adjusted Causal Inference in Randomized Experiments}},
  year = {2022},
  eprint = {2210.08589},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.08589},
}
Figure