Docsity

Class Notes on Regression Analysis | ISYE 6414, Study notes of Systems Engineering

Toggle sidebar
bg1
ISYE 6414 - Spring 2009
Solution lecture 4
The Linear Model: OLS Regression - Diagnostics
Problem 3.1 Pag.146
1. The residuals ei, i = 1,2, ...n are defined as ei=Yi−ˆ
Yi, and the semstudentized residuals are
the standarized residuals by the inverse of the variance of the error term: e∗
i=eip(MSE .
2. E{i}= 0 is one of the assumptions of the model that make that the line β0+β1Xto be the
expectation of the random variable Yas a function of X.Pn
i=1 ei= 0 is a property derived
from the OLS estimation, and is not a consequence of the first statement.
3. The error term () is an unobservable random varaible defined in the model Y=β0+β1X+.
The residual is the observed difference between the Yand the estimated mean of Yusing OLS.
Problem 3.2 Pag.146
1. residual plot when variance decreases with X: figure 1.
Figure 1: Residuals pattern when varaince decreases with X.
2. residual plot when the expectation of Yis a Ushape funtion on X: figure 2.
Problem 3.3 Pag.146
1. BoxPlot for X: figure 3.
2. Dot plot for the residuals: figure 4.
3. Plot residuals vs. estimated means: figure 5.
4. Q-Q plot for normality of the residuals: figure 6.
5. H0:residuals ∼N ormal vs. Ha:residualsarenotN ormal
r= 0.97373. Given that r < 0.987, H0is rejected.
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Class Notes on Regression Analysis | ISYE 6414 and more Study notes Systems Engineering in PDF only on Docsity!

ISYE 6414 - Spring 2009

Solution lecture 4

The Linear Model: OLS Regression - Diagnostics

Problem 3.1 Pag.

  1. The residuals ei, i = 1, 2 , ...n are defined as ei = Yi −

Yi, and the semstudentized residuals are

the standarized residuals by the inverse of the variance of the error term: e

∗

i

e i

(M SE.

2. E{

i

} = 0 is one of the assumptions of the model that make that the line β 0

  • β 1

X to be the

expectation of the random variable Y as a function of X.

n

i=

e i

= 0 is a property derived

from the OLS estimation, and is not a consequence of the first statement.

  1. The error term () is an unobservable random varaible defined in the model Y = β 0
  • β 1

X + .

The residual is the observed difference between the Y and the estimated mean of Y using OLS.

Problem 3.2 Pag.

  1. residual plot when variance decreases with X: figure 1.

Figure 1: Residuals pattern when varaince decreases with X.

  1. residual plot when the expectation of Y is a U shape funtion on X: figure 2.

Problem 3.3 Pag.

  1. BoxPlot for X: figure 3.
  2. Dot plot for the residuals: figure 4.
  3. Plot residuals vs. estimated means: figure 5.
  4. Q-Q plot for normality of the residuals: figure 6.
  5. H 0 : residuals ∼ N ormal vs. Ha : residualsarenotN ormal

r = 0.97373. Given that r < 0 .987, H 0 is rejected.

Figure 2: Residuals pattern when the function is U shape.

Figure 3: Boxplot for X.

Figure 4: Dotplot for residuals.

  1. n 1 = 65,

d 1 = 0.43796. n 2 = 55,

d 2 = 0.50652. s = 0.417275 and:

t

∗

BF

1

65

1

55

t

  1. 995 , 18

= 2.61814. Then, given that |t

∗

BF

| ≤ t

  1. 995 , 18

we conclude that the error variance is

constant.

Problem 3.10 Pag.

  1. Plot residuals vs.

Y

′

i

s: figure 7.

Figure 7: Residuals vs. estimated means.

  1. Four semistudentized residuals are outside the interval ±1. And approx. 30% are expected to

be in this range, that is, the expected number is also 4.

Problem 3.12 Pag.147 SSE(F ) is called pure erro sum of squares due to is calculated takine the

squares of the distences betwwen the points Yi and the estimated real mean, claculated as an average

of iid random variables, and not estimated as the result of a linear function. That is, SSE(F ) always

estimated the error, whitout taking into account if the linear model is correct or not.

Problem 3.16 Pag.

  1. Scatter plot for data: figure 8. The transformation Y

′ = log Y seems to be appropiate in this

case.

  1. Box-Cox transformation

λ -0.2 -0.1 0 0.1 0.

SSE 0.1235 0.0651 0.039 0.044 0.

Then, the log transformation is appropiate.

  1. b 0

= 0.6549 and b 1

  1. Transformated data and fitted line; figure 9. The regression gives a good fit for the transfor-

mated data.

Figure 8: Scatter plot of Solution Concentration data.

Figure 9: Transformated data and fitted line.

Figure 10: residuals vs. estimated means for transformed data.

Figure 13: Scatter plot transformed data 3.17).

Figure 14: residuals vs. estimated means (transformed data 3.17).

Figure 15: Normal Q-Q plot for residuals (transformed data 3.17).

  1. Residuals vs. estimated means: figure 14. Normal q-q plot for residuals: figure 15.

Y = (10.26093 + 1. 07629 X)

2

Problem 3.19 Pag.149 The residuals are correlated with the random variables Y i

, however, they

are not correlated with the estimated means

Y

i

, so, a linear pattern between e and y is normal in

linear models. In order to check the assumptions of the model plotting the residuals, the plot of e

vs

Y

i

is more meaningful.

Problem 3.20 Pag.149 In both cases the new ditribution of the error terms is not going to be

independent N

0 .σ

2

Problem 3.21 Pag.

Yij −

Yij

2

Yij −

Yj

2

∑ ∑ (^

Yj −

Yij

2

Yij −

Yj

Yj −

Yij

But: ∑ ∑ (

Y

ij

Y

j

Y

j

Y

ij

Yij

Yj −

Y

2

j

Yij

Yij +

Yj

Yij = (2)

j

nj

Y

2

j

j

nj

Y

2

j

Yij

Yij +

Yj

Yij (3)

Since

Y

ij

= b 0

  • b 1

Xj ij

= b 0

  • b 1

Xj j

Y

j

does not depend on j, we have:

Yij −

Yj

Yj −

Yij

j

n j

Y

2

j

j

n j

Y

2

j

j

n j

Y

j

Y

j

j

n j

Y

j

Y

j

Problem 3.22 Pag.149 If we fix j, for each i in the model we take the sum:

i

Yij −

Yj

2

= (nj − 1) s

2

j

And:

SSP E =

j

(n j

− 1) s

2

j

Where s

2

j

is the sample variance of the iid random sample Y 1 j , Ysj , ..., Yn j j^

. So, we know that:

(nj − 1) s

2

j

σ

2

∼ χ

2

nj − 1