Lesson-11-Simple-Linear-Regression-and-Correlation
Lesson-11-Simple-Linear-Regression-and-Correlation
i 1 i 1
ˆo ˆ1
2 ( yi ˆo ˆ1 xi ) 0
o i 1
L n
ˆ ˆ
2 ( yi ˆo ˆ1 xi )xi 0
1 o 1
i 1
Least Squares Method-Cont.
• Simplifying n n
nˆo ˆ1 xi yi
i 1 i 1
n n n
o i
ˆ 1 i yi xi
x ˆ
x
2
i 1 i 1 i 1
• Results are
ˆo y ˆ1 x
n n
n ( yi )( xi )
y x i i
i 1
n
i 1
ˆ1 i 1
n
n ( xi ) 2
x
i 1
i
2
i 1
n
n n
( xi )( yi )
S xy yi ( xi x ) xi yi
2 i 1 i 1
i 1 i 1 n
• Denominator
n
n n
( xi ) 2
S xx (xi x ) 2 xi
2 i 1
i 1 i 1 n
Residual Error
• Describes the error in the fit of the
model to the ith observation yi
• Each pair of observations satisfies
yi ˆo ˆ1 xi ei
• Denoted by ei
ei yi yˆ i
Estimating 2
• Another unknown parameter,2, the variance of the
error term
• Residuals ei are used to obtain an estimate of 2
• Sum of squares of the residuals, often called the
error sum of squares n n
SS E SS E ei ( yi yˆ i )2
2
ˆ
2
n2 i 1 i 1
i 1
Example
• Regression methods were used to analyze the data from
a study investigating the relationship between roadway
surface temperature (x) and pavement deflection ( y).
• Summary quantities were as follows
n n
( xi ) 2
S xx ( xi x ) 2 xi
2 i 1
i 1 i 1 n
S xx 143215.8 14782
20 33991.6
• Hence, the slope and intercept
ˆ S xy 141.445
1 0.0041612
S xx 33991.6
ˆ 12.75 (0.0041612)( 1478 ) 0.3299892
0 20 20
• Regression line
y0 0 1 x1
yˆ 0.3299892 0.0041612 x
Solution-Cont.
• Graph of the regression line
0.8
0.7
0.6
0.5
y 0.4
0.3
0.2
0.1
0
-50 0 50 100 150
x
Solution-Cont.
• Pavement deflection
yˆ 0.3299892 0.0041612(85) 0.6836
• Mean pavement deflection
yˆ 0.3299892 0.0041612(90) 0.7045
• Change in mean pavement deflection
ˆ1 0.00416
Properties of the Least Estimators
• Assumed that the error term in the model is a
random variable
• Estimators will be viewed as random variables
• Properties of the slope
2 1 x 2
E ( ˆo ) o ˆ
V ( o )
n S xx
2
E ( ˆ1 ) 1 V ( ˆ1 )
S xx
Analysis of Variance Approach
• Used to test for significance of regression
• Partitions the total variability in the response
variable into two components
n n n
( y
i 1
i y ) ( yˆ i y ) ( yi yˆ i )2
2
i 1
2
i 1
3) H : 0
1 1
4) = 0.05
5) The test statistic is
MS R SS R / 1
f0
MS E SS E /(n 2)
( x x ) 2
( x x ) 2
ˆ y x t / 2,n 2 n
ˆ 2 1 o
y xo y xo t / 2,n 2 n
ˆ ˆ ˆ 2 1 o
o
S xx S xx
1 ( xo x )2 1 ( xo x ) 2
yˆ o t / 2,n 2 ˆ 1
2
Yo yˆ o t / 2,n 2 ˆ 1
2
n S xx n S xx
• Critical value
t/2,n-2 = t0.005,18 = 2.878
• Hence
0.0041612 (2.878)(0.000484)
0.0027682 1 0.0055542
2
ˆ Y | x t.005,18 ˆ 2 ( 1n ( x S x ) )
0
0
xx
2
73.9 )
0.683689 (2.878) 0.00796( 201 (8533991 .6 )
0.683689 0.0594607
0.6242283 ˆ Y | x0 0.7431497
R n2
To
1 R2
• Follows the t distribution with n-2 degrees of
freedom
• Reject the null hypothesis if
to t ,n 2
Next Agenda
• Chapters 13 deals with designing and
conducting engineering experiments
• ANOVA in designing single factor
experiments will be emphasized