So let's look at the mathematical form of the multiple linear regression model. As simple linear regression model are predicted value Y. So this is the predicted value. It is a function of the known observed X values, and multiply the coefficients within her set term. The key is how do we choose the, the coefficients and the, and the coefficients B1, B2, B3, and BK. And as well as the intercept. We can use the same idea of ordinary least squares. The idea is if we choose B's, so that sum of squared residuals, to be reminded that sum of square residual is the difference between the actual Y values and the predicted Y values, and we square them, and we sum them? So we try to choose B, B value such that this sum of squared residual is the smallest. So that's what we mean by fitting multiple linear regression model. It's the same idea, except that now they predicted Y is a function of multiple independent variables. As before, we also have models fit statistics that we can use to inform us whether your multiple linear regression model is a good fit for the data. So the first model fit statistic is R Square. As before, R square captured the proportion of total variation Y. Explained by the estimated regression model. And keep in mind that total variation means that the difference between actual value Y and the population mean of the Y. Unfortunately, this R square always increase as a more independent variable. So if you're using R squares, the indicator for whether you should add a model, the answer would likely to be, you should always add one more variables, but that's not a good practice. Because we know that even if you add a totally irrelevant independent variable, it can still increase R square. That's why adjusted R square is very important in the case of multiple linear regression. So adjust R square. The difference is that, adjusted R square take into account a number of variables included in the model. The more variables you include, and it has a negative penalty for including many variables. So as a result, adjusted R square may decrease when you add more independent variables. So this can better tell you whether you should stop adding a particular variable, If it doesn't contribute to a higher adjusted R square. So let's look at an example. So in this example, I plotted R square and adjusted R square is the number of variable including the model. So in this case, I have 12 variables. But at first I include most promising variable, then I add one, then I add another variable, then I add another variable. so each time a variable record was R square and adjusted R square. As expected, seed R Square outer model, just keep increasing. Sometimes faster, other times slower, but they always increases as we add more variables. On the other hand, the adjusted R square, if you look closely, start to decline here. So here correspond to 7 variables, so it keeps increasing, increasing, until hits seven. When I add one more variable, number 8 variable start declining slowly. So if you were to choose, decide what not to include, I would say, the 7 variable model seems to be optimal, and is inferred by adjusted R square. Having talked about the model fit for multiple linear regression, what about using it for predictions? So this is a very similar to simple linear regression, so once you got your model coefficients estimated, then we can plug in new X value into the fitted model to obtain estimated outcomes. Now, here keep in mind, that your new X values would be of vector because you have multiple X's. Let's look at this example. Suppose after fitting a model, you find the intercept is 1. The coefficients for, 1st X, 2nd X, and 3rd X are two, three and four, respectively. And now you have a new X value that you like to make a prediction for, and the new X values are 1, 2, and 3. So you in order to make a prediction, you just need to plug in an X values into your estimate model. So I will do 1 + 2 times new X, 3 times the new X, 2, 4 times the new X3, and that give you a prediction 21. So that would be your prediction. So this gives you a quick overview of what is multiple linear regression, how to fit multiple linear regression model, and how to use it for prediction. In the next lesson, we're going to talk about how you can use these insights and implement in a spreadsheet for actual model fitting and prediction.