Statistical tests are complicated because their inventors did not have fast computers
Instead of thinking hard about the exact mathematical form of the null hypothesis, just simulate it with Monte Carlo. The bitter lesson applies to classical statistics.
agarriga.substack.com