Here out model is
we interpret as the average effect on of a one unit increase in , holding all other predictors fixed.
Given estimates , we can make predictions using the formula:
- We estimate as the values that minimize the sum of squared residuals,This is done using standard statistical software:
Some import questions
- Is at least one of the predictions useful in predicting the response?
- Do all the predictions help to explain , or is only a subset of the predictions useful?
- How well does the model fit the data?
- Given a set of predictor values, what response value should we predict, and how accurate is our predictions?
One: Is There a Relationship Between the Response and Predictors?
all the cofficients are zero
We test the null hypothesis: versus the alternative: The hypothesis test is performed by computing the F-statistic where, as with simple linear regression, and If the linear model assumptions are correct, on can show that:
- F-statistic is far larger than 1, it provides compelling evidence against the null hypothesis(the large F-statistic suggests that at least one of the advertising media must be related to sales)
- F-statistic had been closer to 1, which depends on the values of n and p.When n is large, an F-statistic that is just a little larger than 1 might still provide evidence against . In contrast, a larger F-statistic is needed to reject if n is small.
a particular subset of q of the cofficients are zero
We test the null hypothesis: Suppose that the residual sum of squares for that model is , then the appropriate F-statistic is: The approach of using an F-statistic to test for any association between the predictors and the response works when p is relatively small, and certainly small compared to n. But if , in this case we cannot event fit the multiple linear regression model using least squares, so the F-statistic cannot be used.
Two: Deciding on Important Variables
The first step in a multiple regression analysis is to compute the F-statistic and to examine the associated p-value. If we conclude on the basis of that p-value that at least one of the predictors is related to the response, then it's natural to wonder which are the guilty ones! There are three classical approaches for this task:
- forward selection: begin with null model-a model that contains an intercept but no predictors.We then fit p simple liner regression and add to the null model that variable that results in the lowest RSS, then add to that model for the new two-variable mode. This approach is continued until some stopping rule is satisfied.
- Backward selection: Start with all variables in the model, and remove the variable with the largest p-value, that is, the variable that is the least statistically significant. The new (p-1)-variable model is fit, and the variable with the largest p-value is removed.This procedure continues until a stopping rule is reached.
- Mixed selection: This is a combination of forward and backward selection. We start with on variables in the model, and as with forward selection, added the variable that provides the best fit, continued to add variables one-by-one.Hence, if at any point the p-value for one of the variables i the model rises above a certain threshold, then we remove that variable from the model.
Backward selection can't be used if , while forward selection can always be used. Forward selection is a greedy approach, and might include variables early that later become redundant. Mixed selection can remedy this.
Three: Model Fit
Two of the most common numerical measures of model fit are the RSE and . is the square of the correlation of the response and the variable. In multiple linear regression, it turns out that it equals , the square of the correlation between the response and the fitted linear model. An value close to 1 indicates that the model explains a large portion of the variance in the response variable.It turns out that will always increase when more variables are added to the model, even if those variables are only weakly associated with the response(adding another variable to the least squares equtions must allow us to fit the training data).
Four: Predictions
Once we have fit the multiple regression model, it's straightforward to apply formula in order to predict the respnose Y on the basis of a set of values for the predictors . There are three sorts of uncertainty associated with this prediction:
- The cofficient estimates are estimates for , that is the least squares plane is only an estimate for the true population regression plane . The inaccuracy in the coefficient estimates is related to the reducible error from Ch2, we can compute a confidence interval in order to determine how close will to be .
- In practice assuming a linear model for is almost always an approximation of reality, so there is an additional source of potentially reducible error which we call model bias.
- Even if we knew --that is, even if we knew the true value for -- the response value can't be predicted perfectly because of the random error in the model, we referred to this as the irreducible error. How much will Y vary from ?
Prediction intervals are always wider than confidence intervals, because they incorporate both the error in the estimate for f(x)(the reducible error) and the uncertainty as to how much an individual point will differ from the population regression plane(the irreducible error).
If we have a normal distribution with mean u and standard deviation , then for a single observation X, So, is a predict interval for X, just as: is a predictive interval for ,and is a confidence interval for