The stuff this cycle made, archived 2026-10-21 and rendered from
git show rev65-attempt54-iterations11ofx:stuff/….
s2-vs-ad-vs-sw-seed90101.mds2-vs-ad-vs-sw-seed90303.mds2-vs-ad-vs-sw-seed90505.md
Script: stuff/s2-vs-ad-vs-sw-seed90101.py (run with uv run --with numpy --with scipy python ..., 26 s).
For a sample x_1..x_n, let z_(1) <= ... <= z_(n) be the order statistics of the sample-standardized values (x - mean)/sd, sd with n-1. The Anderson-Darling term is
t_i = -((2i-1)/n) * [ ln Phi(z_(i)) + ln(1 - Phi(z_(n+1-i))) ], i = 1..n.
The three competing statistics:
Each statistic gets its own normal-calibrated 5% critical value: the 95th percentile of S2 and A2 and the 5th percentile of W over the same 20000 N(0,1) samples per n. All three tests are then applied to the same simulated samples under every law, so differences are paired. The paired Monte Carlo SE is sd(d_j)/sqrt(20000) where d_j is the difference of the per-sample 0/1 rejection indicators.
Seed 90101 (numpy default_rng), 20000 sims per (n, law), n in 25, 50, 100. Laws: normal, t(3), t(5), 0.9 N(0,1) + 0.1 N(0,9) (per-observation mixture), chi-square(5).
| n | law | rej S2 | rej A2 | rej W | S2-A2 | SE | S2 vs A2 | S2-W | SE | S2 vs W |
|---|---|---|---|---|---|---|---|---|---|---|
| 25 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0014 | size | +0.0000 | 0.0013 | size |
| 25 | t(3) | 0.4655 | 0.3756 | 0.4001 | +0.0899 | 0.0022 | win | +0.0654 | 0.0019 | win |
| 25 | t(5) | 0.2628 | 0.1885 | 0.2193 | +0.0743 | 0.0021 | win | +0.0436 | 0.0018 | win |
| 25 | 0.9N(0,1)+0.1N(0,9) | 0.3868 | 0.2945 | 0.3471 | +0.0922 | 0.0022 | win | +0.0398 | 0.0017 | win |
| 25 | chi2(5) | 0.4767 | 0.4717 | 0.5523 | +0.0050 | 0.0025 | tie | -0.0756 | 0.0021 | loss |
| 50 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0016 | size | +0.0000 | 0.0015 | size |
| 50 | t(3) | 0.7259 | 0.6050 | 0.6381 | +0.1208 | 0.0024 | win | +0.0877 | 0.0022 | win |
| 50 | t(5) | 0.4399 | 0.3049 | 0.3579 | +0.1351 | 0.0026 | win | +0.0820 | 0.0023 | win |
| 50 | 0.9N(0,1)+0.1N(0,9) | 0.6004 | 0.4582 | 0.5551 | +0.1422 | 0.0026 | win | +0.0453 | 0.0020 | win |
| 50 | chi2(5) | 0.7301 | 0.8068 | 0.8900 | -0.0767 | 0.0025 | loss | -0.1598 | 0.0026 | loss |
| 100 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0017 | size | +0.0000 | 0.0017 | size |
| 100 | t(3) | 0.9353 | 0.8482 | 0.8772 | +0.0871 | 0.0020 | win | +0.0581 | 0.0017 | win |
| 100 | t(5) | 0.6815 | 0.4794 | 0.5643 | +0.2020 | 0.0029 | win | +0.1172 | 0.0026 | win |
| 100 | 0.9N(0,1)+0.1N(0,9) | 0.8373 | 0.6778 | 0.8012 | +0.1595 | 0.0026 | win | +0.0362 | 0.0019 | win |
| 100 | chi2(5) | 0.9298 | 0.9849 | 0.9973 | -0.0550 | 0.0017 | loss | -0.0674 | 0.0018 | loss |
"win" = S2 minus competitor exceeds +2 SE; "tie" = within 2 SE; "loss" = below -2 SE. Normal rows are size checks: all three tests sit at exactly 0.0500 by construction (critical values are quantiles of these same samples), so the difference is 0.
S2 loses most to A2 at chi-square(5), n=100 (-0.055, -33 SE; n=50 is nearly as bad at -0.077, -31 SE), and loses most to W at chi-square(5), n=50 (-0.160, -61 SE). It loses nowhere else: on every symmetric heavy-tailed or contaminated law it wins over both competitors by 19 to 70 SE. The cap at c=2 buys its heavy-tail power by damping the few extreme t_i that a one-sided skewed tail produces, which is exactly the signal A2 and W use to detect chi-square(5).
One sentence: The c=2 capped AD sum is worth using over plain AD and over Shapiro-Wilk only when the alternative is symmetric heavy tails or contamination, where it wins by 4 to 20 points of power at every n; it is not worth using as a general-purpose normality test, because under the skewed chi-square(5) law it loses 5 to 8 points to plain AD at n >= 50 and 7 to 16 points to Shapiro-Wilk at every n.
Script: stuff/s2-vs-ad-vs-sw-seed90303.py (run with uv run --with numpy --with scipy python ..., 26 s).
For a sample x_1..x_n, let z_(1) <= ... <= z_(n) be the order statistics of the sample-standardized values (x - mean)/sd, sd with n-1. The Anderson-Darling term is
t_i = -((2i-1)/n) * [ ln Phi(z_(i)) + ln(1 - Phi(z_(n+1-i))) ], i = 1..n.
The three competing statistics:
Each statistic gets its own normal-calibrated 5% critical value: the 95th percentile of S2 and A2 and the 5th percentile of W over the same 20000 N(0,1) samples per n. All three tests are then applied to the same simulated samples under every law, so differences are paired. The paired Monte Carlo SE is sd(d_j)/sqrt(20000) where d_j is the difference of the per-sample 0/1 rejection indicators.
Seed 90303 (numpy default_rng), 20000 sims per (n, law), n in 25, 50, 100. Laws: normal, t(3), t(5), 0.9 N(0,1) + 0.1 N(0,9) (per-observation mixture), chi-square(5).
| n | law | rej S2 | rej A2 | rej W | S2-A2 | SE | S2 vs A2 | S2-W | SE | S2 vs W |
|---|---|---|---|---|---|---|---|---|---|---|
| 25 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0014 | size | +0.0000 | 0.0013 | size |
| 25 | t(3) | 0.4587 | 0.3875 | 0.4053 | +0.0712 | 0.0021 | win | +0.0534 | 0.0018 | win |
| 25 | t(5) | 0.2545 | 0.1935 | 0.2188 | +0.0611 | 0.0021 | win | +0.0357 | 0.0017 | win |
| 25 | 0.9N(0,1)+0.1N(0,9) | 0.3784 | 0.2982 | 0.3448 | +0.0802 | 0.0022 | win | +0.0335 | 0.0017 | win |
| 25 | chi2(5) | 0.4672 | 0.4736 | 0.5534 | -0.0063 | 0.0025 | loss | -0.0862 | 0.0021 | loss |
| 50 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0016 | size | +0.0000 | 0.0015 | size |
| 50 | t(3) | 0.7300 | 0.6093 | 0.6390 | +0.1207 | 0.0024 | win | +0.0910 | 0.0022 | win |
| 50 | t(5) | 0.4487 | 0.3100 | 0.3621 | +0.1388 | 0.0027 | win | +0.0866 | 0.0023 | win |
| 50 | 0.9N(0,1)+0.1N(0,9) | 0.6079 | 0.4675 | 0.5614 | +0.1404 | 0.0026 | win | +0.0465 | 0.0021 | win |
| 50 | chi2(5) | 0.7246 | 0.8071 | 0.8873 | -0.0825 | 0.0025 | loss | -0.1628 | 0.0026 | loss |
| 100 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0017 | size | +0.0000 | 0.0017 | size |
| 100 | t(3) | 0.9368 | 0.8547 | 0.8794 | +0.0822 | 0.0020 | win | +0.0575 | 0.0017 | win |
| 100 | t(5) | 0.6762 | 0.4830 | 0.5589 | +0.1931 | 0.0029 | win | +0.1172 | 0.0026 | win |
| 100 | 0.9N(0,1)+0.1N(0,9) | 0.8353 | 0.6843 | 0.8013 | +0.1510 | 0.0026 | win | +0.0340 | 0.0019 | win |
| 100 | chi2(5) | 0.9283 | 0.9856 | 0.9979 | -0.0573 | 0.0017 | loss | -0.0697 | 0.0018 | loss |
Calls: win = S2 ahead by more than two paired SE, tie = within two SE, loss = behind by more than two SE; "size" rows are the calibration sample.
S2 loses anywhere only under chi-square(5). Against A2 the largest drop in power is at n=50 (-0.083), the largest in SE units at n=100 (-34.1 SE). Against W the worst cell is chi-square(5) at n=50 (-0.163, -62.3 SE). This matches seed 90101 cell for cell except chi-square(5) n=25 vs A2, which moves from tie to a marginal loss, so the sign of that cell is not settled and its size is under 0.01 either way.
Sentence for the heap-death learning: The c=2 capped AD sum is worth using over both plain AD and Shapiro-Wilk for symmetric heavy-tailed or scale-contaminated alternatives, where it gains 3 to 19 points of power at n=25-100, but it is not worth using as a general omnibus test because it loses to plain AD by up to 8 points and to Shapiro-Wilk by up to 16 points under chi-square(5).
Script: stuff/s2-vs-ad-vs-sw-seed90505.py (run with uv run --with numpy --with scipy python ..., 26 s). Same code as the seed 90303 script with only the seed changed.
For a sample x_1..x_n, let z_(1) <= ... <= z_(n) be the order statistics of the sample-standardized values (x - mean)/sd, sd with n-1. The Anderson-Darling term is
t_i = -((2i-1)/n) * [ ln Phi(z_(i)) + ln(1 - Phi(z_(n+1-i))) ], i = 1..n.
The three competing statistics:
Each statistic gets its own normal-calibrated 5% critical value: the 95th percentile of S2 and A2 and the 5th percentile of W over the same 20000 N(0,1) samples per n. All three tests are then applied to the same simulated samples under every law, so differences are paired. The paired Monte Carlo SE is sd(d_j)/sqrt(20000) where d_j is the difference of the per-sample 0/1 rejection indicators.
Seed 90505 (numpy default_rng), 20000 sims per (n, law), n in 25, 50, 100. Laws: normal, t(3), t(5), 0.9 N(0,1) + 0.1 N(0,9) (per-observation mixture), chi-square(5).
| n | law | rej S2 | rej A2 | rej W | S2-A2 | SE | S2 vs A2 | S2-W | SE | S2 vs W |
|---|---|---|---|---|---|---|---|---|---|---|
| 25 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0014 | size | +0.0000 | 0.0013 | size |
| 25 | t(3) | 0.4618 | 0.3801 | 0.4041 | +0.0817 | 0.0022 | win | +0.0578 | 0.0019 | win |
| 25 | t(5) | 0.2615 | 0.1897 | 0.2165 | +0.0718 | 0.0021 | win | +0.0450 | 0.0018 | win |
| 25 | 0.9N(0,1)+0.1N(0,9) | 0.3829 | 0.2982 | 0.3467 | +0.0847 | 0.0022 | win | +0.0362 | 0.0017 | win |
| 25 | chi2(5) | 0.4654 | 0.4657 | 0.5496 | -0.0003 | 0.0025 | tie | -0.0842 | 0.0021 | loss |
| 50 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0016 | size | +0.0000 | 0.0015 | size |
| 50 | t(3) | 0.7224 | 0.6049 | 0.6391 | +0.1174 | 0.0024 | win | +0.0832 | 0.0022 | win |
| 50 | t(5) | 0.4310 | 0.2979 | 0.3509 | +0.1331 | 0.0026 | win | +0.0801 | 0.0023 | win |
| 50 | 0.9N(0,1)+0.1N(0,9) | 0.6069 | 0.4653 | 0.5639 | +0.1416 | 0.0026 | win | +0.0430 | 0.0020 | win |
| 50 | chi2(5) | 0.7247 | 0.8028 | 0.8889 | -0.0781 | 0.0025 | loss | -0.1642 | 0.0026 | loss |
| 100 | normal | 0.0500 | 0.0500 | 0.0500 | +0.0000 | 0.0017 | size | +0.0000 | 0.0016 | size |
| 100 | t(3) | 0.9341 | 0.8495 | 0.8765 | +0.0846 | 0.0020 | win | +0.0575 | 0.0017 | win |
| 100 | t(5) | 0.6857 | 0.4849 | 0.5685 | +0.2009 | 0.0029 | win | +0.1172 | 0.0026 | win |
| 100 | 0.9N(0,1)+0.1N(0,9) | 0.8323 | 0.6789 | 0.8006 | +0.1534 | 0.0026 | win | +0.0316 | 0.0018 | win |
| 100 | chi2(5) | 0.9280 | 0.9857 | 0.9979 | -0.0577 | 0.0017 | loss | -0.0699 | 0.0018 | loss |
Calls: win = S2 ahead by more than two paired SE, tie = within two SE, loss = behind by more than two SE; "size" rows are the calibration sample.
S2 loses anywhere only under chi-square(5). Against A2 the largest drop in power is at n=50 (-0.078), the largest in SE units at n=100 (-34.2 SE). Against W the worst cell is chi-square(5) at n=50 (-0.164, -62.5 SE).
Across the three seeds (90101, 90303, 90505) every cell has the same call except chi-square(5) n=25 vs A2, which reads tie, loss (-2.5 SE), tie. Its difference is between -0.006 and 0.000 in all three runs, so that cell is a genuine tie at the resolution of 20000 sims: S2 and A2 have the same chi-square(5) power at n=25 and S2 falls behind only from n=50 on.
Sentence for the heap-death learning: The c=2 capped AD sum is worth using over both plain AD and Shapiro-Wilk for symmetric heavy-tailed or scale-contaminated alternatives, where it gains 3 to 20 points of power at n=25-100 in all three seeds, but it is not worth using as a general omnibus test because under chi-square(5) it loses to plain AD by up to 8 points and to Shapiro-Wilk by up to 16 points.