 Alright, so we're going to solve a real example of forecasting, which should be helpful for the midterm. Once we cover this, make sure you follow everything, and then if you do, it should be in a pretty good shape for the midterm. So you're given monthly demand data on the right, you have periods from January to October, they're called period 0-9, and then you have XT, which is your actual demand. And if you look at the numbers, you see a slight trend happening in there from around 28-27, we will end up at 36. So there's some level of trend in there. The company wants to use exponential smoothing approach, and as I said, they suspect that there should be a trend. However, they also say that based on their experience, trends don't last forever. So they taper off over time and they become less of a trend as they go. So that's true for a lot of trends. So they just don't continue indefinitely. Every trend will slow down at some point. So the company wants to explicitly model this, and they're giving you their choices for alpha, beta, phi, and omega. So what would be the right model to use here? Given that the company wants to include trend, and they also want to include the tapering off of the trend, what's the best model to use? It's the exponential smoothing with damped trend. So this is an extension of exponential smoothing that includes trend, but also damps trend as we go. The general formula is these are just, I have copied these from Key Concept document. So you have x hat, which is your forecast for the next period. You also have a hat and b hat, which are the estimates for level and trend. Tau is basically showing you how many periods in future, how many next periods in future you want to predict for. Usually in a lot of the problems we solve, tau is one because we just want to predict for the immediate next period. So if you set tau one, your formula gets slightly simpler, and this is basically what we will use to solve our problem. Again, I want to mention that Chris covers this very well in the course. Updating procedure that happens, if you look at a hat and b hat, both of them are being updated as new information comes. So our previous understanding of the level of demand is xt, which is what happened with the demand. What was the actual demand in period t? Then we used alpha parameter for a weight. So this is something, again, a small number. So we want to weight it small. We also have one minus alpha, which is the weight of the new information that we get. And that's the difference between the previous level of demand and then you also add the trend to it. So you have some idea of the previous level of the demand. You include a trend in that formula and you get some idea of where the demand should be now. You also have the new information and you weight those by alpha and one minus alpha. So you get an updated estimate. So this is the general thing that happens in all the exponential smoothing forecasts. You have old information, you have new information, and then your new estimate will be a linear combination of those two. And then the weight you choose is going to determine whether it's calm or nervous. So you should be very, very familiar with this formula by now, particularly also when you use them in GAs. So I'm going to switch to my Excel file and let's do this together. So to save some time, I have already built the Excel file here. We will try to break down the formulas for you as well. The first thing to know is you need to be organized. Especially when you don't have too much time or in general, just to avoid mistakes, be organized. So list all the values of alpha, beta, phi, or omega that you have very nicely. And then also copy and paste the data that you got from the problem. Have separate columns for each of the variables that are important in your calculations. And make sure you approach this systematically. You can get very confused. There's a lot of ways to make errors. And the best way to prevent that is to be extremely organized. So we have A hat and B, which are estimates of our level. We also have damped B, which is the damped trend. So this is something I'm introducing. When we did it in the course, we did all the calculations at once, but now I just try to make it more clear and separate those. We will have a first estimate of trend, then we will also have a damped trend. This is just when you multiply phi by the trend. This is just this term here, phi times B. So then you have the estimate for the next period forecast. Which means you have X hat, but it's using information in period T to forecast the demand in period T1. So basically this 29.22 should be our forecast for February. And you can see the actual value that the actual demand that happened in February is 27. So we have some error here. We predict that it's going to be 29.22, it's now 27. So we have an error of about 2. Let me just highlight it a little bit. So we have an error and an estimate of minus 2.22, which means our actual demand is 2 points lower than forecast. So as I said, the forecast will automatically update itself. So let's go back to the formula. And then we have in here, for instance, that's our formula for updating the level. If you go back to the formula again, you will see that X hat is a function of A hat and B hat. So the first thing to do is compute values of A hat and B hat. And these themselves depend on new and old information that you get from the previous round. So going back to my first column, which is A hat, the level estimate of the level of demand. The formula here is a linear combination of, so I have alpha, which is B1 here. I have C7, which is the realization of demand in this period. Then on the second component, I have 1 minus alpha, 1 minus B1 here again, times an estimate of the level of the demand based on previous information. So what is that? This is D6, which is my previous estimate of the level, which is 28, plus B3, which is phi, my dampening parameter. And also E6, which is my previous estimate of trend. But what is the logic here? If I said in previous month, if I said the level of demand is 28, and then the trend is 1.35, that means that level will also be increased by the trend amount to create my new level of demand. So 28 plus 1.35 is going to be somewhere like 29.3. That's my estimate of future demand, but I also have the 27, that's the real realization. So I have some old information, which I calculated myself based on what I knew in January. And I also have some real realization, which is 27 that I see. So I now update my forecast slightly according to this alpha factor, and create a linear combination of the old and new information, which gets me to 28.66. Remember, we have basically adjusted our estimate of the level, but we haven't tried to match exactly 27, because again, we don't want to react too quickly. The next thing to do is, so we've covered this as well, next thing to do is also update the trend. Again, trend is going to be a linear combination. So this is, again, it has two components separated with this plus sign. The first component starts with B2, which is my beta in here, times D7 minus D6, which is exactly the difference between the two levels that I saw. So the best estimate of the trend is to compare the previous estimate and today's estimate. If previously the demand was 28, now the demand is 28.66. This means that 0.66 is my trend every month, that much is added to my demand. So that's the second piece. And also remember, we want to multiply that, we want to dampen that a little bit too. So again, this is my first, this component is my first estimate, and then I also use 1 minus beta, and then multiply that by F6. What is F6? F6 is the dampened trend. So once I had some idea of the old trend, which is 0.66, I also dampen my previous estimate of the trend, which was 135, and then take the linear combination of the two. This is again exactly following this formula. So if you look at here, this is beta times A hat minus A hat from previous period, plus 1 minus beta times phi times beta hat from previous period. So again, I'm just here, this F6 is basically 135 times phi, which I have calculated here. So the formula here is basically phi times E6, which is phi times B hat. So again, this is also a simple linear combination between the two. Once I have A and B, the difference that you will see in the exponential smoothing with damp trend is whenever you calculate trend, immediately after that you also dampen it. So this was my estimate of 1.16, but I intentionally distort that and multiply that by phi. Again, if you look at the formula, it's just phi times 1.116, which gives us 1.04. I use my best estimate by intentionally multiply that by phi to make it weaker. That will assure me that I don't over forecast for future periods. So now I have an updated estimate for level, let's just call it orange, and I also have a new damp trend. The only thing to do is just add them up and then I'll get the new forecast for the next month. That's again following the formula. So X is just the addition of A and phi times B. And phi times B is the damp trend that we calculated here. So again, that's what we do in this round. If I want to do it for March, again, the same thing happens. You have to use your previous estimate of level and your previous estimate of trend to come up with a new level estimate and then also look at what happened with the actual demand and then the linear combination of those will be your new level. Similar thing will happen with trend. You will have a damped trend predicted in the previous period. You will also have an estimate of the trend by subtracting the previous two levels and then at the end, so let's just use maybe use a red color. So you will have two levels that you subtract. You will also have a previous estimate of the trend, which is your dampened trend. A linear combination of those two will give you new estimate of the trend. Again, the same thing. You will dampen it and then you will add it up to the level estimate so you'll get X. So that's one piece. It's just a mechanical process of following the formula. In my experience, there's a lot of ways you could make mistakes. Make sure you approach this as clean as possible. In the video, Chris does not have a column for damped trend. I just thought it's more clear to add that, but feel free to use either approach that you feel is right.