Chapter 7 Regression Analysis
Chapter 7 Regression Analysis
Chapter 11
Y = β0 + β1X
Cov(x, y) s y
b1 2
r b0 y b1x
sx sx
Copyright © 2013 Pearson Education Ch. 11-5
Introduction to
Regression Analysis
y i β0 β1x i ε i
y i β0 β1x i ε i
Linear component Random Error
component
Y Yi β0 β1Xi ε i
Observed Value
of Y for xi
εi Slope = β1
Predicted Value Random Error
of Y for xi
for this Xi value
Intercept = β0
xi X
Copyright © 2013 Pearson Education Ch. 11-10
Simple Linear Regression
Equation
The simple linear regression equation provides an
estimate of the population regression line
Estimated Estimate of Estimate of the
(or predicted) the regression regression slope
y value for intercept
observation i
Value of x for
yˆ i b0 b1x i observation i
ei ( y i - yˆ i ) y i - (b0 b1x i )
min (y i yˆ i )2
(x x)(y y)
i1
i i
Cov(x, y) sy
b1 n
2
r
2 sx sx
i
(x
i1
x)
b 0 y b1x
350
300
250
200
150
100
50
0
0 500 1000 1500 2000 2500 3000
Square Feet
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
350 Slope
300
250
= 0.10977
200
150
100
50
Intercept 0
= 98.248 0 500 1000 1500 2000 2500 3000
Square Feet
xi X
Copyright © 2013 Pearson Education Ch. 11-25
Coefficient of Determination, R2
The coefficient of determination is the portion
of the total variation in the dependent variable
that is explained by variation in the
independent variable
The coefficient of determination is also called
R-squared and is denoted as R2
SSR regression sum of squares
2
R
SST total sum of squares
2
note:
0 R 1
Copyright © 2013 Pearson Education Ch. 11-26
Examples of Approximate
r2 Values
Y
r2 = 1
X
r2 =1
Copyright © 2013 Pearson Education Ch. 11-27
Examples of Approximate
r2 Values
Y
0 < r2 < 1
X
Copyright © 2013 Pearson Education Ch. 11-28
Examples of Approximate
r2 Values
r2 = 0
Y
No linear relationship
between X and Y:
98.25 0.1098(2000)
317.85
The predicted price for a house with 2000
square feet is 317.85($1,000s) = $317,850
Copyright © 2013 Pearson Education Ch. 11-32
Relevant Data Range
When using a regression model for prediction,
only predict within the relevant range of data
450
400
House Price ($1000s)
350
300
250
200
150 Risky to try to
100
extrapolate far
50
0
beyond the range
0 500 1000 1500 2000 2500 3000 of observed x
Square Feet values
Copyright © 2013 Pearson Education Ch. 11-33