You are on page 1of 3

Minitab Codes for Handouts 1 and 2

A. Scatterplot of weight-mileage data (Figure 1 in the Notes)

1. Save weight-mileage data in some folder.


2. Open Minitab.
3. Click file -- open worksheet -- double click on data file. It should be imported in Minitab
worksheet.
4. Click graph scatterplot simple OK.
5. Input weight in X-variables and mileage in Y-variables, click OK to get the
scatterplot.

B. Correlation
1. Click stat basic statistics correlation
2. Input weight and mileage in the variables box, click ok to get the correlation.

C. Regression Line Equation and Analysis


1. Click stat regression regression.
2. Input weight in predictors box and mileage in response box, click ok.
You should also get the coefficient of determination (R2) and ANOVA table along with a list
of unusual values.

D. Regression Line on Scatterplot

1. Click graph scatterplot with regression OK.


2. Input weight in X-variables and mileage in Y-variables, click OK to get the
scatterplot.

E. Obtaining Residuals
Proceed as in C. Then click storage-check residuals under diagnostic measures, click OK.
F. Confidence interval for the mean

Click Stat Regression Regression


Input weight and mileage in the predictors and response boxes respectively.
Click Options type 4612 in Prediction intervals for new observations box
Put 95 for Confidence level and check confidence limits
Click OK. You should get the 95% confidence interval of E(Y) for x=4612 in the third
column of Predicted values for new observations table.

G. Prediction interval for a new observation

Click Stat Regression Regression


Input weight and mileage in the predictors and response boxes respectively.
Click Options type 4232 in Prediction intervals for new observations box
Put 95 for Confidence level and check prediction limits
Click OK. You should get the 95% prediction interval of Ynew for Xnew=4232 in the last
column of Predicted values for new observations table.

Note : For both the above intervals, the Minitab results are slightly different from what we calculated
in class. This is because Minitab uses 45.645 and -.005222 as the estimates of intercept and slope.

H. Getting the residuals, standardized residuals etc for the weight mileage data

Click Stat Regression Regression


Input weight and mileage in the predictors and response boxes respectively.
Click Storage check the respective items in the Diagnostic measures list.
Click OK. New columns will be created in the Data file for each of these measures.

I. Residual/St. residual plot for weight mileage data

Click Stat Regression Regression


Input weight and mileage in the predictors and response boxes respectively.
Click Graphs Check Standardized in Residuals for plots. For residual plots, check the
first three items and put weight in residuals vs the variables box.
Click OK.
For Box-plot, click on Graphs Box-plot Simple put SRES in Graph variables.
Click OK.

J. Outlier Measures
For Cooks distance/ dffits/ leverage, proceed as above, but check these options.

Please note that Cooks distance > 1 suggests outlier


Dffits > 2 k / n where k is the no. of parameters in the model, (i.e. k = p+1,)
suggests outlier.
Leverage> 6/n suggests outlier, as we already know.

You might also like