Permutation Tests Using Arbitrary Permutation Distributions

Aaditya Ramdas, Rina Foygel Barber, Emmanuel J. Candès, Ryan J. Tibshirani

Abstract

Permutation tests date back nearly a century to Fisher’s randomized experiments and remain an immensely popular statistical tool for testing hypotheses of independence and other common inferential questions. Much of the existing literature has emphasized that, for the permutation p-value to be valid, one must first pick a subgroup $G$ of permutations and then recalculate the test statistic on permuted data using either an exhaustive enumeration of $G$ or a sample from $G$ drawn uniformly at random. In this work, we demonstrate that the focus on subgroups and uniform sampling are both unnecessary for validity—in fact, a simple random modification of the permutation p-value remains valid even when using an arbitrary distribution (not necessarily uniform) over any subset of permutations (not necessarily a subgroup). We provide a unified theoretical treatment of such generalized permutation tests, recovering all known results from the literature as special cases. Thus, this work expands the flexibility of the permutation test toolkit available to the practitioner.

Introduction

Permutation tests are a cornerstone of non-parametric statistics, used to determine if two variables are independent or if samples originate from the same distribution. The traditional "gold standard" involves comparing an observed test statistic against all $n!$ possible permutations of the data. However, as $n!$ grows exponentially, researchers typically rely on subsets of permutations.

Historically, statistical theory has mandated that these subsets must form an algebraic subgroup and that sampling must be uniform to guarantee a valid p-value. Deviating from these constraints—such as using "balanced" permutations or non-uniform sampling—can result in "anti-conservative" tests that report significant results far more frequently than they should under the null hypothesis. This paper introduces a method to ensure validity for any choice of permutations.

The Generalized Permutation Test

The authors introduce a Generalized Permutation Test that breaks the traditional reliance on subgroups. The core innovation is the introduction of a random "anchor" permutation, $\sigma_0$, drawn from a chosen distribution $q$.

  1. The Anchor: Instead of directly comparing the original data $X$ to its permutations, a random permutation $\sigma_0$ is drawn from the distribution $q$.
  2. The Comparison: The test statistic of the observed data, $T(X)$, is compared against a set of statistics calculated on "re-permuted" data: $T(X_{\sigma \circ \sigma_0^{-1}})$.
  3. Validity: By utilizing this $\sigma \circ \sigma_0^{-1}$ construction, the authors prove that the resulting p-value is valid for any distribution $q$ over the symmetric group $S_n$.

This framework is established through two primary results: Theorem 2.1, which covers the use of a full (potentially non-uniform) distribution $q$, and Theorem 2.2, which applies to $M$ random samples drawn i.i.d. from an arbitrary distribution.

Theoretical Insights

The reason standard subset-based tests fail without subgroup structures is that the observed data can be "uniquely identified" from its orbit, breaking the exchangeability required for a valid p-value. The $\sigma_0$ term acts as a "mask" that restores this necessary symmetry.

This framework serves as a "grand unified theory" for permutation tests, as it recovers classical tests (uniform over $S_n$), subgroup tests, and even exchangeable MCMC tests as special cases. Furthermore, to address the potential noise introduced by the random $\sigma_0$, the authors demonstrate that one can average over multiple $\sigma_0$ draws. While this "averaged p-value" is not strictly a p-value, it remains valid up to a factor of 2.

Validation

As a theoretical work, the paper utilizes synthetic toy examples (e.g., $n=4$ with data from a standard normal distribution) to demonstrate the method's efficacy. In these tests, "naive" p-values on non-subgroups often resulted in a 50% error rate at a 33% significance threshold. Applying the $\sigma_0$ correction immediately restored the error rate to a valid level, confirming the theoretical proofs.

Conclusion and Future Work

This research provides the mathematical foundation for researchers to experiment with more flexible and computationally efficient permutation schemes. While the paper focuses on validity (preventing false positives), it leaves the question of statistical power (the ability to find true positives) for future study. Using highly biased distributions may yield valid p-values but could result in "weak" tests. Nonetheless, the generalized permutation test offers a powerful new tool for the modern statistical toolkit.

Summary updated

BibTeX
@inproceedings{ramdas2023permutation,
  author = {Aaditya Ramdas and Rina Foygel Barber and Emmanuel J. Candès and Ryan J. Tibshirani},
  title = {{Permutation Tests Using Arbitrary Permutation Distributions}},
  booktitle = {Sankhya},
  year = {2023},
  doi = {10.1007/s13171-023-00308-8},
}
Figure