Why Permutation Calibration Needs an Invariance Assumption
A high-dimensional mean statistic may be easy to calculate but difficult to calibrate: its null distribution can depend on dimension, covariance structure, or dependence across coordinates. Permutation methods offer a way to generate a reference distribution by rearranging the observed data. The crucial question is not simply whether the mean is zero or whether two means are equal. It is whether the null model makes the data invariant under the rearrangements being used.
For a one-sample test, a common rearrangement changes the sign of each observation vector. For a two-sample test, it reallocates pooled observation vectors to the two groups while preserving group sizes. These operations have different assumptions. Under the appropriate invariance null, their calibration is valid in finite samples, regardless of the dimension or the choice of statistic. Under weaker null hypotheses, calibration generally needs a separate asymptotic justification.
One-Sample Sign-Flip Calibration
Let \(T(X_1,\ldots,X_n)\) be a real-valued statistic, with larger values taken as stronger evidence against the null. For a sign vector \(s=(s_1,\ldots,s_n)\in\{-1,1\}^n\), write \(sX=(s_1X_1,\ldots,s_nX_n)\). The sign-flip reference distribution consists of the \(2^n\) values \(T(sX)\). The upper-tail permutation p-value is
The statistic can target a dense or sparse departure. Examples include \(n\|\bar X\|^2\), where \(\bar X=n^{-1}\sum_i X_i\), and \(\sqrt{n}\max_{1\leq j\leq p}|\bar X_j|\). The validity argument does not require choosing one of these particular forms. It does require calculating the statistic in the same way for the observed data and every sign-flipped data set.
To prove the result, collect the observations into \(X=(X_1,\ldots,X_n)\), and let \(G=\{-1,1\}^n\) act on \(X\) by coordinatewise sign changes. Independence and central symmetry imply that \(gX\) has the same distribution as \(X\) for every \(g\in G\). For a fixed observed orbit \(\{gX:g\in G\}\), form the \(M=2^n\) statistic values \(a_g=T(gX)\), retaining repetitions. If an element \(h\) is selected uniformly from \(G\), its value \(a_h\) is one of these \(M\) values, and its upper-tail rank is
For any fixed list of \(M\) real numbers, at most \(\lfloor \alpha M\rfloor\) list positions can have upper-tail rank at most \(\alpha\): if the values are ordered from largest to smallest, positions tied at a value share a rank no smaller than the last position in that tie. Consequently, the fraction of \(h\)'s with \(r_h\leq\alpha\) is at most \(\alpha\). Since the distribution of \(X\) is invariant under every \(h\), averaging this orbit argument gives \(P(p_{\mathrm{sign}}\leq\alpha)\leq\alpha\). This proves the claim. \(\square\)
Worked Example: A Two-Coordinate Sign-Flip Test
Take \(n=3\), \(p=2\), and observed vectors \(X_1=(1,0)\), \(X_2=(0,1)\), and \(X_3=(1,1)\). Use \(T=n\|\bar X\|^2=\|X_1+X_2+X_3\|^2\). The observed sum is \((2,2)\), so \(T(X)=2^2+2^2=8\).
For a sign pattern \(s=(s_1,s_2,s_3)\), the flipped sum is \((s_1+s_3,s_2+s_3)\). When \(s_3=1\), the four choices of \((s_1,s_2)\) give squared norms \(0,4,4,8\). When \(s_3=-1\), they give \(0,4,4,8\) again. Thus two of the eight values equal 0, four equal 4, and two equal 8. The upper-tail p-value is \(2/8=0.25\). At level 0.05 this test does not reject.
The calculation uses every sign pattern and retains ties. In an application, central symmetry of the observation vectors—not merely a sample mean near zero—is the assumption supporting this calibration.
Two-Sample Label Permutations
For a statistic \(T\) measuring the difference between group means, pool the \(N\) vectors and calculate \(T\) for each of the \(\binom{N}{n_1}\) allocations to the first group. For a two-sided test, a typical choice is \(T=\|\bar X_1-\bar X_2\|\); for dense alternatives, a quadratic statistic may be used, and for sparse alternatives a maximum-coordinate statistic may be used. The p-value is the fraction of allocations whose statistic is at least as large as the observed one.
For a fixed pooled data set, list the statistic values for all \(M=\binom{N}{n_1}\) allocations, including repeated values. If the observed allocation is uniformly distributed among these allocations under the null, its upper-tail rank is the fraction of list entries at least as large as its value. As in the sign-flip proof, at most an \(\alpha\) fraction of entries can have upper-tail rank at most \(\alpha\). Conditional on the pooled data, the probability of rejection is therefore at most \(\alpha\); averaging over the pooled data gives the unconditional bound. \(\square\)
Worked Example: Permuting Four Scalar Observations
Suppose the pooled observations are \(0,1,3,4\), with two assigned to each group. The observed allocation is \(\{0,1\}\) versus \(\{3,4\}\). Use \(T=|\bar X_1-\bar X_2|\). The group means are \(0.5\) and \(3.5\), so the observed statistic is \(3\).
There are \(\binom{4}{2}=6\) allocations to group 1. The complementary allocation produces the same absolute difference, so the six statistics can be obtained by considering the six possible group-1 subsets:
- \(\{0,1\}\): group means \(0.5\) and \(3.5\), giving \(T=3\).
- \(\{0,3\}\): group means \(1.5\) and \(2.5\), giving \(T=1\).
- \(\{0,4\}\): both means are \(2\), giving \(T=0\).
- \(\{1,3\}\): both means are \(2\), giving \(T=0\).
- \(\{1,4\}\): group means \(2.5\) and \(1.5\), giving \(T=1\).
- \(\{3,4\}\): group means \(3.5\) and \(0.5\), giving \(T=3\).
Two of the six values are at least the observed value, so \(p_{\mathrm{perm}}=2/6=1/3\). The enumeration illustrates the exact calculation under exchangeability; it is not a justification for using the same procedure when the groups have different distributions.
Asymptotic Calibration Beyond Exact Invariance
Sometimes the scientific null is weaker than the permutation invariance null. For example, two populations may have equal means but different covariance matrices. They are then not exchangeable, so ordinary label permutation is not a finite-sample test of equality of means. Studentizing a statistic can sometimes yield asymptotically valid permutation calibration under such a weak null, but studentization does not by itself prove validity.
For the proof, write the p-value as \(P_\pi(T_n^\pi\geq T_n\mid\text{data})\). The tie condition and uniform convergence of the conditional distribution imply that this differs from \(1-H(T_n)\) by a quantity converging to zero in probability. Since \(T_n\) converges in distribution to a variable with continuous cdf \(H\), the probability integral transform gives \(H(T_n)\xrightarrow{d}\text{Uniform}(0,1)\). Hence \(1-H(T_n)\) has the same limiting distribution, and adding a term that vanishes in probability does not change that limit. The permutation p-value is therefore asymptotically uniform. \(\square\)
This criterion states what an asymptotic argument must establish: the observed statistic and the conditional permutation distribution must converge to the same continuous limit. In high dimensions, those claims depend on the statistic and on conditions such as dimension growth, dependence across coordinates, group-size balance, and moment bounds. A result for one statistic or regime does not automatically apply to another. In particular, finite-sample invariance and asymptotic conditional convergence are distinct routes to validity.
Worked Example: Equal Means Do Not Ensure Exchangeability
Let group A take the values \(-1\) and \(1\) with probability \(1/2\) each. Let group B take the values \(-2\) and \(2\) with probability \(1/2\) each. Both population means are zero, but group A has variance \(1\) and group B has variance \(4\).
A pooled label permutation can assign an observed value of magnitude \(1\) to either group and an observed value of magnitude \(2\) to either group. Under the stated model, however, a magnitude-\(1\) observation comes from A with probability one, and a magnitude-\(2\) observation comes from B with probability one. The labels are not exchangeable conditional on the pooled values. Thus equal means do not justify the finite-sample permutation argument. A studentized procedure would need a separate proof of the conditional convergence required for asymptotic validity.
Implementation and Common Pitfalls
When a statistic includes estimated scales, regularization parameters, or a data-driven choice among coordinates, the entire prescribed calculation must be repeated under each permutation if that choice is part of the test statistic. Holding a data-dependent choice fixed can produce a reference distribution for a different procedure than the one actually applied. Likewise, if exhaustive enumeration is impractical and permutations are sampled at random, the Monte Carlo p-value should account for the observed arrangement; a common conservative form is \((1+\#\{\text{sampled statistics at least as large as observed}\})/(B+1)\) for \(B\) sampled permutations.
Common mistake: “The two groups have equal means under the null, so their labels can be permuted freely.” This confuses a parameter restriction with distributional invariance. If their covariance structures or other distributional features differ, the labels need not be exchangeable. The correction is to use label permutations as an exact test only under exchangeability, or to establish a statistic-specific asymptotic conditional-limit result under the weaker null. For one-sample sign flips, the parallel error is to infer central symmetry from a zero mean.
Check Your Understanding
For each question, identify the relevant invariance assumption or explain what additional justification is needed.
- What property of the one-sample distribution makes sign-flip calibration finite-sample valid?
- Why does a zero population mean not, by itself, justify a sign-flip test?
- In a two-sample test, what does exchangeability imply about the conditional distribution of group labels given the pooled observations?
- What conditional convergence conditions give asymptotic validity when exact exchangeability does not hold?
- Why can equal population means coexist with invalid finite-sample label permutation calibration?