# Minitab Help 6: MLR Assumptions, Estimation & Prediction

### 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 d1 and d2.
• 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.
• 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.