Tutorials › Multivariate Statistics (Graduate) › Permutation Calibration for High-Dimensional Mean Tests

High-Dimensional Mean Testing · Tutorial 822 of 975

Permutation Calibration for High-Dimensional Mean Tests

Distinguish exact permutation validity from asymptotic validity, and apply sign flips or label permutations without mistaking a mean null for an invariance assumption.

Advanced 10 min read

What You'll Learn

  • State the invariance assumptions behind one-sample sign-flip and two-sample label-permutation tests.
  • Construct permutation reference distributions for quadratic, maximum-coordinate, and other statistics.
  • Prove finite-sample validity of randomization p-values under the relevant invariance null.
  • Identify the conditional convergence conditions that justify asymptotic permutation calibration.
  • Recognize why equal means alone do not make two samples exchangeable.
  • Recompute data-dependent parts of a statistic within each permutation.

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

Definition: A random vector \(X\in\mathbb{R}^p\) is centrally symmetric about zero if \(X\) and \(-X\) have the same distribution. For independent observations \(X_1,\ldots,X_n\), sign symmetry means each \(X_i\) is centrally symmetric about zero. This implies \(E[X_i]=0\) when the expectation exists, but a zero mean does not imply sign symmetry.

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

$$ p_{\mathrm{sign}} = 2^{-n}\sum_{s\in\{-1,1\}^n} \mathbf{1}\{T(sX)\geq T(X)\}. $$

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.

Theorem (finite-sample sign-flip validity): Suppose \(X_1,\ldots,X_n\) are independent and each is centrally symmetric about zero. For any measurable real-valued statistic \(T\), the nonrandomized p-value \(p_{\mathrm{sign}}\) is super-uniform: for every \(0\leq\alpha\leq1\), \(P(p_{\mathrm{sign}}\leq\alpha)\leq\alpha\). Thus, rejecting when \(p_{\mathrm{sign}}\leq\alpha\) has size at most \(\alpha\). Ties can make the test conservative.

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

$$ r_h=\frac{\#\{g\in G:a_g\geq a_h\}}{M}. $$

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

Definition: Two groups are exchangeable under the null for label permutation when, conditional on the pooled observations, every allocation of \(n_1\) of the \(N=n_1+n_2\) observation vectors to group 1 is equally likely under the null. Independent, identically distributed observations in both groups satisfy this condition. Equality of the two population means alone does not.

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.

Theorem (finite-sample label-permutation validity): Under the exchangeability condition above, the upper-tail label-permutation p-value is super-uniform for any measurable statistic computed by the same rule on each allocation. Therefore its rejection probability at level \(\alpha\) is at most \(\alpha\), with possible conservatism from ties.

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.

Theorem (conditional-limit criterion for asymptotic permutation validity): Let \(T_n\) be the observed statistic and let \(\widehat F_n(t)=P_\pi(T_n^\pi\leq t\mid\text{data})\) be its conditional permutation distribution function. Suppose (i) \(T_n\) converges in distribution to a random variable with continuous distribution function \(H\), (ii) \(\sup_t|\widehat F_n(t)-H(t)|\xrightarrow{p}0\), and (iii) the conditional probability of a permutation tie at the observed value, \(P_\pi(T_n^\pi=T_n\mid\text{data})\), converges to zero in probability. Then the upper-tail permutation p-value converges in distribution to Uniform\((0,1)\).

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.

Key takeaway: Permutation calibration is justified by an invariance or a demonstrated conditional limit—not by the word “permutation” itself. State the null assumption, preserve the design in the rearrangements, and recompute the statistic consistently.

Check Your Understanding

For each question, identify the relevant invariance assumption or explain what additional justification is needed.

  1. What property of the one-sample distribution makes sign-flip calibration finite-sample valid?
  2. Why does a zero population mean not, by itself, justify a sign-flip test?
  3. In a two-sample test, what does exchangeability imply about the conditional distribution of group labels given the pooled observations?
  4. What conditional convergence conditions give asymptotic validity when exact exchangeability does not hold?
  5. Why can equal population means coexist with invalid finite-sample label permutation calibration?
Clinical Biostats