Tutorials › Multivariate Statistics (Graduate) › Restricted Permutations for Paired and Clustered Designs

Resampling and Numerical Methods · Tutorial 958 of 975

Restricted Permutations for Paired and Clustered Designs

Construct admissible sign flips and restricted permutations, and distinguish design-based exactness from validity under distributional exchangeability.

Advanced 12 min read

What You'll Learn

  • Express paired changes as vectors and identify when coordinated sign flips are admissible
  • Define permutation sets from treatment assignment restrictions and exchangeability
  • Keep clustered observations intact when the cluster is the randomization or exchangeability unit
  • Prove validity of an orbit-based randomization test under finite-group invariance
  • Distinguish a conditional permutation reference distribution from the marginal null distribution
  • Diagnose why unrestricted row permutations or a zero-mean assumption alone may fail

Why the Permutation Set Must Reflect the Design

A permutation test is only as defensible as the transformations it allows. In paired data, the two measurements on a subject are linked; in clustered data, observations from the same cluster may be linked; and in a restricted experiment, treatment labels may have been assigned subject to fixed counts or other constraints. Permuting individual rows without regard to these features can create arrangements that the design could never produce.

The central task is to specify a set of admissible transformations and explain why the null hypothesis makes those transformations valid. There are two common justifications. In a randomized experiment, the set comes from the assignment mechanism, and a sharp null fixes the outcomes that would be observed under every assignment. In an exchangeability argument, the null distribution of the data must be invariant under the transformations. These justifications are related, but they are not interchangeable.

Definition: A restricted permutation scheme is a specified collection of transformations of labels, signs, or data units that preserves the design constraints and is justified under the null hypothesis. The permitted collection is often a finite group \(G\), such as all independent sign changes of paired differences or all label permutations within prespecified strata. A transformation is not valid merely because it is computationally convenient.

Paired Differences and Sign Flips

For pair \(i\), let \(X_i\in\mathbb{R}^q\) be the first measurement vector and \(Y_i\in\mathbb{R}^q\) the second. Define the paired difference \(D_i=Y_i-X_i\). Pairing is retained by analyzing the difference vector, rather than treating the \(X_i\)'s and \(Y_i\)'s as two unrelated samples. A sign flip of pair \(i\) replaces \(D_i\) by \(-D_i\), which corresponds to swapping the two measurements in that pair.

For \(m\) pairs, write \(D=(D_1,\ldots,D_m)\). A sign vector \(s=(s_1,\ldots,s_m)\in\{-1,1\}^m\) acts by \(sD=(s_1D_1,\ldots,s_mD_m)\). Independent sign flips are justified by the distributional condition that \(D\) and \(sD\) have the same distribution for every \(s\). Mutual independence of the \(D_i\)'s and central symmetry of each \(D_i\) are sufficient for this condition, but joint sign invariance can hold without independence.

A zero mean alone is not enough. For example, let a scalar difference \(D_i\) equal \(-1\) with probability \(0.9\) and \(9\) with probability \(0.1\). Then \(E[D_i]=-0.9+0.9=0\), but the distribution is not invariant under sign reversal: it assigns positive probability to \(-1\) and \(9\), not to their sign-reversed counterparts with matching probabilities. A sign-flip reference distribution is not justified by the mean-zero condition in this example.

Worked Example: A One-Sided Sign-Flip Test for Paired Changes

Suppose three independent paired changes, measured in the same units, are \(D_1=2\), \(D_2=1\), and \(D_3=3\). Test for an increase using the statistic \(T(D)=D_1+D_2+D_3\). Under a null model in which the joint distribution is invariant to all pairwise sign flips, there are \(2^3=8\) equally weighted sign transformations.

The observed statistic is \(T(D)=2+1+3=6\). The eight transformed sums are \(6, 4, 2, 0, 0, -2, -4,\) and \(-6\). Exactly one is at least as large as the observed value, so the inclusive upper-tail orbit proportion is \(1/8\).

This calculation describes the reference distribution for the observed data. Under the stated invariance condition, the resulting orbit-based test is valid; it does not assert that the conditional reference distribution given these three observed differences is the same distribution as the unconditional null distribution of the statistic.

Restricted Labels Within Strata

Suppose units are divided into prespecified strata and treatment assignment is restricted within each stratum. For example, an experiment may assign exactly one of two units in every stratum to treatment. Under a sharp null hypothesis—each unit's outcome is unchanged by treatment—the observed outcomes can be held fixed while treatment labels are reassigned only in ways allowed by the design. Permuting labels across strata would generally violate the assignment mechanism.

The same principle applies when a distributional exchangeability argument is used rather than a randomized assignment. Units may be permuted within a stratum only when the null makes their labels or observations exchangeable there. The strata must be defined independently of the outcomes being tested, and the permitted rearrangements must preserve any fixed counts or other design restrictions.

Worked Example: Treatment Labels Restricted Within Two Strata

There are two strata, each containing two units. Under the sharp null, their fixed outcomes are \(1,4\) in stratum A and \(2,8\) in stratum B. The design assigns exactly one treated unit in each stratum. Suppose the observed treated units have outcomes \(4\) and \(8\). Use the treated-minus-control difference in means as the statistic.

The observed treated mean is \((4+8)/2=6\), and the observed control mean is \((1+2)/2=1.5\), giving \(T=4.5\). There are \(2\times2=4\) allowed assignments, since one of two units is selected for treatment in each stratum. Their treated-minus-control statistics are:

  • Treat \(1,2\): \(1.5-6=-4.5\).
  • Treat \(1,8\): \(4.5-3=1.5\).
  • Treat \(4,2\): \(3-4.5=-1.5\).
  • Treat \(4,8\): \(6-1.5=4.5\).

For a two-sided statistic \(|T|\), two of the four assignments have \(|T|\geq4.5\), so the exact inclusive tail proportion is \(2/4=1/2\). Allowing labels to move across strata would use assignments that this design did not permit.

Clusters: Move the Randomization Unit as a Whole

When treatment is assigned to clusters, the cluster—not each person or measurement within it—is the assignment unit. Under a sharp null, one may reassign treatment labels among clusters according to the actual cluster-level assignment scheme, while keeping each cluster's full outcome vector together. If treatment is instead randomized among individuals separately within each cluster, labels may be reassigned within each cluster subject to its own assignment restrictions. Which scheme is appropriate depends on how treatment was assigned.

For a distributional permutation argument, the corresponding requirement is exchangeability at the unit being permuted. If whole cluster vectors are exchangeable under the null, permute whole vectors. Shuffling individual observations across clusters would additionally assume that those observations can be exchanged across cluster membership, which need not be true. In particular, a cluster-level treatment assignment does not justify row-level permutations simply because the data table has one row per individual.

Worked Example: Reassigning Treatment to Whole Clusters

Four clusters have fixed outcome totals \(1,2,5,8\). A randomized design assigns exactly two clusters to treatment. Under the sharp null, use the difference between the mean treated and mean control cluster totals. Suppose the clusters with totals \(5\) and \(8\) were treated.

The observed statistic is \((5+8)/2-(1+2)/2=6.5-1.5=5\). There are \(\binom{4}{2}=6\) allowed assignments. The treated-set statistics, for treated totals \(\{1,2\},\{1,5\},\{1,8\},\{2,5\},\{2,8\},\{5,8\}\), are respectively \(-5,-2,1,-1,2,5\). Thus the one-sided inclusive tail proportion for \(T\geq5\) is \(1/6\); for \(|T|\geq5\), it is \(2/6\).

If a cluster contains several outcomes or measurements, its vector stays intact when the cluster's treatment label is reassigned. The six assignments above move labels between clusters; they do not break clusters into individual records.

When an Orbit-Based Test Is Valid

The finite-group result below formalizes the distributional justification for restricted transformations. It also clarifies what the conditional permutation calculation means. Let \(G\) be a finite group acting measurably on a data object \(D\), and suppose the null distribution is invariant: \(gD\) has the same distribution as \(D\) for every \(g\in G\). Let \(T\) be a real-valued statistic. Define the inclusive upper-tail orbit proportion \(p(D)=|G|^{-1}\sum_{g\in G} I\{T(gD)\geq T(D)\}\).

Theorem: Under the finite-group invariance condition, \(P\{p(D)\leq\alpha\}\leq\alpha\) for every \(0\leq\alpha\leq1\). Thus the inclusive orbit test is valid, with conservatism possible because of ties or a discrete orbit. This is a marginal validity statement over repeated data sets under the null; it does not say that the conditional orbit distribution given the observed data equals the unconditional null distribution of \(T(D)\).

Proof. Let \(U\) be independent and uniform on \(G\). By invariance, \(UD\) has the same distribution as \(D\). For every fixed \(d\), \(Ud\) is uniform over the distinct points of its finite orbit, since each point has the same number of preimages in \(G\); also, \(p(x)\) is constant across that orbit.

For fixed \(d\), list the \(N\) distinct orbit points in decreasing order of their statistic, grouping ties together. Each point in a tied block has \(p\)-value equal to the cumulative size of that block and all preceding blocks, divided by \(N\); thus the points with \(p\)-values at most \(\alpha\) comprise complete initial blocks, of total size \(k\) with \(k/N\leq\alpha\). Therefore \(P\{p(UD)\leq\alpha\mid D=d\}\leq\alpha\). Since \(UD\) and \(D\) have the same distribution, \(P\{p(D)\leq\alpha\}\leq\alpha\). \(\square\)

For a uniformly randomized finite assignment set under a sharp null, the same counting argument gives the randomization reference distribution conditional on the fixed potential outcomes. For a distributional invariance argument, the unconditional distribution of \(T(UD)\) equals that of \(T(D)\), where \(U\) is independently and uniformly selected from \(G\). Conditional on the observed \(D\), however, the sign-flip or permutation distribution is an orbit-based reference distribution; it can justify a valid randomization test under the stated invariance, but it need not equal the unconditional null distribution.

Choosing and Reporting the Transformations

A useful way to construct a scheme is to name the unit that may move, the restrictions it must obey, and the null argument that makes the movement valid. The transformation set should be fixed before inspecting which arrangement gives the most favorable result. For Monte Carlo approximations to a large set, the sampled transformations must still come from the correct restricted set; computational sampling cannot repair a wrongly specified set.

1
Identify the unit.
For paired observations, form one difference per pair. For cluster assignment, retain each cluster as a unit. For within-cluster assignment, retain the cluster boundaries.
2
Write the restrictions.
Specify which signs may change, which labels may move, and which counts or strata must stay fixed. The resulting set is the reference set for the test.
3
State the justification.
For a randomized design, identify the assignment mechanism and sharp null. For an invariance argument, state the distributional invariance being assumed.
4
Compute and interpret the tail proportion.
Use the same statistic and a declared one- or two-sided ordering for every allowed transformation. Interpret the result as an orbit-based or design-based reference calculation, not automatically as a conditional draw from the marginal null distribution.

Common Pitfalls and Why the Distinction Matters

The most common error is to treat any rearrangement as harmless under a vague null such as “no effect.” A zero average paired difference does not imply sign symmetry. Equal marginal distributions do not, by themselves, justify arbitrary permutations of dependent observations. And a cluster-randomized design does not permit individual-level treatment-label shuffling. Each of these mistakes changes the reference set and therefore changes the test.

A second error is to say that the conditional permutation distribution “is the null distribution.” Under a valid invariance condition, the orbit-based test can control rejection probability, as the theorem shows. But for a particular observed data set, its orbit may contain fewer values or a different range than the marginal null distribution. Validity of the test does not require those two distributions to be identical.

Key takeaway: Restricted permutations are valid only when the allowed transformations preserve the assignment design or a stated null invariance. Preserve pairs, clusters, strata, and fixed assignment counts; do not infer permutation validity from a zero mean or from the mere existence of repeated measurements.

Check Your Understanding

For each question, identify both the admissible transformations and the condition that would justify them.

  1. Why does a mean-zero distribution of paired differences not, by itself, justify independent sign flips?
  2. A trial randomizes treatment to clinics, with all patients in a clinic receiving the same treatment. What is the unit to which treatment labels may be reassigned under a sharp null?
  3. In a two-stratum experiment, exactly one unit per stratum is treated. Why must the permutation set retain this restriction?
  4. State the finite-group invariance condition used to justify an orbit-based permutation test.
  5. What is the difference between the conditional orbit reference distribution and the unconditional null distribution of a statistic?
Clinical Biostats