Post-hoc audit of the existing mutual-information study

These analyses were added after the original development and reserved-family
results had been inspected. They do not constitute prospective validation of a
new procedure. Original stage labels identify data provenance only. No new
simulation catalogues were generated.

Run:
  python audit_existing_results.py

This directory may sit beside the original archive directory, or inside it
as a packaged post-hoc audit subdirectory.
Its only inputs are existing archive files; outputs are written beside the script.
Python dependencies are numpy, pandas, scipy (the original archive environment).

Definitions:
- Estimated comparison = estimate B - estimate A.
- Error = estimated value minus its known population value.
- Centring change = centred estimate minus raw estimate; this is the negative
  of the estimated permutation-reference mean.
- MSE = squared empirical mean error + empirical variance with denominator R.
- Correct ordering is defined only when the population information differs.
  For equal-information controls, p_b_gt_a is directional preference, not a
  false-positive rate from an inferential decision rule.
- Wilson intervals are pointwise 95% Monte Carlo intervals for each probability.
- Baseline N=78 results are reused for common-N=78 rather than re-estimated.

Outputs:
raw_centred_calibration.csv
  262 KSG k=4 cells (134 baseline and 128 common-N, including reused N=78
  cells), each with 200 replicates and B=100 permutations. Includes both A and
  B streams, all eight designs and all available information/sample sizes.
raw_centred_comparisons.csv
  288 original comparison scenarios/procedures; raw and centred outcomes side
  by side, with replicate-level correction magnitudes and sign transitions.
ordering_grid_true_04_06.csv
  All eight designs, four size pairs and two procedures, for I_A=.4,I_B=.6.
primary_Q1x_paired_replicates.csv
  Parent-pair-level outcomes in Q1x, I_A=.4,I_B=.6,N_A=500,N_B=78, centred k=4.
primary_Q1x_paired_summary.json
  Paired ordering gain, transition counts, empirical MSE decomposition and
  exact two-sided McNemar test. The percentile 95% interval resamples whole
  independent A/B parent pairs (both procedures together), 9,999 times with
  seed 2026101501. This is not a bootstrap of KSG input rows.
stellar_k4_k5_audit.csv and stellar_k4_k5_*.npz
  Deterministic recovery of the existing observational analysis for k=4 and
  k=5, with the original data, selection, labels, seeds and permutation counts.
  All k=5 null draws reproduce stored arrays, and k=4 observed/p/null95 values
  reproduce the archived k-grid. Global and stratified references have distinct
  interpretations; near-neutral global centring in the simulated catalogue
  grid does not imply neutral stratified centring in the observed example.
audit_provenance.json
  Source SHA-256 hashes and reproducibility checks.
audit_run.log
  Execution output from the numerical audit.

Key results (read the CSV/JSON for full precision):
- Across all calibration cells the largest absolute mean centring change is
  .001244 nats, but individual replicate corrections can exceed .01 nats.
- Across comparison cells, the largest absolute mean change is .001458 nats
  and the largest absolute RMSE change is .001841 nats. The largest observed
  correct-order probability change is 2.5 percentage points for unequal truth.
  These descriptive differences do not establish formal practical equivalence.
- Primary Q1x baseline: 13% correct centred, 11.5% raw. Common N=78 gives 55%
  correct for both. Centred paired improvement is 42 percentage points (95%
  parent-pair bootstrap interval 35 to 49 points): 84 improved and none worsened.
- Squared mean error accounts for 95.0002% of baseline empirical comparison MSE.
  This fraction concerns squared estimation error, not the fraction of ranking
  mistakes caused by bias.
- Equal sizes alone do not ensure accurate differences: Q1x baseline at
  78/78 orders correctly 56% of the time and at 500/500 orders correctly 86%,
  while comparison biases remain -.1932 and -.1545 nats, respectively.

No new moderate-imbalance experiment, min-N matching procedure, bootstrap of
KSG input observations, or claims of performance outside the tested grid are
included in this audit.
