Welcome back. This week, we will continue looking at incorporating a qualitative variable into our regression. Last week, we focused on a qualitative variable that could take just two possible values. This week we will focus on a qualitative variable that can take multiple values. Suppose that we are looking at forecasting sales and we have stores in more than two cities, or suppose we are looking at forecasting sales and we have data for every month over several years. In other words, we can treat the month as a qualitative variable that can take 12 possible values. To address a qualitative variable that can have multiple categories, we create a number of dummy variables, where the number of dummy variables needed is equal to the number of categories minus one. Last week, we looked at two cities and we needed just one dummy or binary variable to separate out the two cities. Likewise, if we look at 12 months, we will need just 11 dummy variables to separate our 12 months. In both cases, the number of dummy variables is equal to the number of categories minus one. In fact, if you use 12 dummy variables for 12 months or two dummy variables for two cities and perform your regression, you will notice an error in your regression output. Have a look in the toolbox for this week if you're interested to know about the error that is generated if you choose the incorrect number of dummy variables. Suppose we are trying to forecast our sales data using a regression model, and we draw the time series plot of our sales data with the dependent variable sales on the vertical axis and time on the horizontal axis. Upon plotting the scatter plot of sales, we notice something interesting. What do you see? It looks like the sales data is following a seasonal pattern, that seems to be a regular up-down pattern in the data. This is qualitative information that we would like to include in our regression. There are four quarters in the year, and this is quarterly data so it's not surprising that we have a peak every four quarters and troughs every four quarters. We can use the dummy variable approach to include this qualitative data into our regression. Now, when we have just two categories we use one dummy variable. We have four categories so we'll need three different dummy variables. The number of dummy variables is always the number of categories minus one. When you perform the regression this way, we'll be able to isolate the three regression lines represented by the three dummy variables that we've chosen, and then the fourth regression line will be when all the three dummy variables are equal to zero, and that isolates the fourth regression line. Now, using the three dummy variables we've been able to isolate the four different quarters, the qualitative information in our data. Now, we can do this not only for time series data, we could do this for cross-sectional data as well. Once we are satisfied with our model based on the T-tests, F-test, R-squared, and the standard error, we can use the regression equation for forecasting. We'll end the week by looking at another type of regression model known as an autoregression, which is also useful for business forecasting. As the name implies, autoregression, this is a regression of a variable on itself. Now realistically, this would only work for time series data. We could say, for example, sales in period t is a causal function of sales in the previous period, period t minus one or sales in period t minus two, or even sales in period t minus 12. Our explanatory x values are now the lagged values of the dependent y variable, where we take the lagged values of y to essentially create new x variables. Such a forecasting model may make sense in a sales context, for example. Sales in a particular period they in fact depend on sales in a prior period. As consumers buy a product, they create a fashion. They show it to their friends, which in turn influences sales in a future period. In other words, autoregressions are useful for your business forecasting toolkit. As always, download the relevant Excel workbook and work alongside me as you watch each Excel video. Attempt the quiz for practice and feedback. You also have a practice exercise for this week where you will create your own multiple regression model with several dummy variables, and when you see the model fit so neatly and give you those important forecasts, everyone say, wow. Now, over to Excel.