Bayesian Filtering
The recursive predict–update loop behind all filters.
Prerequisites
Why it matters in robotics
Bayesian filtering is the recursive predict-update backbone beneath every estimator a robot uses for tracking its own position or state over time. Starting from the assumption that the robot's next state depends only on its current state and not its full history, a motion model predicts where the robot's belief should move next, and a new sensor reading corrects that prediction by weighing it against how reliable the sensor is. Understanding this recursion from first principles is what makes it possible to build and debug real localization and sensor-fusion stacks rather than treat a filter as a black box.
What to study
- ✓The recursive belief equation: derive bel(x_t) from the prior, motion model p(x_t | u_t, x_{t-1}), and measurement model p(z_t | x_t)
- ✓The two-step predict (control update / total probability) then update (measurement / Bayes rule with normalizer eta) loop
- ✓The Markov assumption and conditional independence that make the recursion tractable
- ✓How the general Bayes filter specializes into the Kalman filter, EKF, histogram filter, and particle filter
Where to study
Cheatsheet
Symbols used below
The two-step recursion
Predict (total probability over the motion model):
Update (Bayes' rule with the measurement model):
Every filter — KF, EKF, histogram, particle — is this same loop with a different representation of .
Markov assumption
The recursion only works because the state is assumed complete: depends on the past only through and , and depends on the past only through .
This conditional independence is what lets you replace a growing history of data with a single running belief.
Predict spreads, update sharpens
Predicting through the motion model always adds uncertainty (it convolves in process noise), even with a perfect model.
Updating with a measurement always removes uncertainty, weighted by how much you trust the sensor. A filter that only predicts drifts; one that only updates never smooths out noise.
Choosing a representation
The Bayes filter itself is intractable to compute exactly for general distributions — every concrete filter is a choice of how to represent and propagate : a single Gaussian (KF), a linearized or sigma-point Gaussian (EKF/UKF), a discretized grid (histogram filter), or a weighted sample set (particle filter).
Why it specializes the way it does
Gaussian + linear motion/measurement models collapse the integral into closed form — that's the Kalman filter.
Drop linearity but keep the belief unimodal and you get the EKF/UKF. Drop the Gaussian assumption entirely and you need a grid or particles to represent arbitrary, possibly multimodal shapes.
| Histogram filter | Kalman filter (+ EKF/UKF) | Particle filter | |
|---|---|---|---|
| Belief representation | Discretized grid of probabilities | Single Gaussian (mean + covariance) | Set of weighted samples |
| Handles multimodal belief | Yes | No — unimodal only | Yes |
| Cost driver | Grows exponentially with state dimension | Cheap: closed-form linear algebra | Scales with particle count, not state shape |
Application focus
Practice questions (9)
- Process vs. Measurement Noise in Kalman Filter Tuningmedium
- Discrete Bayes Filter: One Measurement Updatemedium
- Write the Bayes-filter equationsInterviewhard
- State estimation vs localizationIntervieweasy
- Testing, validating, and knowing a state estimate is goodInterviewhard
- Challenges in designing a state estimatorInterviewmedium
- Hyperparameters of a state estimatorInterviewmedium
- How do you know your measurement noise is Gaussian?Interviewmedium
- Observability from one beacon vs two beacons in 2DInterviewhard