Yue (Michael) Ying

Data assimilation combines a model forecast (the prior) with an observation to produce the analysis (the posterior) — the best estimate of the state and its uncertainty. When the inputs are Gaussian, Bayes' rule has a closed form: the posterior is the pointwise product of the pdfs, rescaled so it integrates to one. This page shows that rule in one and two variables. Everything else (matrices, grid points, ensemble members) is stripped away; the two figures below are the whole of linear-Gaussian analysis.

1-D: one variable — the analysis as a weighted average

The simplest version of the problem: one variable, one observation of it. The prior is the forecast pdf $N(\mu_b, \sigma_b^2)$; the observation likelihood is $N(y, \sigma_o^2)$; Bayes' rule returns the posterior $N(\mu_a, \sigma_a^2)$, whose mean is a precision-weighted average of prior mean and observation.

Try it: drag the sliders to set the prior (mean and std) and the observation likelihood (mean and std) — the posterior updates live, always sitting between its two inputs and pulled toward the more certain one.

Prior model forecast

Observation likelihood

  • prior pdf (forecast)
  • observation likelihood
  • posterior pdf
  • prior × likelihood (unnormalized)

Reading the panels — 1-D

1 · The prior — the model forecast as a probability density $N(\mu_b, \sigma_b^2)$: the best guess sits at the centre, and $\sigma_b$ measures forecast uncertainty. A wider pdf is a more uncertain forecast. Slide $\sigma_b$ and watch both the shape and the posterior respond.

2 · The observation likelihood — the likelihood of observing the value $y$ given that the true state is $x$. It is centred on the observation, with width $\sigma_o$ set by the observation error: a precise instrument gives a narrow, tall likelihood; an imprecise one a wide, flat one.

3 · The posterior — the analysis. Bayes' rule $p(x \mid y) \propto p(x) \cdot \ell(y \mid x)$; for two Gaussians it is the Gaussian $N(\mu_a, \sigma_a^2)$ with precision-weighted mean $\mu_a = (\mu_b/\sigma_b^2 + y/\sigma_o^2) / (1/\sigma_b^2 + 1/\sigma_o^2)$ and $\sigma_a = 1/\sqrt{1/\sigma_b^2 + 1/\sigma_o^2}$. The posterior is always narrower than both inputs — combining information reduces uncertainty — and its mean is pulled toward the more certain one. With the default settings, the precise observation (small $\sigma_o$) drags the posterior mean to 0.96, far from the prior's 0.

4 · The product curve — with the toggle on, the dashed violet curve is the raw pointwise product $p(x) \cdot \ell(y \mid x)$, before normalization. The red posterior is exactly this curve divided by its integral. This is the whole of linear-Gaussian data assimilation in one figure: the Kalman filter, the ensemble Kalman filter, and 3D-Var all compute this same posterior, in different coordinates and at higher dimension.


2-D: two variables, one observed

The 1-D example was a single variable; data assimilation operates on whole states, and the bridge from one variable to many is the covariance — how errors at different variables relate to each other. This is the two-variable version of the same Bayes' rule: a bivariate Gaussian prior, an observation of y only — and yet x's posterior tightens as well, purely through the correlation. The main panel shows the joint pdf as covariance ellipses; the side panels show what each variable looks like on its own: its marginal pdf.

Try it: drag the correlation slider ρ to zero — the observation of y stops affecting x; raise it, and information leaks from the observed variable into the unobserved one. Watch the marginals and the ellipses tilt and shrink.

joint pdf
prior
posterior
observation of y

Prior joint pdf

Observation of y

  • prior joint pdf (ellipses at 1σ, 2σ, 3σ)
  • posterior joint pdf
  • observation of y (±σo band)
  • side panels: marginal pdfs (prior, posterior)

Reading the panels — 2-D

1 · The joint pdf — the prior $p(x,y) = \mathcal{N}\!\left( \begin{bmatrix}\mu_x\\ \mu_y\end{bmatrix}, \begin{bmatrix}\sigma_x^2 & \rho\,\sigma_x\sigma_y\\ \rho\,\sigma_x\sigma_y & \sigma_y^2\end{bmatrix} \right)$ drawn as its covariance ellipses at 1, 2 and 3σ. The ellipse axes are the standard deviations; the tilt is the correlation $\rho$. Rotate $\rho$ and watch the ellipses lean — that tilt is the whole mechanism of this section.

2 · The observation — the amber band at $y \pm \sigma_o$: the observation constrains $y$ only and carries no information about $x$ directly. Its likelihood $N(y, \sigma_o^2)$ is a one-dimensional curve, shown in the right-hand marginal.

3 · The posterior — the same Bayes' rule as in the 1-D section, in two dimensions. With the default settings the red ellipses shrink dramatically in $y$ ($\sigma_y$: 1.20 → 0.38) and modestly in $x$ ($\sigma_x$: 1.20 → 0.99) — the correlation $\rho = 0.6$ lets the observation of $y$ sharpen $x$ too. The posterior mean is pulled toward the observation, and even the correlation itself changes ($\rho$: 0.60 → 0.23). In information form, $\Lambda_a = \Lambda_b + H^\top R^{-1} H$ with $H = [0\ 1]$: the observation simply adds precision to $y$, and the covariance couples the rest.

4 · The marginals — the side panels integrate out the other variable, $p(x) = \int p(x,y)\,dy$: what each variable alone looks like, before (blue, dashed) and after (red) assimilation. This is the key point: observing $y$ sharpens the marginal of $x$ even though $x$ is unobserved, with the effect proportional to $\rho$. Slide $\rho$ to 0 and the red and blue $x$-curves become identical.

Next: Chapter 2 — the Observation–State Correlation Explorer — scales this same picture up to a 2-D temperature field: the correlation between one observation and every grid point, seen through an ensemble.