Statistics For Business and Economics: Simple Regression
Statistics For Business and Economics: Simple Regression
Statistics For Business and Economics: Simple Regression
Chapter 12
Simple Regression
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-1
Chapter Goals
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-4
Correlation Analysis
The population correlation coefficient is
denoted ρ (the Greek letter rho)
The sample correlation coefficient is
s xy
r
sxsy
where
s xy
(x x)(y i i y)
n 1
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-5
Hypothesis Test for Correlation
r (n 2)
t
(1 r )2
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-6
Decision Rules
Hypothesis Test for Correlation
a a a/2 a/2
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-7
Introduction to
Regression Analysis
Regression analysis is used to:
Predict the value of a dependent variable based on
the value of at least one independent variable
Explain the impact of changes in an independent
variable on the dependent variable
Dependent variable: the variable we wish to explain
(also called the endogenous variable)
Independent variable: the variable used to explain
the dependent variable
(also called the exogenous variable)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-8
Linear Regression Model
Yi β0 β1xi εi
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-9
Simple Linear Regression
Model
The population regression model:
Population Random
Population Independent Error
Slope
Y intercept Variable term
Coefficient
Dependent
Variable
Yi β0 β1Xi ε i
Linear component Random Error
component
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-10
Simple Linear Regression
Model
(continued)
Y Yi β0 β1Xi ε i
Observed Value
of Y for Xi
εi Slope = β1
Predicted Value Random Error
of Y for Xi
for this Xi value
Intercept = β0
Xi X
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-11
Simple Linear Regression
Equation
The simple linear regression equation provides an
estimate of the population regression line
Estimated Estimate of Estimate of the
(or predicted) the regression regression slope
y value for intercept
observation i
Value of x for
yˆ i b0 b1xi observation i
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-12
Least Squares Estimators
min (y i yˆ i )2
min [y i (b 0 b1x i )] 2
(x x)(yi i y)
sY
b1 i1
n
rxy
i
sX
2 x
(x x)
i1
b0 y b1x
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-15
Linear Regression Model
Assumptions
The random error terms, εi, are not correlated with one
another, so that
E[ε iε j ] 0 for all i j
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-16
Interpretation of the
Slope and the Intercept
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-17
Simple Linear Regression
Example
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-18
Sample Data for House Price
Model
House Price in $1000s Square Feet
(Y) (X)
245 1400
312 1600
279 1700
308 1875
199 1100
219 1550
405 2350
324 2450
319 1425
255 1700
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-19
Graphical Presentation
350
300
250
200
150
100
50
0
0 500 1000 1500 2000 2500 3000
Square Feet
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-20
Regression Using Excel
Tools / Data Analysis / Regression
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-21
Excel Output
Regression Statistics
Multiple R 0.76211 The regression equation is:
R Square 0.58082
Adjusted R Square 0.52842 house price 98.24833 0.10977 (square feet)
Standard Error 41.33032
Observations 10
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-22
Graphical Presentation
350 Slope
300
250
= 0.10977
200
150
100
50
Intercept 0
= 98.248 0 500 1000 1500 2000 2500 3000
Square Feet
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-23
Interpretation of the
Intercept, b0
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-24
Interpretation of the
Slope Coefficient, b1
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-25
Measures of Variation
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-27
Measures of Variation
(continued)
Y
yi
2
SSE = (yi - yi ) y
_
SST = (yi - y)2
y _2
_ SSR = (yi - y) _
y y
xi X
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-28
Coefficient of Determination, R2
The coefficient of determination is the portion
of the total variation in the dependent variable
that is explained by variation in the
independent variable
The coefficient of determination is also called
R-squared and is denoted as R2
SSR regression sum of squares
R 2
SST total sum of squares
note: 0 R 1 2
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-29
Examples of Approximate
r2 Values
Y
r2 = 1
X
r2 =1
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-30
Examples of Approximate
r2 Values
Y
0 < r2 < 1
X
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-31
Examples of Approximate
r2 Values
r2 = 0
Y
No linear relationship
between X and Y:
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-32
Excel Output
SSR 18934.9348
Regression Statistics
R 2
0.58082
Multiple R 0.76211 SST 32600.5000
R Square 0.58082
Adjusted R Square 0.52842 58.08% of the variation in
Standard Error 41.33032 house prices is explained by
Observations 10
variation in square feet
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-33
Correlation and R2
R r 2 2
xy
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-34
Estimation of Model
Error Variance
SSE i
e 2
σˆ s
2
2 i1
n2 n2
e
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-35
Excel Output
Regression Statistics
Multiple R 0.76211 se 41.33032
R Square 0.58082
Adjusted R Square 0.52842
Standard Error 41.33032
Observations 10
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-36
Comparing Standard Errors
se is a measure of the variation of observed y
values from the regression line
Y Y
small se X large se X
2 2
s s
s b1
2 e
e
(x i x) (n 1)s x
2 2
where:
s b1 = Estimate of the standard error of the least squares slope
SSE
se = Standard error of the estimate
n2
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-38
Excel Output
Regression Statistics
Multiple R 0.76211
R Square 0.58082
Adjusted R Square 0.52842
Standard Error
Observations
41.33032
10
sb1 0.03297
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-39
Comparing Standard Errors of
the Slope
Sb1 is a measure of the variation in the slope of regression
lines from different possible samples
Y Y
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-40
Inference about the Slope:
t Test
t test for a population slope
Is there a linear relationship between X and Y?
Null and alternative hypotheses
H0: β1 = 0 (no linear relationship)
H1: β1 0 (linear relationship does exist)
Test statistic
b1 β1
where:
t b1 = regression slope
coefficient
sb1 β1 = hypothesized slope
sb1 = standard
d.f. n 2 error of the slope
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-41
Inference about the Slope:
t Test
(continued)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-42
Inferences about the Slope:
t Test Example
b1 s b1
H0: β1 = 0 From Excel output:
H1: β1 0 Coefficients Standard Error t Stat P-value
Intercept 98.24833 58.03348 1.69296 0.12892
Square Feet 0.10977 0.03297 3.32938 0.01039
b1 β1 0.10977 0
t t 3.32938
sb1 0.03297
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-43
Inferences about the Slope:
t Test Example
(continued)
Test Statistic: t = 3.329
b1 s b1 t
H0: β1 = 0 From Excel output:
H1: β1 0 Coefficients Standard Error t Stat P-value
Intercept 98.24833 58.03348 1.69296 0.12892
d.f. = 10-2 = 8 Square Feet 0.10977 0.03297 3.32938 0.01039
t8,.025 = 2.3060
Decision:
a/2=.025 a/2=.025 Reject H0
Conclusion:
Reject H0 Do not reject H0 Reject H0
There is sufficient evidence
-tn-2,α/2 0 tn-2,α/2 that square footage affects
-2.3060 2.3060 3.329 house price
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-44
Inferences about the Slope:
t Test Example
(continued)
P-value = 0.01039
P-value
H0: β1 = 0 From Excel output:
H1: β1 0 Coefficients Standard Error t Stat P-value
Intercept 98.24833 58.03348 1.69296 0.12892
Square Feet 0.10977 0.03297 3.32938 0.01039
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-46
Confidence Interval Estimate
for the Slope
(continued)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-47
F-Test for Significance
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-48
Excel Output
Regression Statistics
Multiple R 0.76211
MSR 18934.9348
R Square 0.58082 F 11.0848
Adjusted R Square 0.52842 MSE 1708.1957
Standard Error 41.33032
Observations 10 With 1 and 8 degrees P-value for
of freedom the F-Test
ANOVA
df SS MS F Significance F
Regression 1 18934.9348 18934.9348 11.0848 0.01039
Residual 8 13665.5652 1708.1957
Total 9 32600.5000
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-49
F-Test for Significance
(continued)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-51
Predictions Using
Regression Analysis
Predict the price for a house
with 2000 square feet:
98.25 0.1098(200 0)
317.85
The predicted price for a house with 2000
square feet is 317.85($1,000s) = $317,850
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-52
Relevant Data Range
When using a regression model for prediction,
only predict within the relevant range of data
450
400
House Price ($1000s)
350
300
250
200
150 Risky to try to
100
extrapolate far
50
0
beyond the range
0 500 1000 1500 2000 2500 3000 of observed X’s
Square Feet
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-53
Estimating Mean Values and
Predicting Individual Values
Goal: Form intervals around y to express
uncertainty about the value of y for a given xi
Confidence
Interval for
the expected
Y
y
value of y,
given xi
y = b0+b1xi
Prediction Interval
for an single
observed y, given xi
xi X
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-54
Confidence Interval for
the Average Y, Given X
Confidence interval estimate for the
expected value of y given a particular xi
Confidence interval for E(Yn1 | Xn1 ) :
1 (x n1 x)2
yˆ n1 t n2,α/2se 2
n (x i x)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-55
Prediction Interval for
an Individual Y, Given X
Confidence interval estimate for an actual
observed value of y given a particular xi
1 (x n1 x)2
yˆ n1 t n2,α/2se 1 2
n (x i x)
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-56
Estimation of Mean Values:
Example
Confidence Interval Estimate for E(Yn+1|Xn+1)
1 (x i x)2
yˆ n1 t n-2,α/2 se 317.85 37.12
n (x i x) 2
1 (Xi X)2
yˆ n1 t n-1,α/2se 1 317.85 102.28
n (Xi X) 2
In Excel, use
PHStat | regression | simple linear regression …
Check the
“confidence and prediction interval for x=”
box and enter the x-value and confidence level
desired
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-59
Finding Confidence and
Prediction Intervals in Excel
(continued)
Input values
y
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-61
Chapter Summary
Introduced the linear regression model
Reviewed correlation and the assumptions of
linear regression
Discussed estimating the simple linear
regression coefficients
Described measures of variation
Described inference about the slope
Addressed estimation of mean values and
prediction of individual values
Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chap 12-62