Doe Rls Teoría
Doe Rls Teoría
Doe Rls Teoría
S
2 ( yi ˆ0 ˆ1 xi )xi 0
1 ˆ0 , ˆ1 i
Linear Regression Analysis 5E 16
Montgomery, Peck & Vining
2.2 Least-Squares Estimation of
the Parameters
• Simplifying yields the least squares normal
equations: n n
nˆ0 ˆ1 xi yi
i 1 i 1
n n n
ˆ0 xi ˆ1 xi2 yi xi
i 1 i 1 i 1
i 1 n
Linear Regression Analysis 5E 18
Montgomery, Peck & Vining
2.2 Least-Squares Estimation of
the Parameters
• The fitted simple linear regression model:
ŷ ˆ 0 ˆ 1x
• Sum of Squares Notation:
2
x
n
i
n
Sxx x i
2 i 1 x i x
n 2
i 1 n i 1
n
y
n
x
i i
n
Sxy y i x i i 1 i 1 y i x i x
n
i 1 n i 1
Linear Regression Analysis 5E 19
Montgomery, Peck & Vining
2.2 Least-Squares Estimation of
the Parameters
• Then
n
n
y i x i
n
i 1 i 1
i iy x S
ˆ i 1 n
xy
1 2
n
Sxx
xi
n
i 1
xi
2
i 1 n
• Residuals: ei y i ŷ i
E ˆ1 1
E ˆ0 0
• The variances are
2
2
1 x
Var ˆ1 ˆ
Var 0
2
S xx n S xx
i 1 i 1
n n
2. y i ŷ i
i 1 i 1
i 1 i 1
n
y ny ˆ1S xy
2
i
1i 14 2 43
SST yi y
2
SS ˆ ST 1 xy
• Unbiased estimator of 2
SS Re s
ˆ
2
MSRe s
n2
Then:
– Any violation of the assumptions on the
model errors could damage the usefulness of
this estimate
– A misspecification of the model can damage
the usefulness of this estimate
– This estimate is model dependent
ˆ0 00
t0
• Test statistic: se ˆ0
• Reject H0 if |t0| > t / 2, n 2
• Can also use the P-value approach
H0: 1 = 0 H1: 1 0
• This tests the significance of regression; that
is, is there a linear relationship between the
response and the regressor.
• Failing to reject 1 = 0, implies that there is
no linear relationship between y and x
t 02 F0
So for testing significance of regression, the
t-test and the ANOVA procedure are
equivalent (only true in simple linear
regression)
ˆ1 t / 2 , n 2 se ˆ1 1 ˆ1 t / 2 , n 2 se ˆ1
• 100(1-)% Confidence interval for the
Intercept
ˆ 0 t / 2 , n 2 se ˆ 0 0 ˆ 0 t / 2 , n 2 se ˆ 0
( n 2 ) MS 2 ( n 2 ) MS
RES
RES
2 / 2 , n 2 12 / 2 , n 2
E y | x 0 ˆ y | x0 ˆ 0 ˆ1 x 0
– In order to construct a confidence interval on the mean
response, we need the variance of the point estimator.
• The variance of ˆ y| x0 is
Var ˆ y | x 0 Var ˆ 0 ˆ 1 x 0 Var [ y ˆ 1 ( x 0 x )]
Var ( y ) Var [ˆ 1 ( x 0 x )]
2 2 ( x0 x ) 2 1 ( x x ) 2
2 0
n S xx n S xx
1 ( x0 x ) 2
ˆ y| x0 t / 2,n2 MSRe s E( y | x0 )
n S xx
1 ( x0 x ) 2
ˆ y| x0 t / 2,n2 MSRe s
n S xx
1 ( x0 x ) 2
yˆ 0 t / 2, n 2 MS Re s 1
n S xx
• R2 - coefficient of determination
2 SS R SS Re s
R 1
SST SST
• Proportion of variation explained by the
regressor, x
• For the rocket propellant data
• R2 can be misleading!
– Simply adding more terms to the model will
increase R2
– As the range of the regressor variable increases
(decreases), R2 generally increases (decreases).
– R2 does not indicate the appropriateness of a
linear model
• Extrapolating
• Extreme points will often influence the slope.
• Outliers can disturb the least-squares fit
• Linear relationship does not imply cause-effect
relationship (interesting mental defective example in
the book pg 40)
• Sometimes, the value of the regressor variable is
unknown and itself be estimated or predicted.