Cor Regression
Cor Regression
Cor Regression
y y
x x
y y
x x
Scatter Plot Examples
(continued)
Strong relationships Weak relationships
y y
x x
y y
x x
Scatter Plot Examples
(continued)
No relationship
x
Correlation Coefficient
(continued)
y y y
x x x
r = -1 r = -.6 r=0
y y
x x
r = +.3 r = +1
Calculating the Correlation Coefficient
Sample correlation coefficient:
r
( x x )( y y )
[ ( x x ) ][ ( y y ) ]
2 2
Tree n xy x y
Height, r
y 70 [n( x 2 ) ( x)2 ][n( y 2 ) ( y)2 ]
60
8(3142) (73)(321)
50
40
[8(713) (73)2 ][8(14111) (321) 2 ]
30
0.886
20
10
0
r = 0.886 → relatively strong positive
0 2 4 6 8 10 12 14
linear association between x and y
Trunk Diameter, x
Introduction to Regression Analysis
• Regression analysis is used to:
– Predict the value of a dependent variable based on the value of
at least one independent variable
– Explain the impact of changes in an independent variable on
the dependent variable
Dependent variable: the variable we wish to explain
Independent variable: the variable used to explain the dependent
variable
Simple Linear Regression Model
y β 0 β1x
Variable
y y β0 β1x ε
Observed Value
of y for xi
εi Slope = β1
Predicted Value Random Error
of y for xi
for this x value
Intercept = β0
xi x
Estimated Regression Model
ŷ i b0 b1x variable
e 2
(y ŷ) 2
(y (b 0 b1x)) 2
The Least Squares Equation
b1
( x x )( y y )
(x x) 2
b0 y b1 x
b0
y b x
1
n n
2865 17150
b0 0.10977 *
10 10
b0 98.24833
ANOVA Significance
Df SS MS F F
18934.934 11.084
Regression 1 18934.9348 8 8 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Coefficien P- Upper
ts Standard Error t Stat value Lower 95% 95%
0.1289 232.0738
Intercept 98.24833 58.03348 1.69296 2 -35.57720 6
0.0103
Square Feet 0.10977 0.03297 3.32938 9 0.03374 0.18580
Graphical Presentation
• House price model: scatter plot and
regression line
450
400
House Price ($1000s)
350
Slope
300
250
= 0.10977
200
150
100
50
Intercept 0
= 98.248 0 500 1000 1500 2000 2500 3000
Square Feet