 Hello everyone, this is Alice Gell. In this video, I will discuss how we can perform the smoothing task through backward recursion. I'll be using our umbrella story as the example. Let's recall the definition of the smoothing task. Let the first time step be zero. Suppose that today is day t minus one. Smoothing asks the following question. Given observations from day zero to day t minus one, what is the probability that I am in a particular state on day k in the past? Mathematically, what is the probability of s sub k given o sub zero to t minus one? Remember that smoothing is useful since new observations can help us derive more accurate estimates of the states in the past. Similar to filtering, smoothing is not calculating a single probability since s sub k can be true or false in our model where computing a distribution containing two probabilities. To calculate a smooth probability, we will make use of two recursion, forward and backward recursion. First, we'll take the probability and write it as a normalized product of two probabilities. Don't worry about understanding the formula now. I'll explain it a bit later. The first probability is equivalent to the filtering message for day k, f sub zero to k. We already know how to calculate it using forward recursion. We'll calculate the second probability using backward recursion. Let's define the second probability as a message called b for backward recursion. The subscript k plus one to t minus one indicates the sequence of observations in the probability. Backward recursion passes the message b from the last time step, k equals t minus one, back to the first time step, k equals zero. Let's look at the formulas for backward recursion. For k equals t minus one, we have the base case. In this case, the message is b sub t to t minus one. This message is equal to the probability of o sub t to t minus one given s sub t minus one. The sequence in the subscript doesn't make much sense. How can we have a sequence of time steps starting from t and ending at t minus one? This is impossible. Because of this, we interpret the sequence of time steps as an empty sequence. Given an empty sequence of observations, we define the probabilities to be ones. This is why the base case is a vector of ones. If k is an integer from zero to t minus two, we have the recursive case. We're given the message b sub k plus two to t minus one. We want to calculate the message b sub k plus one to t minus one. Note that we're going backward in time from day k plus two to day k plus one. The message is a normalized summation. Each term in a summation is a product of three terms. The first term comes from the sensor model and the last term comes from the transition model. Let's go through an example of calculating a smooth probability. Consider the umbrella story. Assume that two days have passed and the director carried an umbrella on both days. We want to calculate the probability that it rained on day zero. To use a smoothing formula, we should figure out the values of k and t. If we compare our probability with the probability in the formula, we can see that k is zero and t is two. We have gathered two observations and we're looking to estimate the state on day zero. Next, let's write the probability as a normalized product of two messages. The first one is f sub zero to zero, a probability of the state on day zero given an observation on day zero. We already calculated this using forward recursion. The second one is b sub one to one. We will calculate this using backward recursion. Let's calculate b sub one one. Since the sequence in the subscript is not empty, this is not the base case. We need to apply the formula for the recursive case. Let's take the recursive formula and plug in k equals zero and t equals two. Take a look at the middle term. The sequence of observations is empty since it starts at day two and ends at day one. This is the base case. We can replace the middle term with two ones. Next, let's look at the last term in the summation. As zero could be true or false. Let's write the last term as a tuple of two probabilities. One for as zero equals true and the other one for as zero equals false. Finally, let's write the sum over s sub one explicitly into two terms. One for s sub one equals true and one for s sub one equals false. At this point, the formula contains all small letters. We're ready to plug in the numbers. Let's plug the numbers into the formula. This is the calculation process. Pause the video and go through the calculation process yourself. Then keep watching. Let me point out two things regarding the calculations. When multiplying two distributions, we're performing an element-wise multiplication. And the result is another distribution. For example, suppose that we want to multiply one one and zero point seven and zero point three. The first value in the result is one multiplied by zero point seven. The second value in the result is the second one multiplied by zero point three. Second, when we multiply a number with a distribution, we multiply the number with every probability in the distribution. For example, when we multiply zero point two with zero point three and zero point seven, the first number in the result is zero point two multiplied by the first value in the distribution. And similarly for the second value. We have calculated the message b sub one one using backward recursion. We're now ready to derive the smooth probability. Recall the smoothing formula. The smooth probability is a normalized product of two messages. The first one from forward recursion and the second one from backward recursion. We need to multiply the forward recursion message and the backward recursion message together. This is an element-wise multiplication again. The final step is to normalize the product. Here's our final answer. Given that the director brought the umbrella on both days, the probability that it rained on day zero is quite high, around 88%. That's everything for this video. Let me summarize. After watching this video, you should be able to calculate the smoothing probabilities by using backward recursion. Thank you very much for watching. I will see you in the next video. Bye for now.