Lecture10 - SIMPLE LINEAR REGRESSION
Lecture10 - SIMPLE LINEAR REGRESSION
LECTURE 10
SIMPLE LINEAR REGRESSION
10 - 1
Outline
10 - 2
10 - 3
Simple Linear Regression
10 - 4
Y = 0 + 1X +
where:
0 and 1 are called parameters of the model,
is a random variable called the error term.
10 - 5
10 - 6
Simple Linear Regression
Equation
The simple linear regression equation is:
E(Y) = 0 + 1X
• Graph of the regression equation is a straight line.
• 0 is the y intercept of the regression line.
• 1 is the slope of the regression line.
• E(y) is the expected value of y for a given x value.
10 - 7
E(y)
Regression line
Intercept Slope 1
0 is positive
10 - 8
E(y)
Intercept
0 Regression line
Slope 1
is negative
x
10 - 9
Simple Linear Regression
Equation
No Relationship
E(y)
10 - 10
10 - 11
Estimation Process
Estimated
b0 and b1 Regression Equation
provide estimates of
0 and 1 Sample Statistics
b0, b1
10 - 12
Least Squares Method
Least Squares Criterion
where:
yi = observed value of the dependent variable
for the ith observation
y^i = estimated value of the dependent variable
for the ith observation
10 - 13
where:
xi = value of independent variable for ith
observation
yi = value of dependent variable for ith
_ observation
x = mean value for independent variable
_
y = mean value for dependent variable
10 - 14
10 - 15
Simple Linear Regression
10 - 16
Number of Number of
TV Ads (x) Cars Sold (y)
1 14 Note that in
3 24 practice, the
2 18 sample size
1 17 should be
3 27 larger than this.
Sx = 10 Sy = 100
10 - 17
Scatterplot
10 - 18
Estimated Regression
Equation
Slope for the Estimated Regression Equation
10 - 19
Coefficient of Determination
Relationship Among SST, SSR, SSE
SST = SSR + SSE
where:
SST = total sum of squares
SSR = sum of squares due to regression
SSE = sum of squares due to error
10 - 20
Coefficient of Determination
R2 = SSR/SST
where:
SSR = sum of squares due to regression
SST = total sum of squares
10 - 21
Coefficient of Determination
10 - 22
Sample Correlation
Coefficient
where:
b1 = the slope of the estimated regression
equation
10 - 23
Sample Correlation
Coefficient
rxy = +.9366
10 - 24
Assumptions About the Error
Term
1. The error is a random variable with mean of zero.
10 - 25
10 - 26
10 - 27
Testing for Significance
An Estimate of s
• To estimate s we take the square root of s2.
• The resulting s is called the standard error of
the estimate.
10 - 28
where
Test Statistic
10 - 29
where:
ta is based on a t distribution
with n - 2 degrees of freedom
10 - 30
Testing for Significance:
t Test
1. Determine the hypotheses.
10 - 31
10 - 33
Reading R Outputs
Required for Exam
Call:
lm(formula = CarsSold ~ TVAds, data = reed)
Residuals:
1 2 3 4 5
-1 -1 -2 2 2
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 10.000 2.366 4.226 0.0242 *
TVAds 5.000 1.080 4.629 0.0190 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.16 on 3 degrees of freedom
Multiple R-squared: 0.8772, Adjusted R-squared: 0.8363
F-statistic: 21.43 on 1 and 3 DF, p-value: 0.01899
10 - 34
10 - 35
10 - 36
Conclusion
Simple Linear Regression Model
Least Squares Method
Coefficient of Determination
Model Assumptions
Testing for Significance
10 - 37