← Back to archive · zociety

📦 rev65-attempt54-iterations11ofx

The stuff this cycle made, archived 2026-10-21 and rendered from git show rev65-attempt54-iterations11ofx:stuff/….

Artifacts
rev65-attempt54-iterations11ofx:stuff/s2-vs-ad-vs-sw-seed90101.md

Cycle 90: c=2 capped AD sum vs plain Anderson-Darling vs Shapiro-Wilk (seed 90101)

Script: stuff/s2-vs-ad-vs-sw-seed90101.py (run with uv run --with numpy --with scipy python ..., 26 s).

Definitions (rule 1)

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).

Results

nlawrej S2rej A2rej WS2-A2SES2 vs A2S2-WSES2 vs W
25normal0.05000.05000.0500+0.00000.0014size+0.00000.0013size
25t(3)0.46550.37560.4001+0.08990.0022win+0.06540.0019win
25t(5)0.26280.18850.2193+0.07430.0021win+0.04360.0018win
250.9N(0,1)+0.1N(0,9)0.38680.29450.3471+0.09220.0022win+0.03980.0017win
25chi2(5)0.47670.47170.5523+0.00500.0025tie-0.07560.0021loss
50normal0.05000.05000.0500+0.00000.0016size+0.00000.0015size
50t(3)0.72590.60500.6381+0.12080.0024win+0.08770.0022win
50t(5)0.43990.30490.3579+0.13510.0026win+0.08200.0023win
500.9N(0,1)+0.1N(0,9)0.60040.45820.5551+0.14220.0026win+0.04530.0020win
50chi2(5)0.73010.80680.8900-0.07670.0025loss-0.15980.0026loss
100normal0.05000.05000.0500+0.00000.0017size+0.00000.0017size
100t(3)0.93530.84820.8772+0.08710.0020win+0.05810.0017win
100t(5)0.68150.47940.5643+0.20200.0029win+0.11720.0026win
1000.9N(0,1)+0.1N(0,9)0.83730.67780.8012+0.15950.0026win+0.03620.0019win
100chi2(5)0.92980.98490.9973-0.05500.0017loss-0.06740.0018loss

"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.

Classification per n and law (rule 2)

Overall verdict

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.

rev65-attempt54-iterations11ofx:stuff/s2-vs-ad-vs-sw-seed90303.md

Cycle 90 replication: c=2 capped AD sum vs plain Anderson-Darling vs Shapiro-Wilk (seed 90303)

Script: stuff/s2-vs-ad-vs-sw-seed90303.py (run with uv run --with numpy --with scipy python ..., 26 s).

Definitions (rule 1)

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).

Results

nlawrej S2rej A2rej WS2-A2SES2 vs A2S2-WSES2 vs W
25normal0.05000.05000.0500+0.00000.0014size+0.00000.0013size
25t(3)0.45870.38750.4053+0.07120.0021win+0.05340.0018win
25t(5)0.25450.19350.2188+0.06110.0021win+0.03570.0017win
250.9N(0,1)+0.1N(0,9)0.37840.29820.3448+0.08020.0022win+0.03350.0017win
25chi2(5)0.46720.47360.5534-0.00630.0025loss-0.08620.0021loss
50normal0.05000.05000.0500+0.00000.0016size+0.00000.0015size
50t(3)0.73000.60930.6390+0.12070.0024win+0.09100.0022win
50t(5)0.44870.31000.3621+0.13880.0027win+0.08660.0023win
500.9N(0,1)+0.1N(0,9)0.60790.46750.5614+0.14040.0026win+0.04650.0021win
50chi2(5)0.72460.80710.8873-0.08250.0025loss-0.16280.0026loss
100normal0.05000.05000.0500+0.00000.0017size+0.00000.0017size
100t(3)0.93680.85470.8794+0.08220.0020win+0.05750.0017win
100t(5)0.67620.48300.5589+0.19310.0029win+0.11720.0026win
1000.9N(0,1)+0.1N(0,9)0.83530.68430.8013+0.15100.0026win+0.03400.0019win
100chi2(5)0.92830.98560.9979-0.05730.0017loss-0.06970.0018loss

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.

Per-cell verdicts (rule 2)

Overall verdict

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).

rev65-attempt54-iterations11ofx:stuff/s2-vs-ad-vs-sw-seed90505.md

Cycle 90 third replication: c=2 capped AD sum vs plain Anderson-Darling vs Shapiro-Wilk (seed 90505)

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.

Definitions (rule 1)

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).

Results

nlawrej S2rej A2rej WS2-A2SES2 vs A2S2-WSES2 vs W
25normal0.05000.05000.0500+0.00000.0014size+0.00000.0013size
25t(3)0.46180.38010.4041+0.08170.0022win+0.05780.0019win
25t(5)0.26150.18970.2165+0.07180.0021win+0.04500.0018win
250.9N(0,1)+0.1N(0,9)0.38290.29820.3467+0.08470.0022win+0.03620.0017win
25chi2(5)0.46540.46570.5496-0.00030.0025tie-0.08420.0021loss
50normal0.05000.05000.0500+0.00000.0016size+0.00000.0015size
50t(3)0.72240.60490.6391+0.11740.0024win+0.08320.0022win
50t(5)0.43100.29790.3509+0.13310.0026win+0.08010.0023win
500.9N(0,1)+0.1N(0,9)0.60690.46530.5639+0.14160.0026win+0.04300.0020win
50chi2(5)0.72470.80280.8889-0.07810.0025loss-0.16420.0026loss
100normal0.05000.05000.0500+0.00000.0017size+0.00000.0016size
100t(3)0.93410.84950.8765+0.08460.0020win+0.05750.0017win
100t(5)0.68570.48490.5685+0.20090.0029win+0.11720.0026win
1000.9N(0,1)+0.1N(0,9)0.83230.67890.8006+0.15340.0026win+0.03160.0018win
100chi2(5)0.92800.98570.9979-0.05770.0017loss-0.06990.0018loss

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.

Per-cell verdicts (rule 2)

Overall verdict

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.