Permutation test

Implementation

Explain the implementation.