GLOBAL KNOWLEDGE ARK

Cosmology · Cosmological parameters and statistical inference

Data versions, provenance and reproducible inference

Replay a three-candidate inference while changing one declared input at a time, including an explicit zero-evidence failure condition.

Preparation: ratios, powers of ten and ordinary arithmetic. Physical quantities and notation are introduced as they are needed.

Back to the chapter

After reading, you can

  • List the data and model inputs needed to reproduce an inference.
  • Calculate posterior masses by exact finite enumeration.
  • Separate a reproducible calculation from scientific validation.
01

A result depends on more than its data file

An inference combines recorded data with a response model, calibration, sampling assumptions, parameter priors and a calculation. Keeping only a final number leaves those dependencies unresolved.

Reproducibility asks whether a declared calculation can be replayed from its identified inputs. Scientific validation also asks whether those inputs, response and assumptions adequately describe the intended physical situation.

Versioned configurations and source history can reveal what changed between results. Checksums identify exact file bytes within that record; they do not establish the truth or completeness of the model.

Cosmological software workflows supply concrete examples of linked theory, observational likelihood and parameter configuration. Here we perform a small original enumeration without running a sampler or adopting observational data.

02

Three candidate amplitudes and a specified noise law

Choose arbitrary readout unit U and exactly three allowed amplitudes A/U ∈ {1,2,3}. The discrete prior is a supplied model assumption, not an approximation to an undeclared continuous prior.

Each run contains two ordered, conditionally independent readings rᵢ = A+b+eᵢ. The calibration b is a fixed versioned input, either 0 or U, rather than an unknown quantity integrated out.

For each reading, the independent error eᵢ/U has values −1,0,1 with probabilities 1/4,1/2,1/4. Residuals outside this support have zero probability. All rows are retained in their declared order.

For each candidate A, calculate L(A) as the product of the two residual probabilities. Then Z = Σ_A L(A)π(A), and posterior mass is L(A)π(A)/Z only when Z > 0.

03

Calibration, data and prior revisions have distinct effects

Run V1 supplies readings (2,3)U, b = 0 and uniform prior masses (1/3,1/3,1/3). Its likelihoods at A/U = 1,2,3 are (0,1/8,1/8).

Run V2 uses the same raw reading bytes and prior, changing only b to U. The likelihoods become (1/8,1/8,0), so the posterior support shifts to smaller amplitudes.

Run V3 returns to b = 0 and the uniform prior, changing only the V1 readings to (2,2)U. Run V4 keeps V3’s readings and calibration but changes prior masses to (1/2,1/4,1/4).

These are explicit synthetic revisions. A fixed calibration change is not marginalization over calibration uncertainty, and changing a prior is not changing the raw observation.

Exact finite replay; tuples follow A/U = (1,2,3), posterior entries are probability masses
RunReadings/Ub/UPrior massesLikelihoodsEvidence ZPosterior massesPosterior mean/U
V1(2,3)0(1/3,1/3,1/3)(0,1/8,1/8)1/12(0,1/2,1/2)5/2
V2 calibration(2,3)1(1/3,1/3,1/3)(1/8,1/8,0)1/12(1/2,1/2,0)3/2
V3 data(2,2)0(1/3,1/3,1/3)(1/16,1/4,1/16)1/8(1/6,2/3,1/6)2
V4 prior(2,2)0(1/2,1/4,1/4)(1/16,1/4,1/16)7/64(2/7,4/7,1/7)13/7
04

Preserve exact inputs and their meaning

V1 and V2 have matching raw reading-file checksums, yet posterior means 2.5U and 1.5U. The calibration configuration changed, so data identity alone does not determine the output.

V3 and V4 also share reading bytes and the same likelihood values. Their different prior masses change the normalization and posterior mean from 2U to 13U/7.

A complete replay record identifies raw data, ordering and selection, units, calibration, candidate space, sampling law, prior, calculation and relevant program or runtime versions. Exact byte checksums complement this semantic record.

This finite enumeration has no random seed, Markov chain or Monte Carlo convergence claim. Its arithmetic can be checked exhaustively, including the nine possible ordered reading pairs for each fixed candidate and calibration.

05

Reproducing a calculation does not validate its assumptions

If the supplied readings were (100,100)U with b = 0, every allowed candidate would require errors outside the declared support. All likelihoods and the total evidence would be zero.

No normalized posterior exists in that condition. The appropriate result is an incompatible-data/model-condition report, followed by investigation of units, inputs or assumptions; dividing by zero or inventing posterior masses would conceal the failure.

A replay can reproduce a flawed calibration or inadequate sampling law perfectly. Assertions, independent numerical checks and comparison with relevant physical observations address different parts of validation.

For cosmological inference, preserve provenance and ask which changed dependency moved the result. An exact replay is valuable evidence about the calculation, while adequacy of the physical and observational model remains a separate scientific question.

Versioned finite inputs, exact posterior masses and zero-evidence guardFour exact finite inferences use candidates A/U = 1,2,3 and two ordered conditionally independent readings rᵢ = A+b+eᵢ, retaining all rows. Independent errors eᵢ/U = −1,0,1 have masses 1/4,1/2,1/4. Each run has a separate native-width panel with horizontal discrete candidate A/U and the same zero-based vertical posterior probability-mass axis from 0 to 1. Stems end in direct-labelled circle, square, triangle or diamond markers for V1–V4; no continuous prior or smoothed density is implied. V1 uses readings (2,3)U, fixed b = 0 and uniform prior: posterior (0,1/2,1/2), evidence 1/12, mean 5U/2. V2 keeps the same raw reading bytes and changes only b to U: posterior (1/2,1/2,0), evidence 1/12, mean 3U/2. V3 returns to b = 0 and uniform prior with readings (2,2)U: posterior (1/6,2/3,1/6), evidence 1/8, mean 2U. V4 keeps V3 readings and calibration but uses prior (1/2,1/4,1/4): posterior (2/7,4/7,1/7), evidence 7/64, mean 13U/7. Data identities are V1/V2 dc8b14760335 and V3/V4 4df00e6bc8e0. Configuration identities are V1/V3 6bad9bbc53e8, V2 1814b3e14730 and V4 a7c483509c5e. These are the first 12 hexadecimal digits of the actual supplied SHA256 identities; identical readings need not imply identical calibration. If readings are (100,100)U at b = 0, all likelihoods and evidence are zero; no normalized posterior exists. A checksum identifies bytes, not physical validity. No real observations, sampler, random seed, chain or Monte Carlo convergence claim is supplied.The same readings can give a new inferenceExactly three candidates: A/U = 1, 2, 3.Independent errors/U: −1,0,1 with masses 1/4,1/2,1/4.Each run retains both ordered rows. Calibration b is fixed.V1 · readings (2,3)U, b = 0, uniform priorData dc8b14760335 · config 6bad9bbc53e8Z = 1/12; posterior mean = 5/2 U00.250.50.75112301/21/2Horizontal candidate A/U · vertical posterior probability massV2 · same readings; only fixed b changes to UData dc8b14760335 · config 1814b3e14730Z = 1/12; posterior mean = 3/2 U00.250.50.7511231/21/20Horizontal candidate A/U · vertical posterior probability massV3 · readings (2,2)U; b = 0, uniform priorData 4df00e6bc8e0 · config 6bad9bbc53e8Z = 1/8; posterior mean = 2 U00.250.50.7511231/62/31/6Horizontal candidate A/U · vertical posterior probability massV4 · same as V3; prior masses (1/2,1/4,1/4)Data 4df00e6bc8e0 · config a7c483509c5eZ = 7/64; posterior mean = 13/7 U00.250.50.7511232/74/71/7Horizontal candidate A/U · vertical posterior probability massFailure check: readings (100,100)U at b = 0 give L = (0,0,0).Then Z = 0: no normalized posterior is defined.A checksum identifies bytes; it does not validate the noise law.No continuous prior, sampler, random seed or chain is supplied.
Four exact finite inferences use candidates A/U = 1,2,3 and two ordered conditionally independent readings rᵢ = A+b+eᵢ, retaining all rows. Independent errors eᵢ/U = −1,0,1 have masses 1/4,1/2,1/4. Each run has a separate native-width panel with horizontal discrete candidate A/U and the same zero-based vertical posterior probability-mass axis from 0 to 1. Stems end in direct-labelled circle, square, triangle or diamond markers for V1–V4; no continuous prior or smoothed density is implied. V1 uses readings (2,3)U, fixed b = 0 and uniform prior: posterior (0,1/2,1/2), evidence 1/12, mean 5U/2. V2 keeps the same raw reading bytes and changes only b to U: posterior (1/2,1/2,0), evidence 1/12, mean 3U/2. V3 returns to b = 0 and uniform prior with readings (2,2)U: posterior (1/6,2/3,1/6), evidence 1/8, mean 2U. V4 keeps V3 readings and calibration but uses prior (1/2,1/4,1/4): posterior (2/7,4/7,1/7), evidence 7/64, mean 13U/7. Data identities are V1/V2 dc8b14760335 and V3/V4 4df00e6bc8e0. Configuration identities are V1/V3 6bad9bbc53e8, V2 1814b3e14730 and V4 a7c483509c5e. These are the first 12 hexadecimal digits of the actual supplied SHA256 identities; identical readings need not imply identical calibration. If readings are (100,100)U at b = 0, all likelihoods and evidence are zero; no normalized posterior exists. A checksum identifies bytes, not physical validity. No real observations, sampler, random seed, chain or Monte Carlo convergence claim is supplied. Original Ark teaching model.

Worked reasoning

Explain a result change with matching reading files

Why do V1 and V2 have different posterior means despite identical readings?

  1. Both reading files contain the ordered pair (2,3)U.
  2. Changing fixed b from 0 to U changes each candidate-specific residual by −U.
  3. The posterior support shifts from (2,3)U to (1,2)U, changing the mean from 2.5U to 1.5U.

A model input changed; a data checksum alone cannot reproduce the inference.

Try the reasoning

  1. What should be reported when every candidate gives zero probability to the data?

    Show the answer and reasoning

    Zero evidence and incompatible declared conditions; no normalized posterior.

    The normalizing denominator is zero, so posterior masses cannot be defined by this model.

  2. Why do V3 and V4 differ despite the same likelihood values?

    Show the answer and reasoning

    Their prior masses differ.

    Multiplying by the new prior gives evidence 7/64 and posterior (2/7,4/7,1/7).

  3. Does reproducing the same output establish that the noise law describes real observations?

    Show the answer and reasoning

    No.

    Replay verifies a declared computation; the observational adequacy of its assumptions needs separate evidence.

What to carry forward

  • An inference depends on identified data, response, calibration, noise, prior and calculation.
  • Exact finite replay can isolate the effect of one changed input.
  • Zero evidence must remain visible, and reproducibility does not establish scientific validity.

References

Sources supporting the explanations, physical distinctions and examples in this lesson.

  1. Review of Particle Physics: 40. StatisticsG. Cowan; L. ListaTeaching resource · PDFpdg.lbl.govRead source
  2. Cobaya: Code for Bayesian Analysis of hierarchical physical modelsJesús Torrado; Antony LewisResearch paperarxiv.orgRead source
  3. Best Practices for Scientific ComputingGreg Wilson; D. A. Aruliah; C. Titus Brown; Neil P. Chue Hong; Matt Davis; Richard T. Guy; Steven H. D. Haddock; Kathryn D. Huff; Ian M. Mitchell; Mark D. Plumbley; Ben Waugh; Ethan P. White; Paul WilsonTeaching resourcejournals.plos.orgRead source