computing the accuracy with the permutation method