Chapter 5 Regression

Size: px
Start display at page:

Download "Chapter 5 Regression"

Transcription

1 Chapter 5 Regression Topics to be covered in this chapter: Regression Fitted Line Plots Residual Plots Regression The scatterplot below shows that there is a linear relationship between the percent x of adult sparrowhawks that return to a colony from the previous year and the number y of new adult birds that join the colony. The scatterplot shows that the relationship is moderately strong. The data are given in Exercise 4.4 and EX04-04.MTW Scatterplot of New adults vs Percent returning New adults Percent returning To calculate the least-squares line of the form y = a + bx from data, select Stat Regression Regression from the menu. In the dialog box, enter Percent returning for the Predictor and New adults for the Response and click OK. 51

2 52 Chapter 5 The following output gives the regression equation as y ˆ = 31.9 = 0.304x. Under the Coef column, more accurate values for the intercept and slope are given as and , respectively. Regression Analysis: New adults versus Percent returning The regression equation is New adults = Percent returning Predictor Coef SE Coef T P Constant Percent returning S = R-Sq = 56.0% R-Sq(adj) = 52.0% Analysis of Variance Source DF SS MS F P Regression Residual Error Total The square of the correlation coefficient, r 2, also appears in the output. It is listed as a percentage (R-sq = 56%). Other useful information is provided and will be discussed in Chapter 21. Fitted Line Plots Fitted line plots can be obtained by selecting Stat Regression Fitted line plot from the menu and entering the appropriate predictor and response variable:

3 Regression 53 The fitted line plot shows the regression line plotted on the scatterplot. It also lists the equation for the regression line and the value for R-Sq: Fitted Line Plot New adults = Percent returning S R-Sq 56.0% R-Sq(adj) 52.0% 17.5 New adults Percent returning Sometimes we d like to have a scatterplot with more than one regression line plotted. We can obtain one by selecting Graph Scatterplot from the menu and choosing With Regression and Groups in the dialog box. Another dialog box will appear in which you can select Y and X variables for graphing as well as a categorical variable for graphing.

4 54 Chapter 5 Residuals can be obtained by selecting Stat Regression Regression and then clicking on the Storage button. Check Residuals in the Storage subdialog box and click OK. Residual Plots To obtain a residual plot for regression, select Stat Regression Regression from the menu. Enter Percent returning for the Predictor and New adults for the Response, and click on the Graphs button. In the dialog box, enter Percent returning to obtain a plot of the residuals versus the explanatory variable and click OK.

5 Regression 55 The residual plot that follows helps us assess the fit of a regression line. Since there is no pattern in the plot, the fit appears to be satisfactory. Residuals Versus Percent returning (response is New adults) Residual Percent returning To use Minitab to make predictions based on a regression line, select Stat Regression Regression and click on the Options button. In the dialog box, enter the new value for which you would like to predict the response under Prediction intervals for new observations.

6 56 Chapter 5 For this example, enter 50 and click OK to predict the number of New adults if 50% of the adult sparrowhawks return to a colony. You will obtain the same regression output as shown previously, followed by the predicted values. Predicted Values for New Observations New Obs Fit SE Fit 95% CI 95% PI (14.05, 19.41) (8.23, 25.24) Values of Predictors for New Observations New Percent Obs returning The value given in the column labeled Fit is the value of New adults given by the regression equation when percent returning is equal to 50. EXERCISES 5.3 Table 1.2 in BPS and TA01-02.MTW give the city and highway gas mileages for two-seater cars. A scatterplot (Exercise 4.12) shows a strong positive linear relationship. (a) Select Stat Regression Regression to find the least-squares regression line for predicting highway mileage from city mileage, using data from all 22 car models. Select Stat Regression Fitted Line Plot to make a scatterplot with the regression line. (b) What is the slope of the regression line? Explain in words what the slope says about gas mileage for two-seater cars. (c) Another two-seater is rated at 20 miles per gallon in the city. Predict its highway mileage.