@@ -67,6 +67,7 @@ def clone_for_mc(layer):
6767 'soft_gap' : [],
6868 'mc_gap' : [],
6969 'ens_gap' : [],
70+ 'ncov' : [],
7071 'noise_catch' : {db : [] for db in [np .inf , 20 , 10 , 5 , 0 ]},
7172 }
7273
@@ -183,6 +184,7 @@ def clone_for_mc(layer):
183184 phys_gap = ca - fa
184185 target_n = int (conf .sum ())
185186 results ['phys_gap' ].append (phys_gap )
187+ results ['ncov' ].append (target_n )
186188 print (f'Physics GAP={ phys_gap :+.3f} (Coverage N={ target_n } )' )
187189
188190 # Softmax evaluation at matched coverage
@@ -266,6 +268,15 @@ def clone_for_mc(layer):
266268 f'Ensemble GAP: { np .nanmean (results ["ens_gap" ]):+.3f} ± { np .nanstd (results ["ens_gap" ]):.3f} '
267269 )
268270
271+ t_stat , p_val = stats .ttest_rel (results ['phys_gap' ], results ['ens_gap' ])
272+ avg_ncov = np .mean (results ['ncov' ])
273+ total_samples = len (yte )
274+ cov_pct = (avg_ncov / total_samples ) * 100
275+
276+ print ('\n Statistical Significance (Physics vs Ensemble):' )
277+ print (f' Paired t-test p-value: { p_val :.4f} ' )
278+ print (f' Average Matched Coverage: N = { avg_ncov :.1f} / { total_samples } ({ cov_pct :.2f} %)' )
279+
269280 print ("\n Noise Test Catch Rate (Physics catches Ensemble's confident errors):" )
270281 for snr_db in [np .inf , 20 , 10 , 5 , 0 ]:
271282 s = 'clean' if np .isinf (snr_db ) else f'{ snr_db } dB'
0 commit comments