# Number of all sample divisions in permutation test

I have a question with regard to the number of permutations in a permutation test. Assume I want to do a two group independent t-test. In the permutation variant of the t-test, I would repeatedly generate permutations of the group labels [e.g., (1, 2, 1, 2, ..., 1) ] and compute a t statistic for each iteration.

Assume that I want to do an exhaustive permutation test where I generate all possible divisions of the sample into two groups. According to Ernst (2004), "[c]omputation of the permutation distribution of a test statistic involves careful enumeration of all $$\binom{N}{n}$$ divisions of the observations." Here, $$N$$ is the total sample size and $$n$$ is the size of one of the groups. According to Ernst (2004) -- and all other references I found on this topic -- creating all "divisions of the observations" is accomplished by generating all permutations of the group labels.

However, generating all permutations of the group labels will result in duplicate "divisions of the observations" if the two groups are of equal size. For example, the permutations $$(1, 1, 2, 2)$$ and $$(2, 2, 1, 1)$$ clearly correspond to the same division, but they represent different permutations of the group labels. Therefore, the number of unique division of the observations not given by the binomial coefficient, but you have to divide it by 2 (for $$K$$ equal-sized groups, you have to divide the number of permutations of the group labels by $$K!$$). Note that no duplicates occur if the groups are of different size.

This results in several questions on my part: Has this matter been treated in any reference (I did not find any)? Has this issue been overlooked completely so far? Or is there a sensible reason to generate duplicate divisions in the case of equal group sizes? (note that you do not do that when you have unequal group sizes, so in my opinion this would be weird)

Ernst, M. D. (2004). Permutation methods: a basis for exact inference. Statistical Science, 19, 676-685.