---
title: "Cosmology, Likelihoods and Priors Interactive Lab | Sandbox Physics"
description: "How can the same sky data support a stable estimate and a changing model preference?"
canonical_url: "https://sandboxphysics.com/labs/cosmology-likelihood-priors/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/cosmology-likelihood-priors/"
---

FR08 · What the data say about an amplitude

# Cosmology, Likelihoods and Priors

**How can the same sky data support a stable estimate and a changing model preference?** A concentrated likelihood can keep an amplitude estimate nearly fixed as its prior widens. The evidence averages that likelihood over the whole prior, so a wider range gives more weight to poorly fitting amplitudes and can reduce support for the free-amplitude model.

Fit a lensing-power amplitude to published ACT DR6 bandpowers. Widen a prior or allow extra response uncertainty, then compare the likelihood, posterior and evidence.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

Observed points and the full covariance come from the ACT DR6 lensing v1.2 public release. A fixed supplied fiducial convergence spectrum is binned with the published window matrix. Only its amplitude is varied, with a Gaussian bandpower likelihood and the stated Hartlap correction. Cosmology-dependent reconstruction response and bias corrections are held fixed. The optional extra response-amplitude uncertainty is a teaching nuisance, added to the published covariance. The remapped sky is a synthetic illustration with magnified deflections; it is separate from the observed bandpowers. This conditional amplitude is not the temperature-spectrum lensing parameter or a dark-energy or matter-density measurement.

## One observed spectrum, different prior choices

Amber points: ACT DR6 observations. Green: unrestricted likelihood fit. Blue dashed: your trial amplitude.

Published convergence bandpowers $10^7 C_L^{\kappa\kappa}$

Normalized prior and posterior; unit-area likelihood $A_\kappa$

Blue: likelihood Amber dashed: prior Green: posterior

Read the evidence ratio

Positive log evidence ratio favors the free-amplitude model over a fixed unit amplitude, given the displayed prior and frozen spectrum. Negative values favor the fixed model. This comparison does not test a full cosmological extension.

[Download the frozen data and provenance](https://sandboxphysics.com/data/fr08/lensing-act-dr6-v1.2.json)

Physics tutorial

## Separate an estimate from a model comparison

**Background** Gravity bends microwave photons on their way from the early universe. Correlated distortions across the sky reveal the power of this lensing field. ACT publishes that power in multipole bands, together with its covariance.

**Why it matters** A narrow uncertainty on one amplitude answers a different question from whether an extra parameter earns its freedom. Both questions can be asked of the same observations.

Start with the essentials

- **Focus question**: Why does widening a prior change the evidence more than the fitted amplitude?
- **One-sentence intuition**: The posterior describes amplitudes within a model; the evidence averages the fit across that model’s prior.

### Core mathematical model

#### One amplitude multiplying a fixed spectrum

$$
m_b(A_\kappa)=A_\kappa\sum_L W_{bL}C_{L,\mathrm{fid}}^{\kappa\kappa},\qquad\chi^2=(d-m)^\mathsf{T}\Sigma^{-1}(d-m)
$$

The window matrix bins the fiducial convergence power. The full covariance includes correlations between observed bands. The effective covariance includes the specified finite-simulation precision correction.

#### Posterior and evidence

$$
p(A_\kappa\mid d,M)=\frac{\mathcal L(d\mid A_\kappa,M)\pi(A_\kappa\mid M)}{Z_M},\qquad Z_M=\int\mathcal L\pi\,dA_\kappa
$$

The uniform prior integrates to one. The fixed model sets the amplitude to one; the free model averages over the selected prior. Their evidence ratio compares precisely these conditional models.

#### Integrating over an uncertain response

$$
d=(A_\kappa+g)t+\epsilon,\quad g\sim\mathcal N(0,s_g^2),\quad\Sigma=C/h+s_g^2tt^\mathsf T
$$

The optional extra amplitude offset is completely degenerate with the signal amplitude. Marginalizing it broadens the amplitude uncertainty. Its width is an explicit teaching choice, independent of the published ACT uncertainty model.

### Common difficulties

#### A likelihood is not a probability distribution over models

**Typical misconception** If two models reach the same best fit, the data support them equally.

**Better mental model** A model with a wide free parameter can fit well in only a small part of its prior. The evidence counts that fraction; the best fit alone does not.

### Run the experiment

1. 01

   #### Let the observations set the width

   Choose Data set the scale and compare the likelihood with the posterior.

   **What to observe:** A broad, locally flat prior leaves the concentrated likelihood almost unchanged.

2. 02

   #### Give the free model more room

   Choose Much wider prior. Compare the posterior interval and the log evidence ratio.

   **What to observe:** The interval stays nearly fixed, but averaging over more poorly fitting amplitudes reduces the evidence for the free model.

3. 03

   #### Add an uncertain response

   Choose Uncertain response, then increase Extra amplitude uncertainty.

   **What to observe:** The same observations now permit a wider signal amplitude because the extra response offset can mimic part of it.

Physical conclusion

Always state the varied parameter, the frozen theory and covariance, and the normalized prior before interpreting a model preference.

## Related experiments and articles

Cosmology from expansion to inference · Reading path

### Expansion, sound, sky statistics and inference

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Read a public lensing likelihood**](https://sandboxphysics.com/stories/cosmology/lensing-likelihood/)
2. [Article **What sky patterns imply about dark components**](https://sandboxphysics.com/stories/cosmology/dark-components-and-models/)
3. [Lab **CMB Acoustic Peaks** Turn geometric compensation into a testable question](https://sandboxphysics.com/labs/cmb-acoustic-peaks/)

Waves & optics · Starter path

## From one ray to interference measurement

Start with refraction, find where the ray picture stops working, then use interference to measure tiny distances.

[Start here → **Optical Boundary Explorer** Turn the incident angle and watch reflected and transmitted power trade off. Then switch to the critical-angle scene. Observe · 11 min](https://sandboxphysics.com/labs/optical-boundary-explorer/)

1. [1 Optical Boundary Explorer](https://sandboxphysics.com/labs/optical-boundary-explorer/)
2. [2 Rainbow Caustic Observatory](https://sandboxphysics.com/labs/rainbow-laboratory/)
3. [3 Camera Obscura](https://sandboxphysics.com/labs/camera-obscura/)
4. [4 Coherent Wave Composer](https://sandboxphysics.com/labs/coherent-wave-composer/)
5. [5 Young Double-Slit Bench](https://sandboxphysics.com/labs/young-double-slit-bench/)
6. [6 Michelson Precision Lab](https://sandboxphysics.com/labs/michelson-precision-lab/)

[View the full path →](https://sandboxphysics.com/topics/waves-and-optics/#starter-path)
