The filter through time

One body waxing and waning, the Kalman filter as it runs, tick by tick.

The smoother relaxes an entire path at once. The filter is more like a single body of evolving mass. It alternates the two moves from the introduction as time advances. Each tick:

  1. Predict. The belief chains through a process-noise spring of stiffness $q = 1/Q$. This is a series composition, so the mass shrinks to $\pi_{\text{pred}} = \pi q/(\pi+q)$ with the mean unchanged. Watch the body deflate.
  2. Update. If an observation of mass $r=1/R$ arrives, it fuses in parallel. The masses add, $\pi' = \pi_{\text{pred}} + r$, and the body relaxes to the new centre of mass. Watch it re-inflate and slide.

Skip an observation and the body just keeps shrinking. Nothing arrests the staleness. Play to watch the filter run, or Step one tick at a time. The dashed grey line is the true hidden path. The dots are observations, some withheld according to the slider. The solid line is the trail of filtered means.

tick mass (precision) filtered mean

Filtering is this alternation, run left to right once. Smoothing is what happens next. Having reached the end, you let the whole chain relax again with every link present at once, so future evidence pulls on the past too. The two moves and the springs are the same. The only difference is whether the chain gets to see its own future before settling. The landing-page demo shows the smoother.

Kalman's recursion left the page quickly. He took it to NASA's Ames Research Center in 1960, where Stanley Schmidt saw that it fitted the midcourse navigation problem for Apollo and reworked it for the nonlinear case. That version flew to the Moon.

The usual explanation the scalar recursion by Bayesian algebra

The local-level model is a random walk seen in noise. Carry the filtered belief as a Gaussian $\mathcal{N}(m, P)$ and advance it one tick:

$$ x_{t+1} = x_t + w,\; w \sim \mathcal{N}(0, Q), \qquad y = x + v,\; v \sim \mathcal{N}(0, R). $$

Predict. Adding the independent process noise $w$ leaves the mean alone and adds the variances:

$$ m^- = m, \qquad P^- = P + Q. $$

Update. An observation $y$ of variance $R$ arrives. Multiply prior and likelihood, keep the exponent, and complete the square in $x$:

$$ \frac{(x-m^-)^2}{P^-} + \frac{(x-y)^2}{R} \;=\; \Big(\tfrac1{P^-}+\tfrac1R\Big)\big(x - m'\big)^2 + \text{const}. $$

Reading off the minimiser and rearranging into gain form gives the measurement update:

$$ K = \frac{P^-}{P^-+R}, \qquad m' = m^- + K(y - m^-), \qquad P' = (1-K)\,P^-. $$

In the precision coordinates on this page, with $\pi = P^{-1}$, $q = Q^{-1}$, $r = R^{-1}$, the two steps read $\pi_{\text{pred}} = \pi q/(\pi+q)$ and $\pi' = \pi_{\text{pred}} + r$. That is the scalar Kalman filter.

The physics proof chase one tick: series, then parallel

The body above is one belief, its mass the precision. A tick is two moves on it, the same two the essay proves with its equivalence demos. Chase them across a single tick:

Predict sends the belief forward through the process-noise spring in series, so its mass drops to the reduced mass $\pi q/(\pi+q)$ and the body deflates. Update adds the observation in parallel, so the masses sum to $\pi^- + r$ and the body re-inflates at the new centre of mass. Series, then parallel, once per tick. No square to complete.