One sample: each simulated study draws n observations from a symmetric population with variance 1 (scale 1 for Cauchy), shifted by θ, and tests H0: θ = 0 against θ > 0 with the t test, the sign test and the signed-rank test. The two rank tests are randomised at the boundary so that all three have size exactly 5%; then their power can be compared fairly. Dots are simulated power at θ = 0, 0.1, …, 1; curves are the large-sample power 1 − Φ(z0.05 − √n θ c) from the efficacies c2 = 1/σ2, 4f(0)2 and 12(∫f2)2. k samples: the book's experiment with four groups of five, analysed by the F test and the Kruskal–Wallis test.
code/ch14_nonparametric_statistics.py (are_table, randomized_crit, sim_power, sim_kw_f); data: data/ch14-demos.json.