2024-Lecture 11
2024-Lecture 11
LECTURE 11
SIMPLE LINEAR REGRESSION
Y = b0 + b1X +e
where:
b0 and b1 are called parameters of the model,
e is a random variable called the error term.
ASSUMPTIONS ABOUT THE ERROR
TERM
E(Y) = b0 + b1X
• Graph of the regression equation is a straight line.
• b0 is the y intercept of the regression line.
• b1 is the slope of the regression line.
• E(y) is the expected value of y for a given x value.
Simple Linear Regression
Equation
Positive Linear Relationship
E(y)
Regression line
Intercept Slope b1
b0 is positive
x
Simple Linear Regression
Equation
Negative Linear Relationship
E(y)
x
Estimated Simple Linear
Regression Equation
The estimated simple linear regression equation
Regression Model
Sample Data:
y = b0 + b1x +e x y
Regression Equation x1 y1
E(y) = b0 + b1x . .
Unknown Parameters . .
b0, b1 xn yn
Estimated
b0 and b1 Regression Equation
provide estimates of ŷ b0 b1x
b0 and b1 Sample Statistics
b0, b1
LEAST SQUARES METHOD
where:
yi = observed value of the dependent variable
for the ith observation
y^i = estimated value of the dependent variable
for the ith observation
LEAST SQUARES METHOD
where:
(x x)
i
2
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
Scatterplot
30
Reed Auto Sales Estimated Regression Line
25
20
Cars Sold
y = 5x + 10
15
10
5
0
0 1 2 3 4
TV Ads
ESTIMATED REGRESSION
EQUATION
Slope for the Estimated Regression Equation
i
(y y)2
i
(yˆ y)2
i i
(y ˆ
y )2
where:
SST = total sum of squares
SSR = sum of squares due to regression
SSE = sum of squares due to error
Coefficient of Determination
where:
SSR = sum of squares due to regression
SST = total sum of squares
Coefficient of Determination
where:
b1 = the slope of the estimated regression
equation
SAMPLE CORRELATION
COEFFICIENT
An Estimate of s 2
The mean square error (MSE) provides the estimate
of 2, and the notation s2 is also used.
s 2 = MSE = SSE/(n 2)
where:
SSE (yi y
ˆi )2 (yi b0 b1xi )2
TESTING FOR SIGNIFICANCE
An Estimate of
• To estimate we take the square root of 2.
• The resulting s is called the standard error of
the estimate.
SSE
s MSE
n2
TESTING FOR SIGNIFICANCE
t test
Hypotheses
H0: b1 0
Ha: b1 0
Test Statistic
b1 s
t where sb1
sb1 2
S(xi x)
Testing for Significance:
t Test
Rejection Rule
where:
t is based on a t distribution
with n - 2 degrees of freedom
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
SOME CAUTIONS ABOUT THE
INTERPRETATION OF SIGNIFICANCE TESTS