Regression

 

The scatterplot based on data set Table 2.1 in BPS(shown below) shows strong linear relationship between the average outside temperature in a month and the average amount of natural gas used per day during the month.

The Regress command will calculate a least-squares line of the form y=a+bt from data. By selecting Stat-->Regression-->Regression from the menu and entering Degree-days for the Predictor and Gas consumption for the Response in the dialog box.


You can get following screen display in session window.


Or by typing this command in session windown, you can get the same result:

MTB>regr c3 1 c2

The first column denotes the y variable, or the variable that we want to predict here (gas consumption). The second column is the predictor (degree-days), or x variable. The "1" between two columns means that only one predictor variable is being used.

Fitted line plots can be obtained by selecting Stat-->Regression-->Fitted line plot from the menu and entering the appropriate predictor and response variable.

Regression Plot is shown below.


 

 


F
itted value and the residuals for the above regression plot can be obtained selecting Stat-->Regression-->Regression, click on the Storage button and select Fits and Residuals.

Then fits and residuals would be displayed in your worksheet as shown below. Of course, you would see the same "Regression Analysis" screen display in session window as shown above at the same time.


After that, a residual scatter plot can be obtained by plotting the residuals vs degree-days by selecting Graph-->Plot from the menu.


If a predict is wanted, we can go to Stat-->Regression-->Regression menu, select Optiones button on the dialog to specify predicted values. Suppose that we would like to know the Gas consumption at Degree-days 20, type 20 in "Prediction intervals for new observations" box, then click OK. Screen display in session window would shown as below.


(same regression output as above)





Back to index