We develop a flexible online version of the permutation test. This allows us to test exchangeability as the data is arriving, where we can choose to stop or continue without invalidating the size of the test. Our methods generalize beyond exchangeability to other forms of invariance under a compact group. Our approach relies on constructing an $e$-process that is the running product of multiple conditional $e$-values. To construct $e$-values, we first develop an essentially complete class of admissible $e$-values in which one can flexibly `plug in' almost any desired test statistic. To make the $e$-values conditional, we explore the intersection between the concepts of conditional invariance and sequential invariance, and find that the appropriate conditional distribution can be captured by a compact subgroup. To find powerful $e$-values for given alternatives, we develop the theory of likelihood ratios for testing group invariance yielding new optimality results for group invariance tests. These statistics turn out to exist in three different flavors, depending on the space on which we specify our alternative. We apply these statistics to test against a Gaussian location shift, which yields connections to the $t$-test when testing sphericity, connections to the softmax function and its temperature when testing exchangeability, and yields an improved version of a known $e$-value for testing sign-symmetry. Moreover, we introduce an impatience parameter that allows users to obtain more power now in exchange for less power in the long run.
翻译:暂无翻译