permutation test on 2-factor contingency table