Chapter 14
Simple Linear Regression
1
Chapter Outline
➢ Simple Linear Regression Model
➢ Least Squares Method
➢ Coefficient of Determination
➢ Model Assumptions
➢ Testing for Significance
2
Simple Linear Regression
▪ Managerial decisions often are based on the
relationship between two or more variables.
▪ Regression analysis can be used to develop an
equation showing how the variables are related.
▪ The variable being predicted is called the
dependent variable and is denoted by y.
▪ The variables being used to predict the value of
the dependent variable are called the independent
variables and are denoted by x.
3
Simple Linear Regression
▪ Simple linear regression involves one
independent variable and one dependent variable.
▪ The relationship between the two variables is
approximated by a straight line (hence, the ‘linear’
regression).
▪ Regression analysis involving two or more
independent variable is called multiple regression
(covered in the next chapter).
4
Simple Linear Regression Model
▪ The equation that describes how y is related to x
and an error term is called the regression model.
▪ The simple linear regression model is:
y = b0 + b1x +e
where:
b0 and b1 are called parameters of the model,
e is a random variable called the error term.
5
Simple Linear Regression Equation
▪ The simple linear regression equation is:
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 value of x.
Please note that both b0 and b1 are population
parameters, depicting the true relationship between y
and x.
6
Simple Linear Regression
➢ Example: Stock Market Risk
The systematic risk (a common risk shared by all
the stocks) of stock market has different impacts on
different stocks. Stocks that are more sensitive to
systematic risk are riskier. We can conduct a regression
analysis to estimate the sensitivity of an individual
stock to the systematic market risk. On the next slide
are shown the data for a sample of 20 most recent
quarterly returns of Netflix and the SPY (an index fund
that keeps track of S&P 500).
7
Simple Linear Regression
➢ Example: Stock Market Risk (data)
Quarter SPY NFLX Quarter SPY NFLX
2009Q1 0.0630 0.2537 2011Q3 -0.0246 -0.6914
2009Q2 0.1366 -0.0302 2011Q4 0.0530 0.4644
2009Q3 0.0531 0.2164 2012Q1 0.0698 -0.3333
2009Q4 0.0426 0.1646 2012Q2 -0.0104 -0.2906
2010Q1 0.1109 0.5888 2012Q3 0.0320 0.3938
2010Q2 -0.0674 0.0369 2012Q4 0.0666 1.0853
2010Q3 0.0803 0.6925 2013Q1 0.0714 0.3076
2010Q4 0.0917 0.2334 2013Q2 0.0621 0.1315
2011Q1 0.0649 0.0868 2013Q3 0.0470 0.3190
2011Q2 -0.0474 0.1432 2013Q4 0.0191 0.2693
8
Simple Linear Regression
➢ Example: Stock Market Risk (Scatter Diagram)
Quarterly Gross Returns of SPY and NETFLIX, Inc.
1.2
0.9
0.6 Trend
Line
0.3
NFLX
0
-0.09 -0.06 -0.03 0 0.03 0.06 0.09 0.12 0.15
-0.3
-0.6
-0.9
SPY
9
Simple Linear Regression
➢ Example: Stock Market Risk
From the scatter diagram, we observe the following:
1. The plots are scattered around, indicating the
relationship between the returns of SPY and Netflix is
not perfect.
2. The trend line has a positive slope, indicating that the
relationship is positive, i.e. as the returns of SPY go up,
the returns of Netflix tend to go up too.
3. The vertical distance between a plot to the trend line is
the difference between the actual return of Netflix and
its estimated value, given an actual return of SPY. The
difference is simply the estimated error, similar to
y – E(y).
10
Simple Linear Regression Equation
➢ Positive Linear Relationship
E(y)
Regression line
Intercept Slope b1
b0 is positive
x
11
Simple Linear Regression Equation
➢ Negative Linear Relationship
E(y)
Intercept
b0 Regression line
Slope b1
is negative
xx
12
Simple Linear Regression Equation
➢ No Relationship
E(y)
Intercept Regression line
b0
Slope b1
is 0
x
13
Estimated Simple Linear Regression Equation
▪ The estimated simple linear regression equation:
ŷ = b0 + b1 x
• The graph is called the estimated regression line.
• b0 is the y intercept of the estimated regression line.
• b1 is the slope of the estimated regression line.
• ŷ is the estimated value of y for a given value of x.
Please note that b0 and b1 are sample estimates of b0 and
b1, respectively, depicting the estimated sample
relationship between y and x.
14
Estimation Process
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 + b1 x
b0 and b1 Sample Statistics
b0, b1
15
Least Squares Method
▪ Least Squares Criterion
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
16
Least Squares Method
▪ Least Squares Criterion
min (y i − y i ) 2
• yi − yˆi is the estimated error for the ith observation;
• Take the square of yi − yˆi means that it is the magnitude
of the error not the sign of it (positive or negative) that
matters;
• The purpose of Least Squares Criterion is to find the b0
and b1 that minimize the sum of the square of estimated
error for all the observations in the sample, i.e. the best-
fit (with the smallest overall error) straight line that
approximates the relationship between y and x.
17
Least Squares Method
▪ Slope for the Estimated Regression Equation
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 = average value of independent variable
_
y = average value of dependent variable
18
Least Squares Method
▪ y-Intercept for the Estimated Regression Equation
b0 = y − b1 x
19
Simple Linear Regression
➢ Example: Stock Market Risk
Quarterly Returns Quarterly Returns
of SPY (x) of Netflix (y)
0.0630 0.2537
0.1366 -0.0302
0.0470 0.3190
0.0191 0.2693
Sx = 0.9143 Sy = 4.0419
x = 0.0457 y = 0.2021
20
Estimated Regression Equation
➢ Slope for the Estimated Regression Equation
(x − x )( y − y ) 0.1407
b1 = i i
= 2.87
(x − x )
2
i
0.0490
➢ y-Intercept for the Estimated Regression Equation
b0 = y − b1x = 0.2021 − 2.87 0.0457 0.07
➢ Estimated Regression Equation
yˆ = 0.07 + 2.87 x
21
Estimated Regression Line – Stock Market
Risk Example
Expected Regression Equation
1.2000
yˆ = 0.07 + 2.87 x
0.9000
0.6000
0.3000
NFLX
0.0000
-0.1000 -0.0500 0.0000 0.0500 0.1000 0.1500
-0.3000
-0.6000
-0.9000
SPY
22
Coefficient of Determination
• Relationship Among SST, SSR, SSE
SST = SSR + SSE
i
( y − y ) 2
= i
( ˆ
y − y ) 2
+ i i
( y − ˆ
y ) 2
where:
SST = total sum of squares (i.e. total variability
of y)
SSR = sum of squares due to regression (i.e. the
variability of y that is explained by regression)
SSE = sum of squares due to error (i.e. the variability
of y that cannot be explained by regression)
23
Coefficient of Determination
The coefficient of determination is:
r2 = SSR/SST
r2 represents the percentage of total variability of y that
is explained by regression.
24
Coefficient of Determination
r2 = SSR/SST = 0.404/2.741 = 0.147
The regression relationship is actually weak. Only
14.7% of the variability in the returns of Netflix can be
explained by the linear relationship between the
market returns (SPY) and the returns of Netflix.
25
Sample Correlation Coefficient
rxy = (sign of b1 ) Coefficient of Determination
rxy = (sign of b1 ) r 2
where:
b1 = the slope of the estimated regression
equation yˆ = b0 + b1 x
26
Sample Correlation Coefficient
rxy = (sign of b1 ) r 2
The sign of b1 in the equation yˆ = 0.07 + 2.87 x is “+”.
rxy = + 0.147
rxy = 0.384
27
Assumptions About the Error Term e
y = b0 + b1x +e
1. The error e is a random variable with mean of zero.
2. The variance of e , denoted by 2, is the same for
all values of the independent variable.
3. The values of e are independent.
4. The error e is a normally distributed random
variable.
28
Test for Significance
b1 determines the relationship
y = b0 + b1x +e between y and x.
To test for a significant regression relationship, we
must conduct a hypothesis test to determine whether
the value of b1 (slop) is zero.
Two tests are commonly used:
t Test and F Test
Both the t test and F test require an estimate of 2,
the variance of e in the regression model.
29
Test for Significance
• An Estimate of 2
The mean square error (MSE) provides the estimate
(the sample variance s2 ) of 2.
s 2 = MSE = SSE/(n − 2)
where:
SSE = (yi − yˆi ) 2 = ( yi − b0 − b1 xi ) 2
30
Test for Significance
➢ An Estimate of
• To estimate we take the square root of s2.
• The resulting s is called the standard error of
the estimate.
SSE
s = MSE =
n−2
31
Test for Significance: t Test
Hypotheses
H0 : b1 = 0
H a : b1 0
Test Statistic
b1 sb1 =
s
t= where
sb1 (x − x )
2
i
32
Test for Significance: t Test
Rejection Rule
Reject H0 if p-value <
or t < -t or t > t
where:
t is based on a t distribution
with n - 2 degrees of freedom
• n is the number of observations in the regression;
• 2 is the number of parameters (b0 & b1) in the regression.
33
Test for Significance: t Test
1. Determine the hypotheses. H0 : b1 = 0
H a : b1 0
2. Specify the level of significance. = .05
b1
3. Calculate the test statistic. t=
sb1
b1 2.87
t= = = 1.76
sb1 1.63
34
Test for Significance: t Test
4. Determine whether to reject H0.
p-Value approach
t = 1.76 provides an area of .0473 in the upper
tail. Hence, the p-value is 2*0.0473 = 0.0946. Since
p-value is larger than 0.05, we will not reject H0.
Critical Value approach
For =5%, the critical value is 2.1 (a two-tailed test).
Since our test statistic t = 1.76, which is less than 2.1,
we will not reject H0.
35
Confidence Interval for b1
◼ We can use a 95% confidence interval for b1 to test
the hypotheses just used in the t test.
◼ H0 is rejected if the hypothesized value of b1 is not
included in the confidence interval for b1.
36
Confidence Interval for b1
• The form of a confidence interval for b1 is:
t/2sb1
is the
b1 t /2 sb1 margin
b1 is the of error
point
where t / 2 is the t value providing an area
estimator
of /2 in the upper tail of a t distribution
with n - 2 degrees of freedom
37
Confidence Interval for b1
▪ Rejection Rule
Reject H0 if 0 is not included in
the confidence interval for b1.
▪ 95% Confidence Interval for b1
b1 t / 2 sb1 = 2.87 ± 2.1(1.63) = 2.87 ± 3.42
or -0.55 to 6.29
▪ Conclusion
0 is included in the confidence interval.
Do Not Reject H0
38
Test for Significance: F Test
Hypotheses
H0 : b1 = 0
H a : b1 0
Test Statistic
F = MSR/MSE
Please note that the hypotheses of the F test are the
same as the ones of the t test, which is always the
case for a Simple Linear Regression (where there is
only one independent variable.)
39
Test for Significance: F Test
Rejection Rule
Reject H0 if
p-value <
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
40
ANOVA Table for A Regression Analysis
Source of Sum of Degrees of Mean p-
Variation Squares Freedom Square F Value
SSTR MSTR
Regression SSR k-1 MSTR =
k - 1 MSE
SSE
Error SSE nT - k MSE =
nT - k
Total SST nT - 1
nt is the number
k is the number of of observations.
parameters in a regression.
41
ANOVA Table for A Regression Analysis
Stock Market Risk Example -
Source of Sum of Degrees of Mean p-
Variation Squares Freedom Square F Value
Regression 0.404 1 0.404 3.11 0.095
Error 2.337 18 0.13
Total 2.741 19
42
Test for Significance: F Test
1. Determine the hypotheses. H0 : b1 = 0
H a : b1 0
2. Specify the level of significance. = .05
3. Calculate the test statistic. F = MSR/MSE
F = MSR/MSE = 0.404/0.13 = 3.11
The relationship between the F value and the
t value is F = t2, which is only true for simple
linear regressions.
43
Test for Significance: F Test
4. Determine whether to reject H0.
p-Value approach
F = 3.11 provides an area of .0946 in the upper
tail. Hence, the p-value is 0.0946. Since
p-value is larger than 0.05, we will not reject H0.
Critical Value approach
For =5%, the critical value is 4.41.
Since our test statistic F = 3.11, which is less than 4.41,
we will not reject H0.
44
Some Cautions about the Interpretation of
Significance Tests
◼ Rejecting H0: b1 = 0 and concluding that the
relationship between x and y is significant does
not enable us to conclude that a cause-and-effect
relationship is present between x and y.
◼ Just because we are able to reject H0: b1 = 0 and
demonstrate statistical significance does not enable
us to conclude that there is a linear relationship
between x and y.
45