📦 rev65-attempt46-iterations11ofx
The stuff this cycle made, archived 2026-10-21 and rendered from
git show rev65-attempt46-iterations11ofx:stuff/….
rev65-attempt46-iterations11ofx:stuff/tail-df-sweep.md
Cycle 82: a degrees-of-freedom sweep of the cycle 75 gate statistic
Third, independent check on the direction (tail-df-sweep.py, pure python, regenerates tail-df-sweep.csv in about 2 s). Same statistic as tail-source-check.py; the data law is swept over t(3), t(5), t(10), t(30) and N(0,1) at n=25 and 50. Seed 82111, 4000 sims per n per law. ncx2 ceiling: var/mean^2 <= 2/3. Two extra columns: max (largest of the 4000 statistics) and var_drop_max (variance of the other 3999).
Answer
- The tail is the statistic's 1/F weight, switched on by tail weight in the data. The top-1% share of the AD sum owed to the single largest term falls smoothly with df: 0.99/1.00 (t3), 0.95/1.00 (t5), 0.87/0.97 (t10), 0.65/0.76 (t30), 0.51/0.51 (normal) at n=25/50. var/mean^2 crosses 2/3 between t(30) and t(10) at n=25 (0.69 vs 6.1) but is already above it at t(30) for n=50.
- Normal data restores ncx2 moments only just, and not in every seed. At n=25 var/mean^2 = 0.531. At n=50 it is 0.925, above 2/3, because one sample out of 4000 scored 0.931 (p99 is 0.090); without that one sample it is 0.649. The other two cycle 82 items (seeds 65082, 82003) got 0.62 and 0.615 at n=50. So "normal restores the ncx2 ceiling" holds for the bulk but a single draw with Phi(z) near zero can break it even under N(0,1); the mechanism is the same one-term dominance, only far rarer.
- t(30) at n=50 shows the same thing at a larger scale: p99 = 0.125 but max = 29.0, so var/mean^2 = 143 from one sample; dropping it gives 0.0065 / 0.039^2 = 4.3, still above 2/3 (a second outlier). Agreement with
tail-trim-check.md: removing the single largest term is not enough once df is finite.
- t(3) and t(5) are hopeless at n=50: p95 of 33 and 0.43 against p90 of 1.7 and 0.15; var/mean^2 542 and 648, top-1% share of the AD sum 1.00 and 0.999.
Caveats: one seed per law; the top-1% share averages 40 samples; the var_drop_max column is a one-sample sensitivity, not a trimmed estimator.
Rule 1 tables (one per law)
t3
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 | max | var_drop_max |
| 25 | 82111 | 4000 | 0.449 | 8.599 | 42.66 | 0.3019 | 0.7658 | 9.284 | 57.39 | 7.79 |
| 50 | 82111 | 4000 | 5117 | 1.42e+10 | 542.2 | 1.747 | 33.4 | 2.482e+04 | 6.217e+06 | 4.545e+09 |
t5
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 | max | var_drop_max |
| 25 | 82111 | 4000 | 0.1042 | 0.27 | 24.85 | 0.1275 | 0.2274 | 1.253 | 15.7 | 0.2092 |
| 50 | 82111 | 4000 | 91.17 | 5.382e+06 | 647.6 | 0.1506 | 0.4341 | 30.31 | 9.587e+04 | 3.089e+06 |
t10
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 | max | var_drop_max |
| 25 | 82111 | 4000 | 0.05169 | 0.0164 | 6.138 | 0.08214 | 0.1126 | 0.3937 | 5.655 | 0.008548 |
| 50 | 82111 | 4000 | 0.1427 | 5.999 | 294.5 | 0.06828 | 0.1018 | 0.6454 | 106.7 | 3.158 |
t30
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 | max | var_drop_max |
| 25 | 82111 | 4000 | 0.03853 | 0.001022 | 0.6883 | 0.06719 | 0.08719 | 0.1532 | 0.5816 | 0.0009482 |
| 50 | 82111 | 4000 | 0.03897 | 0.2167 | 142.7 | 0.05062 | 0.06303 | 0.1249 | 29.03 | 0.006527 |
normal
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 | max | var_drop_max |
| 25 | 82111 | 4000 | 0.03527 | 0.0006609 | 0.5312 | 0.06288 | 0.07725 | 0.1228 | 0.4182 | 0.0006244 |
| 50 | 82111 | 4000 | 0.02723 | 0.0006853 | 0.9245 | 0.04567 | 0.05652 | 0.08997 | 0.9308 | 0.0004812 |
Rule 2 table: share owed to the single largest |draw| / largest term
| law | n | top-1% share of variance term | top-1% share of AD sum | all-sample share of variance term | all-sample share of AD sum |
| t3 | 25 | 0.8319 | 0.9855 | 0.3457 | 0.3178 |
| t3 | 50 | 0.8363 | 1 | 0.2815 | 0.3186 |
| t5 | 25 | 0.6738 | 0.9478 | 0.2835 | 0.2911 |
| t5 | 50 | 0.6101 | 0.999 | 0.2018 | 0.2454 |
| t10 | 25 | 0.5624 | 0.8716 | 0.242 | 0.2685 |
| t10 | 50 | 0.4017 | 0.9654 | 0.1608 | 0.203 |
| t30 | 25 | 0.4303 | 0.6527 | 0.2209 | 0.254 |
| t30 | 50 | 0.2863 | 0.7641 | 0.1375 | 0.1763 |
| normal | 25 | 0.3452 | 0.5054 | 0.21 | 0.2487 |
| normal | 50 | 0.2311 | 0.5122 | 0.1305 | 0.1677 |
rev65-attempt46-iterations11ofx:stuff/tail-source-check.md
The heavy tail is the t(3) data, and it lives in the AD denominator, not the variance
Answer to the cycle 82 direction. Yes, the heavy upper tail of the cycle 75 gate statistic is driven by the t(3) data, and replacing t(3) with N(0,1) at the same n restores ncx2-compatible moments: var/mean^2 drops from 39 and 739 (t(3)) to 0.53 and 0.71 (normal) at n=25 and 50, both at or below the ncx2 family ceiling of 2/3 within sampling error. The dominating term is the denominator F = Phi(z_min) of the single most negative standardized draw, not the pooled variance: in the top 1% of t(3) statistics that one AD term carries 98.7% (n=25) and 100% (n=50) of the statistic, while the same draw carries only 84% and 79% of the sum of squares.
Inputs (rule 1)
- Statistic: the cycle 71/75 lower-tail-weighted Anderson-Darling gate,
sum_i (F_n(i) - Phi(z_i))^2 / Phi(z_i) on standardized data, scaled by n^-1/2, regenerated from the identical pure-python code.
- Script
stuff/tail-source-check.py, output stuff/tail-source-check.csv.
- Seed 65082 (per-stream: 6508200 + n + {0 t(3), 1 normal}); 4000 sims per n per law; t(3) drawn as gauss / sqrt(gamma(1.5, 2/3)) as in cycle 71.
t(3) data (rule 1)
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 |
| 25 | 65082 | 4000 | 0.4887 | 9.32 | 39.0 | 0.306 | 0.981 | 11.6 |
| 50 | 65082 | 4000 | 3496 | 9.03e9 | 739 | 1.47 | 29.8 | 4410 |
Normal data (rule 1)
| n | seed | sims | mean | variance | var/mean^2 | p90 | p95 | p99 |
| 25 | 65082 | 4000 | 0.03645 | 7.09e-4 | 0.534 | 0.0636 | 0.0780 | 0.131 |
| 50 | 65082 | 4000 | 0.02751 | 5.37e-4 | 0.710 | 0.0472 | 0.0588 | 0.0913 |
Per-draw dominance (rule 2)
Share owed to the single largest |draw| in each sample, averaged over the top 1% of statistics (40 samples) and over all 4000.
| law | n | top1% share of variance term | top1% share of AD sum (largest term) | all-sample share of variance | all-sample share of AD sum |
| t(3) | 25 | 0.840 | 0.987 | 0.343 | 0.321 |
| t(3) | 50 | 0.788 | 1.000 | 0.280 | 0.316 |
| normal | 25 | 0.378 | 0.611 | 0.210 | 0.251 |
| normal | 50 | 0.218 | 0.481 | 0.131 | 0.169 |
Reading
- Under normal data var/mean^2 is 0.53 and 0.71 against the ncx2 ceiling 2/3; the 0.71 at n=50 is within the Monte Carlo spread of 4000 sims. The statistic is well behaved there. The 49 and 515 of cycle 81 (39 and 739 here, same order, different seed) are entirely a t(3) effect.
- The mechanism is the weight 1/Phi(z_min). One extreme negative t(3) draw standardizes to z of order -4 to -6 once it inflates the sd less than it inflates itself, Phi(z) is 1e-5 or smaller, and that single term is the whole statistic (share 0.987 and 1.000 in the top 1%). The variance term is also dominated (0.84, 0.79) but less completely, so the heavy tail is a denominator effect, consistent with the member-3 join question.
- Normal top-1% shares (0.61, 0.48) show the same term is the largest even for Gaussian samples, but it never runs away because z_min is bounded by roughly -3 at these n.
- So cycle 80's lambda/n excess was the 1/Phi(z_min) tail of t(3) reaching the 7.815 crossing, not noncentrality; no ncx2 fit should be expected to hold for t(3) data beyond the fitted quantile.
Caveats
- Single seed per law; the t(3) n=50 variance (9e9) is driven by a handful of draws and would move by orders of magnitude under another seed, as cycle 81's bootstrap bounds already showed. The share figures are far more stable than the moments.
- Pure-python t(3) uses gammavariate, same as cycle 71; no comparison to a stored cycle 75 row was made here, only regeneration from the same code.
rev65-attempt46-iterations11ofx:stuff/tail-trim-check.md
Cycle 82: does removing one draw's term restore ncx2 moments?
A second, independent check on the direction, using a new seed and two interventions on the cycle 75 gate statistic (tail-trim-check.py, pure python, regenerates tail-trim-check.csv in under a second):
- full: the statistic as defined.
- drop1: the same sum with its single largest AD term removed.
- floorF: every denominator F = Phi(z) floored at 1/(2n), which caps the 1/F weight.
Seed 82003, 4000 sims per n per law. ncx2 ceiling: var/mean^2 <= 2/3.
Answer
- The heavy tail is one draw's 1/F weight. Removing that one term (drop1) shrinks t(3) variance by a factor of about 3,000 at n=25 and about 2e11 at n=50. p99 goes from 9.4 to 0.30 (n=25) and from 12,751 to 0.44 (n=50). In the top 1%, the largest term is 98.6% (n=25) and 100% (n=50) of the sum. That matches the
tail-source-check.md result under a different seed.
- Normal data restores ncx2 moments. var/mean^2 is 0.592 (n=25) and 0.615 (n=50), both under 2/3. The largest term's top-1% share is only 49% and 56%.
- Removing that one term does not fully fix t(3). After drop1 or floorF, t(3) var/mean^2 is 0.96 and 0.82 at n=25, and 1.40 and 0.88 at n=50, all still above 2/3. So the runaway tail comes from one draw, but under t(3) the remaining terms are still over-dispersed compared with an ncx2. It is a second, much smaller excess, probably from the second-most-extreme draw (drop1 at n=50 leaves it in).
Rule 1 tables
t(3)
| n | version | mean | variance | var/mean^2 | p90 | p95 | p99 |
| 25 | full | 0.4877 | 10.958 | 46.07 | 0.3015 | 0.9934 | 9.4011 |
| 25 | drop1 | 0.0601 | 0.0035 | 0.960 | 0.1260 | 0.1749 | 0.3011 |
| 25 | floorF | 0.0678 | 0.0037 | 0.816 | 0.1374 | 0.1855 | 0.3063 |
| 50 | full | 2597.75 | 2.21e9 | 327.5 | 2.5227 | 32.904 | 12751.3 |
| 50 | drop1 | 0.0836 | 0.0098 | 1.397 | 0.1741 | 0.2475 | 0.4405 |
| 50 | floorF | 0.0820 | 0.0059 | 0.875 | 0.1677 | 0.2300 | 0.3857 |
normal
| n | version | mean | variance | var/mean^2 | p90 | p95 | p99 |
| 25 | full | 0.0360 | 0.0008 | 0.592 | 0.0633 | 0.0780 | 0.1193 |
| 25 | drop1 | 0.0263 | 0.0003 | 0.370 | 0.0469 | 0.0576 | 0.0808 |
| 25 | floorF | 0.0333 | 0.0004 | 0.334 | 0.0592 | 0.0709 | 0.0996 |
| 50 | full | 0.0273 | 0.0005 | 0.615 | 0.0470 | 0.0579 | 0.0941 |
| 50 | drop1 | 0.0220 | 0.0002 | 0.346 | 0.0388 | 0.0469 | 0.0675 |
| 50 | floorF | 0.0252 | 0.0002 | 0.318 | 0.0435 | 0.0526 | 0.0765 |
Rule 2: per-draw dominance, top 1% of statistics
Mean share of the AD sum carried by the single largest term (the most negative standardized draw, whose 1/F is the denominator weight):
| n | t(3) | normal |
| 25 | 0.986 | 0.493 |
| 50 | 1.000 | 0.555 |
Caveats
There is one seed per law. The t(3) full-statistic variance at n=50 depends on the seed by orders of magnitude, so read it as unbounded, not as a value. The drop1 and floorF rows and the shares are the stable part. The 1/(2n) floor is a design choice, not derived from anything; a different floor will move the floorF rows.