🤖 AI Summary
This paper addresses the nonparametric sequential two-sample testing problem by proposing a novel, consistent testing framework grounded in the “testing-by-betting” paradigm. The method models statistical testing as a gambler’s wealth-maximization process over sequential observations, with cumulative wealth serving as the evidence against the null hypothesis. Crucially, it establishes the first deep integration of test martingales with regret analysis of online prediction strategies—enabling validity under nonexchangeable sequences, general invariances (e.g., symmetry, independence), and adaptive difficulty settings. Theoretically, the test is proven to be consistent, achieves the optimal exponential convergence rate for Type-II error, and admits a finite upper bound on expected sample size. Empirical evaluations demonstrate strong adaptivity to the unknown complexity of alternative distributions, substantially outperforming existing sequential two-sample tests.
📝 Abstract
We study the problem of designing consistent sequential two-sample tests in a nonparametric setting. Guided by the principle of testing by betting, we reframe this task into that of selecting a sequence of payoff functions that maximize the wealth of a fictitious bettor, betting against the null in a repeated game. In this setting, the relative increase in the bettor’s wealth has a precise interpretation as the measure of evidence against the null, and thus our sequential test rejects the null when the wealth crosses an appropriate threshold. We develop a general framework for setting up the betting game for two-sample testing, in which the payoffs are selected by a prediction strategy as data-driven predictable estimates of the witness function associated with the variational representation of some statistical distance measures, such as integral probability metrics (IPMs). We then formally relate the statistical properties of the test (such as consistency, type-II error exponent and expected sample size) to the regret of the corresponding prediction strategy. We construct a practical sequential two-sample test by instantiating our general strategy with the kernel-MMD metric, and demonstrate its ability to adapt to the difficulty of the unknown alternative through theoretical and empirical results. Our framework is versatile, and easily extends to other problems; we illustrate this by applying our approach to construct consistent tests for the following problems: (i) time-varying two-sample testing with non-exchangeable observations, and (ii) an abstract class of “invariant” testing problems, including symmetry and independence testing.