# Methodology

## Scope and ordering

The pipeline is deliberately ordered as source preflight, algebraic verification, marginal KL
information gain, pairwise JS divergence, then generated reporting. Full-data numerical conclusions
are blocked until the source inventory is complete. Downloaded code, notebooks, configuration text,
and metadata are treated only as untrusted data and are never executed.

All raw HDF5 analysis labels are preserved verbatim. Paper and GWOSC display aliases are separate
metadata. In particular, `IMRPhenomXPHM-SpinTaylor`, `IMRPhenomXPHM-ST`, and
`IMRPhenomXPHM` are never silently collapsed into one stored label.

## Weights and summaries

Linear weights must be finite, nonnegative, one-dimensional, row-aligned, and have positive total
mass. Log weights must be finite and are stabilized by subtracting their maximum before
exponentiation. Unweighted tables receive equal weights. Effective sample size is

\[
N_\mathrm{eff}=1/\sum_i w_i^2
\]

for normalized weights.

Ordinary reported summaries are the weighted median and central 90% interval (5th and 95th weighted
percentiles). The paper's primary tilt convention is separate: find the shortest empirical interval
containing 90% weight in `cos_tilt_1_infinity`, transform its endpoints to degrees, and pair those
bounds with the weighted median tilt. It is labeled "90% HPD in cosine" everywhere.

## Derived-quantity reproduction

For every individual posterior and any released Combined posterior, the code checks `m1 >= m2` and
`0 < q <= 1`, then recomputes

\[
q=m_2/m_1,\quad \eta=q/(1+q)^2,
\]

\[
\mathcal{M}=(m_1m_2)^{3/5}/(m_1+m_2)^{1/5},
\]

and

\[
\chi_\mathrm{eff}=(m_1\chi_{1z}+m_2\chi_{2z})/(m_1+m_2).
\]

Detector- and source-frame chirp masses are recomputed separately. Effective spin is checked only
with spin components from the same epoch: reference frequency, infinity, or the explicitly named
infinity-only-precession-averaged representation. No substitution crosses those boundaries.

The versioned tolerances in `data/tolerances-v1.json` were created before final release verification.
Each comparison reports maximum absolute error, maximum relative error, RMS error, weighted-summary
differences, and the fraction of samples outside `absolute + relative * |released|`.

Paper and portal tables print a rounded median and separately rounded asymmetric uncertainties.
Accordingly, rounding checks compare those three printed quantities directly; they do not compare
an exact sample quantile with an endpoint reconstructed by adding two independently rounded values.

## Marginal KL information gain - preregistered estimator

Each value is `D_KL(posterior || matching_prior)` for one exact marginal representation, reported in
bits. Matching prior samples are mandatory. Derived quantities are evaluated row by row from the
matching joint prior; prose descriptions are never converted into invented marginal priors.

The deterministic primary estimator is:

1. Construct 40 shared, equal-width probability bins spanning the finite union of posterior and
   matching-prior samples, with outward `nextafter` boundary expansion.
2. Convert weighted samples to normalized bin masses.
3. Scale each mass vector by its effective sample size and add a Jeffreys pseudo-count of 0.5 to
   every bin to make finite-sample empty-bin handling explicit and deterministic.
4. Normalize again and compute discrete KL with base-2 logarithms.

Sensitivity is reported at 20, 40, and 80 bins. A 90% Monte Carlo interval comes from 500 seeded
weighted bootstrap pairs at the 40-bin setting. For efficiency, row resampling is aggregated exactly
at the fixed-bin level: multinomial counts are drawn from the empirical weighted bin masses using the
effective sample size. These intervals describe estimator variation, not physical credible
intervals. Marginal KL is prior dependent, non-additive, and is not the total information in an
event.

## Pairwise posterior-analysis JS divergence - preregistered estimator

Only the three individual waveform-analysis posteriors are compared; Combined is excluded. For each
semantically compatible parameter and event:

1. Build common probability bins and convert each weighted sample set to nonnegative normalized
   masses.
2. Call `scipy.spatial.distance.jensenshannon(p, q, base=2.0)`.
3. Square the returned Jensen-Shannon distance to obtain Jensen-Shannon divergence in bits.

Raw samples are never passed directly to `jensenshannon`. All three model pairs are evaluated with
20, 40, and 80 bins, 500 seeded weighted bootstrap pairs, and 200 same-model split-sample replicates
as a numerical-noise floor. Bootstrap row resampling is aggregated into multinomial draws from the
fixed empirical weighted bin masses. Matching prior marginals receive the same prior-vs-prior JS
check. Figures use normalized densities, common axes, and common support.

The result is conservatively called "posterior-analysis divergence." Even if priors agree, marginal
JS cannot measure changes in joint correlations and has no universal scientific-significance
threshold.

## Reproducibility boundary

Seeds are derived deterministically from analysis identifiers. JSON uses sorted keys; CSV columns
and analysis loops are sorted. Artifact hashes detect file changes. Plot bytes are not promised to
be cross-platform identical because the project does not pin a container, rendering backend, and
font stack.
