Princeton Intro to Robotics (Fall 2026) | Lecture 11: Bayes filter
Watch on YouTube →
Overview
Bayes' filter extends the nondeterministic state filter by maintaining probability distributions over states and updating them with probabilistic models of robot dynamics and sensor measurements. A binary door example shows how Bayes' rule and total probability combine evidence: an initial 0.5 belief that the door is open rises to 0.75 after an open sensor reading, to 0.95 after a push action, and to about 0.983 after another open reading. The general filter alternates a dynamics prediction with a measurement update, though computing it exactly can be intractable for continuous state spaces; the Kalman filter and particle filter address different practical cases.
Key takeaways
- Bayes' filter mirrors the nondeterministic filter: it predicts state using a dynamics model, then incorporates sensor evidence, replacing set propagation and intersection with probability updates.
- For the door sensor, an open reading has likelihood 0.6 when the door is open and 0.2 when it is closed; with equal 0.5 priors, the posterior open probability becomes 0.75.
- A push action transforms the 0.75 open, 0.25 closed belief into a 0.95 probability that the door is open, using transition probabilities of 1.0 for open-to-open and 0.8 for closed-to-open.
- A second open sensor reading raises the door-open belief from 0.95 to approximately 0.983, illustrating recursive fusion of action and measurement evidence.
- The measurement update relies on the sensor likelihood P(z_t | x_t), while Bayes' rule and normalization produce the desired posterior P(x_t | z_t).
- Exact Bayes filtering becomes difficult for continuous, high-dimensional state spaces; the Kalman filter is exact for linear-Gaussian models, while particle filters provide an approximate general-purpose alternative.
Chapters
- The previous filter represented the robot's possible states as a set, initially denoted X0 hat.
- At each step, dynamics propagate the set and the sensor observation narrows it through the observation's pre-image.
- Intersecting the propagated set with the sensor-consistent set repeats recursively, but representing and computing these sets is often intractable.
- Bayes' filter is the probabilistic analogue of the nondeterministic filter.
- Instead of tracking a set of possible states, it maintains a probability distribution over the state space.
- The distribution is propagated and updated using models of robot dynamics and sensor measurements.
- Capital X denotes a random variable, while lowercase x denotes a particular outcome.
- P(X = x) is often shortened to P(x), as in a biased coin with P(heads) = 0.7 and P(tails) = 0.3.
- A valid discrete distribution sums to 1; for continuous outcomes, its density integrates to 1 over the state space.
- P(x, y) abbreviates the probability that random variables X and Y take outcomes x and y together.
- For independent variables only, the joint distribution factorizes as P(x, y) = P(x)P(y).
- Independent coin flips illustrate the rule: knowing one flip's outcome provides no information about the other.
- P(x | y) represents the probability of outcome x after observing that Y equals y.
- The definition is P(x | y) = P(x, y) / P(y), assuming P(y) is nonzero.
- If X and Y are independent, conditioning on Y leaves P(X) unchanged.
- The law of total probability recovers P(x) by summing P(x, y) over all possible y values.
- Using conditional probabilities, the discrete form is P(x) = sum over y of P(x | y)P(y).
- For continuous variables, the sum becomes an integral; eliminating a variable this way is called marginalization.
- Bayes' rule gives P(y | x) = P(x | y)P(y) / P(x).
- The identity follows by expressing the joint probability as either P(x | y)P(y) or P(y | x)P(x).
- Bayes' filter uses this rule to infer a state from an observation when the sensor model describes observations given states.
- The robot estimates a binary world state: whether a door is open or closed.
- The sensor reports open with probability 0.6 when the door is open, and reports closed with probability 0.4.
- When the door is closed, the sensor reports open with probability 0.2 and closed with probability 0.8.
- These likelihoods can be estimated by calibrating the sensor against known door states and counting outcomes.
- Before observing the sensor, the robot assigns probability 0.5 to each door state.
- At time step 1, the sensor reports that the door is open.
- The robot should not treat the reading as certain; it combines the observation likelihood with its prior.
- For an open reading, Bayes' rule uses P(sensor open | door open) = 0.6 and the open-state prior of 0.5.
- The evidence probability is marginalized across both states: 0.6 × 0.5 + 0.2 × 0.5 = 0.4.
- The posterior probability that the door is open is 0.6 × 0.5 / 0.4 = 0.75; the closed-state probability is 0.25.
- A prior assigned absolute certainty to one state would prevent contrary evidence from changing the belief.
- The nondeterministic filter uses a sensor pre-image to find states consistent with an observation.
- A probabilistic sensor model provides P(Z | X), the likelihood of an observation given a state.
- Bayes' rule reverses that relationship to obtain P(X | Z), the state belief given the received observation.
- The robot's only action in the example is pushing the door.
- If the door is already open, pushing leaves it open with probability 1.
- If the door is closed, pushing opens it with probability 0.8 and leaves it closed with probability 0.2.
- Like sensor likelihoods, transition probabilities are treated as known inputs and can be measured empirically.
- The previous posterior, 0.75 open and 0.25 closed, becomes the prior for the action update.
- Total probability combines transitions from both prior states: 1.0 × 0.75 + 0.8 × 0.25.
- The predicted probability that the door is open after pushing is 0.95, before receiving another sensor reading.
- The prediction depends recursively on the prior belief, the known action, and the transition model.
- At time step 2, the robot receives another sensor reading that the door is open.
- The dynamics prediction of 0.95 open and 0.05 closed supplies the prior for the measurement update.
- Applying the same sensor likelihoods and normalizing produces an open-door posterior of about 0.983.
- The update shows how action evidence and repeated sensor evidence combine over time.
- The dynamics update is bel-bar(x_t) = sum over x_(t-1) of P(x_t | x_(t-1), u_(t-1)) bel(x_(t-1)).
- The measurement update weights the prediction by the sensor likelihood P(z_t | x_t) and normalizes to obtain bel(x_t).
- Exact updates are manageable for small discrete spaces, but continuous or high-dimensional states require difficult integrals.
- Linear dynamics with Gaussian noise lead to the Kalman filter; particle filters approximately support more general nonlinear dynamics and sensor models.
Transcript excerpt
0:10 All right, I think we'll go and get started. So, in the in the last lecture, we started our discussion of state estimation. So, given some imperfect sensor measurements, how does the robot figure out what what its state is? Uh and the specific approach that we discussed was this thing called a non-deterministic filter. Uh I'll just remind you uh the basic steps of the filter. So, the thing that the filter maintains at each time step is a set. So, this is a set of possible states that the robot could be in at that time step. So, initially, you start off with some set, which we called X0 hat. Uh so, we assume that the robot knows that it starts off in in some set. We then use our knowledge of the dynamics of the robot to propagate this set forwards in time. So, that's this step over here. So,
0:59 basically, for every state in this initial set, uh where could the robot end up? So, we call this F of X0 hat. And then the robot also receives some sensor measurements, uh which helps it further narrow down uh the locations of the states it could be in. Uh and the specific computation step here is to compute the pre-image. So, this is this H inverse or pre-image of ZT. ZT is the sensor measurement that the robot received uh at that time step. Let's say this is um at at time step one. And intuitively, this pre-image is the set of all states that are consistent with having received this sensor observation. So, basically, the question is like what
1:46 what states could I have received the sensor observation from? Uh that helps the robot further narrow down what states it could be in. And then you just
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Introduction to Robotics @ Princeton.