# Minitab Help 6: MLR Assumptions, Estimation & Prediction

### IQ and physical characteristics (residual plots and normality tests)

- Perform a linear regression analysis of PIQ on Brain and Height.
- Create residual plots and select "Residuals versus fits" (with regular residuals).
- Create residual plots and specify Brain, Height, and Weight in the "Residuals versus the variables" box (with regular residuals).
- Create residual plots and select "Histogram of residuals" (with regular residuals).
- Create residual plots and select "Normal probability plot of residuals" (with regular residuals).
- Regression error normality tests and select:

- Anderson-Darling
- Ryan-Joiner (similar to Shapiro-Wilk)
- Kolmogorov-Smirnov (Lilliefors)

### Toluca refrigerator parts (tests for constant error variance)

- Perform a linear regression analysis of
*WorkHours*on*LotSize*and store the residuals,*RESI*. - Modified Levene (Brown-Forsythe):
- Select Data > Code > To Text, select
*LotSize*for "Code values in the following columns," select "Code ranges of values" for "Method," type "20" for the first lower endpoint, type "70" for the first upper endpoint, type "1" for the first coded value, type "80" for the second lower endpoint, type "120" for the second upper endpoint, type "2" for the second coded value, select "Both endpoints" for "Endpoints to include," and click OK. - Select Stat > Basic Statistics > Store Descriptive Statistics, select
*RESI*for "Variables," select 'Coded LotSize' for "By variables," click "Statistics," select "Median," and click OK. This calculates \(\tilde{e}_1=-19.876\) and \(\tilde{e}_2=-2.684\). - Select Calc >Calculator, type "d" for "Store result in variable," type "abs('RESI'-IF('Coded LotSize'="1",-19.876,-2.684))" for "Expression," and click OK. This calculates
*d*and_{1}*d*._{2} - Select Stat > Basic Statistics > Store Descriptive Statistics, select
*d*for "Variables," select 'Coded LotSize' for "By variables," click "Statistics," select "Mean," and click OK. This calculates \(\bar{d}_1=44.8151\) and \(\bar{d}_2=28.4503\). - Select Calc >Calculator, type "devsq" for "Store result in variable," type "(d-IF('Coded LotSize'="1",44.8151,28.4503))^2" for "Expression," and click OK. This calculates \((d_1-\bar{d}_1)^2\) and \((d_2-\bar{d}_2)^2\).
- Select Stat > Basic Statistics > Store Descriptive Statistics, select
*devsq*for "Variables," select*'*Coded LotSize' for "By variables," click "Statistics," select "Sum," and click OK. This calculates \(\sum{(d_1-\bar{d}_1)^2}=12566.6\) and \(\sum{(d_2-\bar{d}_2)^2}=9610.3\). - We can then calculate \(s_L = \sqrt{(12566.6+9610.3)/23} = 31.05\) and \(L = (44.8151-28.4053)/(31.05\sqrt{(1/13+1/12)}) = 1.316\).
- Select Calc > Probability Distributions > t, type "23" for "Degrees of freedom," select "Input constant," type "1.316," and click OK. This calculates the probability area to the left of 1.316 as 0.89943, which means the p-value for the test is \(2(1-0.89943) = 0.20\), i.e., there is no evidence the errors have nonconstant variance.

- Select Data > Code > To Text, select
- Breusch-Pagan (Cook-Weisberg score):
- Select Calc >Calculator, type "esq" for "Store result in variable," type "'RESI'^2" for "Expression," and click OK. This calculates the squared residuals.
- Fit the model with response
*esq*and predictor*LotSize*. Observe SSR^{*}= 7896142. - We can then calculate \(X^{2*} = (7896142/2) / (54825/25)^2 = 0.821\).
- Select Calc > Probability Distributions > Chi-Square, type "1" for "Degrees of freedom," select "Input constant," type "0.821," and click OK. This calculates the probability area to the left of 0.821 as 0.635112, which means the p-value for the test is \(1-0.635112 = 0.36\), i.e., there is no evidence the errors have nonconstant variance.

### IQ and physical characteristics (confidence and prediction intervals)

- Perform a linear regression analysis of PIQ on Brain and Height.
- Find a confidence interval and a prediction interval for the response.