12.11 Multiple Linear Regression
A multiple linear regression line describes how two or more predictor variables affect the response variable . An equation of a line relating independent variables to is of the form for the population as: , where are the slopes, is the -intercept and is called the error term.
We use sample data to estimate this equation using the predicted value of as with the regression equation (also called the line of best fit or least squares regression line) as:
where are the slopes, and is the -intercept
For example, if we had two independent variables, we would have a 3-dimensional space as in Figure 12-25 where the red dots represent the sample data points and the equation would be a plane in the space represented by .

The calculations use matrix algebra, which is not a prerequisite for this course. We will instead rely on a computer to calculate the multiple regression model.
If all the population slopes were equal to zero, the model would not be significant and should not be used for prediction. If one or more of the population slopes are not equal to zero then the model will be significant, meaning there is a significant relationship between the independent variables and the dependent variable and we may want to use this model for prediction. There are other statistics to look at to decide if this would be the best model to use. Those methods are discussed in more advanced courses.
The hypotheses will always have an equal sign in the null hypotheses.
The hypotheses are:
At least one slope is not zero.
Note that the alternative hypothesis is not written as . This is because we just want one or more of the independent variables to be significantly different from zero, not necessarily all the slopes unequal to zero.
Use the F-distribution with degrees of freedom for regression = , where = the number of independent variables (predictors), and degrees of freedom for error = , where is the number of pairs. This is always a right-tailed ANOVA test, since we are testing if the variation in the regression model is larger than the variation in the error.
The test statistic and p-value are the last two values on the right in the ANOVA table. The p-value rule is easiest to use since the p-value is part of the outcome, but a critical value can be found using the invF program on your calculator or in Excel using =F.INV.RT() We can also single out one independent variable at a time and use a t-test to see if the variable is significant by itself in predicting .
This would have hypotheses:
where is a placeholder for whichever independent variable is being tested.
This t-test is found in the same row as the coefficient that you are testing.
Assumptions for Multiple Linear Regression
When doing multiple regression, the following assumptions need to be met:
- The residuals of the model are approximately normally distributed.
- The residuals of the model are independent (not autocorrelated) and have a constant variance (homoscedasticity).
- There is a liner relationship between the dependent variable and each independent variable.
- Independent variables are uncorrelated with each other (no multicollinearity).
The following is a schematic for the regression output for Microsoft Excel. Other software usually has a similar output but may have numbers in slightly different places. The blue spaces have the descriptions of the corresponding numbers.

The coefficients column gives the numeric values to find the regression equation . The p-values for should be investigated to see if the variable is statistically significant. One should also be careful that the independent variables are not significantly correlated amongst themselves. Correlated independent variables may give unexpected outcomes in the overall regression model and actually flip the sign on a coefficient.
Adjusted Coefficient of Determination
When we add more predictor variables into the model, this inflates the coefficient of variation, . In multiple regression, we adjust for this inflation using the following formula for adjusted coefficient of variation.
Adjusted Coefficient of Determination
There are more types of regression models and more that should be done for a complete regression analysis. Ideally, you would find several models and pick the one with no outliers, the smallest standard error of estimate, a good residual plot, and the highest adjusted and check the assumptions behind each model before using for prediction. More advanced techniques are discussed in a regression course.
“Well, I was in fact, I was moving backwards in time. Hmmm. Well, I think we've sorted all that out now. If you'd like to know, I can tell you that in your universe you move freely in three dimensions that you call space. You move in a straight line in a fourth, which you call time, and stay rooted to one place in a fifth, which is the first fundamental of probability. After that it gets a bit complicated, and there's all sorts of stuff going on in dimensions 13 to 22 that you really wouldn't want to know about. All you really need to know for the moment is that the universe is a lot more complicated than you might think…”
(Adams, 2002)
Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University), hosted on LibreTexts (stats.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.