Simple Linear Aggression
Simple Linear Aggression
Statistics, 3e
by
Williams, Sweeney, and Anderson
Slides by
JOHN
LOUCKS
St. Edward’s
University
y = b0 + b1x +e
where:
b0 and b1 are called parameters of the model,
e is a random variable called the error term.
E(y) = 0 + 1x
E(y)
Regression line
Intercept Slope b1
b0
is positive
E(y)
Intercept
b0 Regression line
Slope b1
is negative
No Relationship
E(y)
ŷ b0 b1 x
Estimated
b0 and b1 Regression Equation
provide estimates of ŷ b0 b1 x
b0 and b1 Sample Statistics
b0, b1
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
b1 ( x x )( y y )
i i
(x x )
i
2
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
b0 y b1 x
Number of Number of
TV Ads (x) Cars Sold (y)
1 14
3 24
2 18
1 17
3 27
Sx = 10 Sy = 100
x2 y 20
b1 ( x i x )( y i y ) 20
5
(xi x ) 2
4
y-Intercept for the Estimated Regression Equation
b0 y b1 x 20 5(2) 10
Estimated Regression Equation
yˆ 10 5x
continue
25
20
Cars Sold
y = 5x + 10
15
10
5
0
0 1 2 3 4
TV Ads
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
r2 = SSR/SST
where:
SSR = sum of squares due to regression
SST = total sum of squares
25
20
Cars Sold
y = 5x + 10
15 2
R = 0.8772
10
5
0
0 1 2 3 4
TV Ads
where:
b1 = the slope of the estimated regression
equation ˆ
y b
0b
x
1
rxy (sign of b1 ) r 2
yˆ
The sign of b1 in the equation
1
0 5
isx“+”.
rxy = + .8772
rxy = +.9366
An Estimate of s 2
The mean square error (MSE) provides the estimate
of s 2, and the notation s2 is also used.
s 2 = MSE = SSE/(n - 2)
where:
SSE ( yi yˆ i ) 2 ( yi b0 b1 xi ) 2
An Estimate of s
• To estimate s we take the square root of s 2.
• The resulting s is called the standard error of
the estimate.
SSE
s MSE
n2
Hypotheses
H0 : 1 0
H a : 1 0
Test Statistic
b1 s
t where sb1
sb1 2
( xi x )
Rejection Rule
where:
t is based on a t distribution
with n - 2 degrees of freedom
b1
3. Select the test statistic. t
sb1
Rejection Rule
Reject H0 if 0 is not included in
the confidence interval for 1.
95% Confidence Interval for 1
b
1t/2s
b1
= 5 +/- 3.182(1.08) = 5 +/- 3.44
or 1.56 to 8.44
Conclusion
0 is not included in the confidence interval.
Reject H0
Hypotheses
H0 : 1 0
Ha : 1 0
Test Statistic
F = MSR/MSE
Rejection Rule
Reject H0 if
p-value < a
or F > F
where:
F is based on an F distribution with
1 degree of freedom in the numerator and
n - 2 degrees of freedom in the denominator