 I'm looking at a plot of my data here of month and sales, which is of course a time series. You can see there's an obvious pattern here going up and down. If I hover over these points, I can see that that's December, that's December, that's December, that's December, that's December. It looks like I've got an annual pattern here, a seasonality, if you will, of the data. And when we're trying to build a regression model, we have to account for that. You can see though from our regression line that there appears also to be a trend in our data. And we may need to account for that as well. In this video, we're just going to look at how to go about handling the seasonality and data. If you recall from our module on regression, we can handle categorical variables and regression through the use of something known as a dummy variable, which we turn a categorical value like November into a quantity one or zero. What we want to do is to create these additional dummy variables, and if you remember we always use k plus one, if we've got a period of 12, in this case a year, we've got 12 months, we need to have only 11 dummy variables. And the way to set this up, the way I like to do it, is to just start building a matrix here. The first variable is November through September. We're not going to do October, since that would be the 12th variable. And for November, we would have a one that shows that yes, that has a value and we want to count it. December would have a zero, because it's not December, and so forth. The rest here would be zeros. For December, November has a zero, December has a one, and so on. And so you can construct this pattern. You can do that pretty quickly, manually, and then once you get the first 12 months, all you've got to do is to copy those and then just paste them down. And so we've transformed our data so that we can run our regression on this transformed data with our 11 dummy variables. Now that we have that, we're going to go to Data, Data Analysis, Regression, click OK, open up our dialog box there. We want our y-range again, which is going to be our sales. And in our x-range, we're going to be our dummy variables. We're not going to include the months in this particular analysis, because we're just trying to get control, a handle on the seasonality. We'll address the trend, which would include the months column later. We've got labels. We want an output range that we can handle. I'm going to go over here and select 01. I'm not going to get residual plots or residuals this time. And I'm just going to click OK. Go over here, expand this so you can see everything a little bit better. Move this over. We have our regression output. We can look up here and we can see our r and our r square of 0.921. And remember when we're doing multiple regression, we use the adjusted r square, which in this case is 0.9036, which is pretty good. We'll check significance there. Always like to convert these so I can make sure they're very clear. That one's good. We'll get the p-value on everything else. We can see they're, whoops, look at that. August is not significant, and June and July are, they are statistically significant if we're using 0.05, but they're getting close. So that tells us that this particular dummy variable may not be all that helpful, but we'll check it out. To get our forecast, it's a little bit tedious. We click on our cell, hit equal, click on our intercept, and because we want to drag this down, we want to hit the function for f4 key to lock that, plus the November coefficient, lock that down, times the November value, plus the December coefficient, lock that down, times December, plus January coefficient, lock that down, times January. And you just continue all the way across until you get the equation for the forecast value for November. You can see I've finished that and copied it down. I'll double click on this December row, and you can see that it picks up all of these dummy variable values and the coefficients and gives me these forecasted values. Next thing I want to do is make a plot of this to get a look at it. I've transferred the data to another worksheet just to simplify it and plotted the forecast versus the actuals, and you can see it in the plot here. The actuals are the blue line, and the forecast is the orange line, and you can see that we're not picking up, we're doing a good job of the seasonality, but we're not picking up this trend. Here, the actual is below the forecast, and on the other end, the actual is above the forecast. So we need to pick up that trend as well to improve this. But you should go ahead and calculate your error metrics, you know how to do that from the other videos, and then we'll show you how to pick up the trend.