The same spectrum, two hypotheses
The purple line is the best fit, not the evidence or a posterior predictive mean. Its amplitude is unconstrained in sign.
A flexible model can fit well while making a poor prediction before seeing the data.
The purple line is the best fit, not the evidence or a posterior predictive mean. Its amplitude is unconstrained in sign.
Each predictive density has total area one over the real line; curves are not rescaled to their peaks or the visible window. They predict an estimator, not the unknown parameter.
| Quantity | Value |
|---|
Full-spectrum evidence densities use the stated flux units. Their ratio is dimensionless. Orthogonal residual factors cancel in the Bayes factor, so the predictive-density ratio at  gives exactly the same answer.
Seventy independent flux measurements lie from 500 to 510 nm. Their known Gaussian noise SD is σ. The continuum is fixed at 1; the Gaussian line template g has known centre 505 nm and width 0.35 nm. Only its amplitude A is unknown.
fluxᵢ ∼ Normal(1 + A gᵢ, σ²) H₀: A = 0 H₁: A ∼ Normal(0, w²) Â = Σ gᵢ(fluxᵢ − 1) / Σ gᵢ² s = σ / √Σ gᵢ² p(Â | H₀) = Normal(Â | 0, s²) p(Â | H₁) = Normal(Â | 0, s² + w²) BF₁₀ = p(Â | H₁) / p(Â | H₀) log BF₁₀ = −½ log(1 + w²/s²) + ½(Â/s)² w²/(s² + w²)
The finite positive prior SD is explicit (0.1–10); this Gaussian prior has unbounded support but integrates to one. It is not an improper flat prior or an arbitrarily truncated Gaussian. Marginal likelihoods with an unspecified flat amplitude prior would have an undefined normalisation.
The first log-Bayes-factor term penalises diffuse prior predictions. The second rewards a signal that the null predicted poorly. Broadening a prior does not always decrease its evidence, but an unnecessarily diffuse prior wastes predictive mass away from the observations. Evidence is not merely the best-fit likelihood with an invented parameter-count penalty.
Full-spectrum evidence is ∫ L(A) p(A) dA. Residual terms orthogonal to the line template are identical under both hypotheses and cancel exactly. For comparison, the maximum likelihood ratio has log value ½(Â/s)² and cannot penalise a broad alternative prior.
The displayed model probability is BF₁₀/(1 + BF₁₀), assuming equal prior model odds. Other model odds give other probabilities. A value rounded to 0% or 100% is not mathematical certainty; the log Bayes factor remains available.
There is no search over unknown line centres, continuum, noise or widths. Those would add parameters and change the evidence. Choose priors from pre-data knowledge rather than tuning them after inspecting this spectrum.
Lecture: Bayesian Model Comparison and Additional Parameters