Define what is random before scoring a match
A numerical coincidence acquires a tail probability only after specifying a null distribution and a complete scoring procedure. For a statistic whose larger values mean a closer match, the null tail is
Under a continuous null distribution, the probability integral transform makes uniform on . Discrete tails defined with inclusive ties are conservative: .
As a simple conditional example, suppose the offset from a fixed lattice target is uniform on . A match at least as close as the observed offset has
For a multiplicative ladder with ratio , a corresponding log-uniform cell has and . This is an exact statement about that chosen cell distribution. A nonuniform ladder, measurement-error distribution, fitted anchor, or search across several targets must be included in its actual null model.
Combining independent continuous tails
Let be independent uniform null probabilities. Then obeys for . Convolution, or multiplication of the Laplace transforms , gives
For observed , repeated integration by parts yields
Equivalently has a chi-square distribution with degrees of freedom. Independence is essential. Several ratios using one measured anchor, or several quantities derived from one fit, generally have a joint null that must be retained.
Probability floors have atoms
Suppose a scoring rule caps the evidential contribution of each match by using with a fixed . Write . Then
Its probability measure consists of density on and an atom of mass at . Its Laplace transform is
with a removable value at . In particular . The exact distribution of the sum is the convolution of these mixed measures; retaining the atoms matters at an inclusive tail threshold.
For two contributions, let
Then the exact inclusive tail is
At this equals , the mass of the joint atom. For any number of terms, for the same underlying uniform variables, so the ordinary gamma tail evaluated at an observed is a conservative upper bound on its capped null tail. A floor chosen after inspecting the result must itself be part of the selection procedure to retain such calibration.
Repeat the whole procedure in simulation
If a numerical analysis searches over depths, index assignments, formulas, anchors, tolerances, or subsets, apply that same search to each simulated null dataset. For example, if the reported statistic is the best score , the null simulation must recompute that maximum. The null model should reproduce shared errors and fitted parameters with the same fitting procedure.
This defines the object being calibrated. A selected formula cannot be treated as independently fixed merely because it can later be written without adjustable parameters. A fresh independent dataset can instead test a formula fixed before those data are examined.
Two finite-simulation quantities
For a fixed observed threshold, let of independent null simulations meet or exceed it. Conditional on that threshold, . If , solving gives the one-sided confidence upper limit
At 95% confidence the leading numerator is about . Zero observed exceedances therefore provide a resolution bound, not a zero tail probability. For numerical stability evaluate the exact expression as .
A different question is a valid Monte Carlo hypothesis test. If the observed dataset and null datasets produce exchangeable statistics, the rank of the observed one is uniform among distinct ranks. Its valid inclusive upper-tail Monte Carlo p-value is
Inclusive ties make it conservative. The rank argument and distinction from estimating a fixed tail are discussed by Phipson and Smyth, §§2 and 4. This p-value is not the confidence upper bound above. Exchangeability must be justified; simulating from a fitted model without reproducing the fitting process does not automatically supply it.
Verification and related
spectral_analysis_checks.py checks gamma tails, exact capped convolutions and atoms, finite-rank calibration, and zero-exceedance binomial coverage. These are mathematical calibration examples, with no empirical significance assigned to V2 data.
- Spectral analysis tools — navigation and scope.