liveBook · Manning

Kalman filter

As explained in Grokking Bayes

A multivariate Kalman filter is a recursive Bayesian filter that estimates multiple jointly evolving hidden variables from noisy observations using vector and matrix operations.

A Kalman filter estimates an evolving, partly hidden state as observations arrive. It performs Bayesian updating repeatedly rather than waiting for all data, maintaining a probability distribution over the current state. section 9.0 section 9.7

The filter follows a repeating predict–update cycle:

  • Predict the next state and its uncertainty from the previous state. section 9.0
  • Update that prediction when a noisy observation arrives, combining the prior prediction with the measurement through Bayes’ theorem. section 9.13
  • Repeat the process so beliefs and uncertainty change as information arrives. section 9.0

The name applies when the underlying dynamics are linear and the observational noise is Gaussian. Under these assumptions, Gaussian distributions remain convenient for fast, closed-form updates. With several latent variables, means become vectors, covariances become matrices, and the Kalman gain becomes a vector. section 9.7 section 9.13

Tracking atmospheric CO₂

A univariate model can treat CO₂ concentration as a random walk, but a multivariate filter tracks both concentration and its yearly slope. This produces forecasts that increase linearly, avoids underestimating concentration, and better follows the observed trend. Adding another state for changes in the slope can provide flexibility for quadratic trends. section 9.12 section 9.13

𝑦ᵢ = 𝑥ᵢ+ 𝑟,

Use the observation equation to see how a noisy measurement relates to the hidden state. section 9.7

How Grokking Bayes covers it

How deep it goes
Defines linear-Gaussian assumptions and explains predict–update behavior, extending implementation to multivariate vectors and matrices.
Examples
Illustrates filtering with atmospheric CO₂ concentration, yearly slope, noisy observations, and multiyear forecasts.
What it assumes
Builds on Bayesian probability, prior and posterior distributions, noisy measurements, and time-series reasoning.
What you can do after
Evaluate how linear-Gaussian state models update predictions and uncertainty as new observations arrive.
How it connects
Connects Bayesian inference with state-space models, time series, Gaussian distributions, and multivariate modeling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Bayes. The section links point to the parts of the book it draws on.