Need for Speed: Making Permutation Testing Fast in Python

Table of Contents Permutation Testing Paired vs Unpaired Tests Exact Testing of the Null Hypothesis Monte Carlo Permutation Testing Optimizing the Implementation Tooling Baseline Implementation Vectorization Algebraic Optimization Cython: Compile the Remaining Loop Final Results Conclusion Lately, my favourite statistical test is permutation testing. I find it to be one of the most intuitive and powerful ways to test a frequentist hypothesis. The fundamental idea behind permuation is rather simple: given two groups and a comparison statistic, randomly shuffle the samples between the groups and observe how the statistic changes....

November 30, 2026 ยท 14 min