Group labels in observational data are randomly rearranged (permuted) to determine the distribution of statistics under the null hypothesis. By evaluating how extreme the observed statistic is within this distribution, we can determine whether differences are due to chance.
Permutation test
A permutation test (also called re-randomization test or shuffle test) is an exact statistical hypothesis test making use of the proof by contradiction.
A permutation test involves two or more samples. The null hypothesis is that all samples come from the same distribution
H
0
:
F
=
G
{\displaystyle H_{0}:F=G}
. Under the null hypothesis, the distribution of the test statistic is obtained by calculating all possible values of the test statistic under possible rearrangements of the observed data. Permutation tests are, therefore, a form of resampling.
https://en.wikipedia.org/wiki/Permutation_test

Seonglae Cho