Lecture 8 Regression Analyses
Lecture 8 Regression Analyses
Statistics
Sayeeda Jahan
Spring 2021
Chapter 14
Simple Linear Regression
n Simple Linear Regression Model
n Least Squares Method
n Coefficient of Determination
n Model Assumptions
n Testing for Significance
The Simple Linear Regression Model
min (y i y i ) 2
where:
yi = observed value of the dependent variable
for the ith observation
y^i = estimated value of the dependent variable
for the ith observation
The Least Squares Method
xi y i ( xi y i ) / n
b1 2 2
xi ( xi ) / n
n y-Intercept for the Estimated Regression Equation
_ _
b0 = y - b1x
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
n = total number of observations
Example: Reed Auto Sales
A B C D
1 Week TV Ads Cars Sold
2 1 1 14
3 2 3 24
4 3 2 18
5 4 1 17
6 5 3 27
7
Using Excel to Develop a Scatter Diagram
and Compute the Estimated Regression Equation
30
25
20
Cars Sold
y = 5x + 10
15
10
5
0
0 1 2 3 4
TV Ads
The Coefficient of Determination
n Coefficient of Determination
r2 = SSR/SST
where:
SST = total sum of squares
SSR = sum of squares due to regression
SSE = sum of squares due to error
Example: Reed Auto Sales
n Coefficient of Determination
30
25
20
Cars Sold
y = 5x + 10
15
2
R = 0.8772
10
5
0
0 1 2 3 4
TV Ads
The Correlation Coefficient
rxy (sign of b1 ) r 2
where:
b1 = the slope of the estimated regression
equation yˆ b0 b1 x
Example: Reed Auto Sales
rxy (sign of b1 ) r 2
The sign of b1 in the equation yˆ 10 5x is “+”.
rxy = + .8772
rxy = +.9366
Model Assumptions
n An Estimate of 2
The mean square error (MSE) provides the estimate
of 2, and the notation s2 is also used.
s2 = MSE = SSE/(n-2)
where:
SSE ( yi yˆ i ) 2 ( yi b0 b1 xi ) 2
Testing for Significance
n 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
n Hypotheses
H 0 : 1 = 0
H a : 1 = 0
n Test Statistic
b1
t
sb 1
n Rejection Rule
Reject H0 if t < -t or t > t
where t is based on a t distribution with
n - 2 degrees of freedom.
Example: Reed Auto Sales
n t Test
• Hypotheses H 0 : 1 = 0
H a : 1 = 0
• Rejection Rule
For = .05 and d.f. = 3, t.025 = 3.182
Reject H0 if t > 3.182
• Test Statistics
t = 5/1.08 = 4.63
• Conclusions
Reject H0
Testing for Significance: F Test
n Hypotheses
H 0 : 1 = 0
H a : 1 = 0
n Test Statistic
F = MSR/MSE
n Rejection Rule
Reject H0 if F > F
where F is based on an F distribution with 1 d.f. in
the numerator and n - 2 d.f. in the denominator.
n F Test
• Hypotheses H 0 : 1 = 0
H a : 1 = 0
• Rejection Rule
For = .05 and d.f. = 1, 3: F.05 = 10.13
Reject H0 if F > 10.13.
• Test Statistic
F = MSR/MSE = 100/4.667 = 21.43
• Conclusion
We can reject H0.