Math

Kalman Filter

A Kalman filter updates a belief about a hidden state using noisy measurements. It balances model prediction and measurement trust through their uncertainties.

7 minLevel 3/3The interactive stage stays ad-free.
Measurement RMSE1.48Filter RMSE1.05Final variance0.771Points80

Cyan dots are noisy measurements. The rose line is the Kalman estimate, which fuses the measurements with the motion model. Higher measurement noise lowers the gain and smooths the estimate; higher process noise makes the filter trust new measurements more.

What you are seeing

1

Predict the next state using the motion model; uncertainty grows.

2

Compare the prediction with the measurement. The Kalman gain weights them by their uncertainties.

3

Update the state and uncertainty. Repeating predict–update tracks the hidden signal through noise.

Why it matters

Kalman filters are used in GPS, robotics, aerospace, sensor fusion, and finance. They are a practical introduction to probabilistic state estimation.

Complexity & details

A 1D Kalman update is O(1). A state of dimension d costs O(d³) for the covariance update.

Frequently asked questions

What is the Kalman gain?+

It is the weight given to the measurement relative to the prediction. High measurement noise lowers the gain; high prediction uncertainty raises it.

Does the Kalman filter require Gaussian noise?+

The standard Kalman filter is optimal for linear systems with Gaussian noise. Nonlinear or non-Gaussian systems use extensions such as EKF or particle filters.