Example 9.12: simpler ways to carry out permutation tests