Learning objectives
- Enumerate a small permutation null distribution and its tail count.
- Explain why a permutation scheme must match the assignment process.
Prerequisites: Calculate group means and count combinations.
Mechanism and interpretation
A permutation test asks how unusual a chosen statistic would be under a specified reassignment of labels. For two equally sized groups, a simple exact test pools the observations and considers every assignment of the required number to group A. The remaining observations form B. Equal weighting of those assignments is justified by the relevant randomization or exchangeability assumption under the null; it is not created by running software that shuffles labels.
Here the statistic is mean(A)−mean(B), and the two-sided p-value counts assignments whose absolute statistic is at least the observed absolute value. This is one explicitly stated two-sided convention. The original assignment is included. Paired observations require a paired reassignment scheme; time-series blocks or clustered randomization need schemes that preserve their structure. Arbitrary shuffling across market regimes can erase dependence and produce an invalid reference distribution.
Worked case · synthetic data
Hypothetical groups are A=[3,4] and B=[1,2]. The observed mean difference is 2. There are six distinct ways to assign two of the four values to A. The resulting statistics are −2, −1, 0, 0, 1 and 2. For a predeclared positive-direction alternative, one assignment is at least 2, so the exact one-sided p-value is 1/6. For the stated absolute two-sided rule, two assignments qualify and p=2/6≈0.3333. This tiny experiment cannot produce a p-value below 1/6 in the positive tail.
Failure modes and context
An exact enumeration is exact only relative to its null assignment model. It does not prove that group differences have no economic importance. If a large problem uses random resampling instead, document the random seed, number of draws and a valid Monte Carlo p-value convention; reporting zero merely because no simulated draw exceeded the observed statistic is misleading. Also choose the statistic and direction before inspecting results.
Practice assignment
Use A=[1,3] and B=[2,6], again with two observations per group. Enumerate the six possible mean differences and calculate the absolute two-sided p-value. Explain whether a different permutation result can be obtained by switching to paired swaps without changing the study’s design assumptions.
Worked answer
The observed difference is −2. Across all two-of-four assignments, the statistics are −3, −2, −1, 1, 2 and 3. Four have absolute value at least 2, giving p=4/6≈0.6667. Paired swaps would define a different assignment mechanism; they are justified only if the actual design supports the pairing, not because their p-value is more attractive.
Check your understanding
Question 1
How many assignments occur in the worked exact test?
- Twenty-four
- Six
- Four
Reveal answer and reasoning
B. Six
Choosing two of four observations determines each distinct group partition.
Question 2
What is the stated two-sided p-value in the worked case?
- One third
- One sixth
- Zero
Reveal answer and reasoning
A. One third
Both −2 and +2 are at least as extreme in absolute value as the observed +2.
Question 3
Can time-series observations always be shuffled independently?
- Yes
- Only when the sample is large
- No
Reveal answer and reasoning
C. No
Unrestricted shuffling can destroy dependence or assignment constraints needed under the null.
