0% found this document useful (0 votes)
36 views25 pages

CH 05 Regression OLS Lecture 2

This document provides an overview of linear regression analysis and the ordinary least squares (OLS) estimation method. It discusses key concepts such as the dependent and independent variables, the regression line, and the OLS procedure for estimating the intercept (a) and slope (b) coefficients to minimize the sum of squared errors between the observed data points and the regression line. The document uses examples to demonstrate how to apply the OLS method to calculate the intercept and slope estimates from a given data set.

Uploaded by

wcm007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views25 pages

CH 05 Regression OLS Lecture 2

This document provides an overview of linear regression analysis and the ordinary least squares (OLS) estimation method. It discusses key concepts such as the dependent and independent variables, the regression line, and the OLS procedure for estimating the intercept (a) and slope (b) coefficients to minimize the sum of squared errors between the observed data points and the regression line. The document uses examples to demonstrate how to apply the OLS method to calculate the intercept and slope estimates from a given data set.

Uploaded by

wcm007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

Demand Estimation

Chapter 5

Regression Analysis

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


1
Regression: Outline
• Least Squares Methods
• Estimation: Least Squares
• Interpretation of estimators
• Properties of OLS estimators
• Variance of Y, b, and a
• Hypothesis Test of b and a
• ANOVA table
• Goodness-of-Fit and R2
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Linear regression model
Y = 2 +.5X
5
4
3
y

.5
2

1
1

-1 0 1 2 3 4 5
x

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Terminology
• Dependent variable (DV) = response
variable = left-hand side (LHS) variable
• Independent variables (IV) = explanatory
variables = right-hand side (RHS) variables
= regressor (excluding a)
• a is an estimator of parameter α
• B is an estimator of parameter β
• a and b are the intercept and slope
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Ordinary Least Square Method
• How to draw such a line based on data points
observed?
• Suppose an imaginary line of y= a + bx
• Imagine a vertical distance (or error) between the
line and a data point. e=Y-E(Y)
• This error (or gap) is the deviation of the data
point from the imaginary line, regression line
• What is the best values of a and b?
• a and b that minimizes the sum of such errors
(deviations of individual data points from the
line)
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Ordinary least squares (OLS)
4 Least Squares Method

x3
e3
3

E(Y)=a + bX
2
y

x1

e2
e1
1

x2
0

0 1 2 3 4 5
x

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Ordinary least squares (OLS)
• Deviation does not have good properties for
computation
• Why do we use squares of deviation? (e.g.,
variance)
• Let us get a and b that can minimize the sum
of squared deviations rather than the sum of
deviations.
• This method is called least squares
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Ordinary least squares (OLS)
Least squares method minimizes the sum of
squares of errors (deviations of individual data
points form the regression line)
Such a and b are called least squares
estimators (estimators of parameters α and β).
The process of getting parameter estimators
(e.g., a and b) is called estimation
“Regress Y on X”
Least squares method is the estimation
method of ordinary least squares (OLS)

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Ordinary least squares (OLS)
Ordinary least squares (OLS) =
Linear regression model =
Classical linear regression model
Linear relationship between Y and Xs
Constant slopes (coefficients of Xs)
Least squares method
Xs are fixed; Y is conditional on Xs
Error is not related to Xs
Constant variance of errors

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Least Squares Method 1
Y    X  
E (Y )  Yˆ  a  bX
  Y  Yˆ  Y  (a  bX )  Y  a  bX
 2  (Y  Yˆ ) 2  (Y  a  bX ) 2
(Y  a  bX ) 2  Y 2  a 2  b 2 X 2  2aY  2bXY  2abX
 
 2
 (Y  Yˆ ) 2
  (Y  a  bX ) 2

Min  2  Min (Y  a  bX ) 2

How to get a and b that can minimize the sum


of squares of errors?
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Least Squares Method 2
• Linear algebraic solution
• Compute a and b so that partial derivatives
with respect to a and b are equal to zero

  2

 
  (Y  a  bX ) 2 
 2na  2 Y  2b X  0
a a
na   Y  b X  0

a  Y
b  X
 Y  bX
n n

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Least Squares Method 3
Take a partial derivative with respect to b and
plug in a you got, a=Ybar –b*Xbar

  2

 
  (Y  a  bX ) 2 
 2b X 2  2 XY  2a  X  0
b b
b X 2   XY  a  X  0 b X 2   XY  Y  bX  X  0
 Y  X 
b X   XY  
2
 b  X  0

 n n 
b X 2   XY   X Y
b
 X
2

0
n n
 n X 2   X 2   XY   X  Y
b 
 n  n
 
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
Least Squares Method 4
Least squares method is an algebraic solution
that minimizes the sum of squares of errors
(variance component of error)
n XY   X  Y  ( X  X )(Y  Y ) SP
b   xy

n X 2   X  (X  X )
2 2
SS x

a Y  b  X  Y  bX
n n

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


OLS: Example 10-5 (1)
No x y x-xbar y-ybar (x-xb)(y-yb) (x-xbar)^2
1 43 128 -14.5 -8.5 123.25 210.25
2 48 120 -9.5 -16.5 156.75 90.25
3 56 135 -1.5 -1.5 2.25 2.25
4 61 143 3.5 6.5 22.75 12.25
5 67 141 9.5 4.5 42.75 90.25
6 70 152 12.5 15.5 193.75 156.25

Mean 57.5 136.5


Sum 345 819 541.5 561.5

b  ( X  X )(Y  Y ) SP
 xy

541.5
 .9644
(X  X ) SS 2
x 561.5

a  Y  bX  136.5  .9644  57.5  81.0481


2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
OLS: Example 10-5 (3)
Y hat = 81.048 + .964X
150
140
130
120

40 50 60 70
x

Fitted values y

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


What Are a and b ?
• a is an estimator of its parameter α
• a is the intercept, a point of y where the
regression line meets the y axis
• b is an estimator of its parameter β
• b is the slope of the regression line
• b is constant regardless of values of Xs
• b is more important than a since that is
what researchers want to know.
2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young
How to interpret b?

• For unit increase in x, the expected


change in y is b, holding other things
(variables) constant.

• For unit increase in x, we expect that y


increases by .964, holding other
variables constant.

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Sample Data: The Demand for Pizza
College Qslices Pslices Tuition Psoftdrink Urban Residential
1 9.89 97.3 17.92 98.8 1 1
2 12.07 101.2 26.36 95.2 1 0
3 13.08 91 14.57 110.8 1 0
4 13.9 95 7.7 91.9 1 0
5 8.93 109.6 14.56 100 0 1
6 8.05 126.4 9 100.8 0 0
7 3.98 126.4 17.48 122.9 1 1
8 3.18 149.4 20.46 149.1 0 0
9 15.07 78.8 29.26 102.4 1 0
10 11.86 75.7 13.96 87.8 1 1
11 13.1 91.9 12.17 80.2 1 0
12 13.87 103.4 3.76 75.2 1 0
13 12.02 101.6 18.72 99.6 1 0
14 10.19 113 20.69 123.5 0 0
15 9.88 121.7 17.63 131.2 0 0
16 11.94 112.6 20.71 79.2 1 0
17 10.93 150.1 21.91 88.5 0 0
18 11.99 100.3 17.97 94.1 1 0
19 10 151.4 18 101.6 0 0
20 8.12 145.3 18.71 90 0 0
21 9.18 150.5 25.01 94.3 0 0
22 9.86 129.7 18.44 98.4 1 0
23 11 123 24.15 95 1 0
24 11.91 104.5 22.87 99.8 0 0
25 13.12 82 18.75 100.9 1 0
26 10.02 100.3 18.63 112.1 1 0
27 8.91 109.4 6.35 124.3 0 0
28 7.96 128.1 13.99 90.2 0 1
29 7.89 155.1 8.83 80.5 0 0
30 4.96 148.7 13.83 97.1 0 1

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Model specfication

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Anticipated Relationship
Between X’s an Y

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Excel’s Regression Output
SUMMARY OUTPUT

Regression Statistics
Multiple R 0.940502
R Square 0.884543
Adjusted R Square
0.86049
Standard Error
1.06418
Observations 30

ANOVA
df SS MS F Significance F
Regression 5 208.229 41.64581 36.77399 1.72E-10
Residual 24 27.17952 1.13248
Total 29 235.4085

Coeffi cients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 29.16132 2.200962 13.24935 1.57E-12 24.61876 33.70388 24.61876 33.70388
Pslices -0.09257 0.011827 -7.82718 4.64E-08 -0.11698 -0.06816 -0.11698 -0.06816
Tuition 0.059756 0.034522 1.730945 0.0963 -0.01149 0.131006 -0.01149 0.131006
Psoftdrink -0.08185 0.012899 -6.3455 1.47E-06 -0.10847 -0.05523 -0.10847 -0.05523
Urban -0.74684 0.575019 -1.29881 0.206348 -1.93363 0.439938 -1.93363 0.439938
Residential -3.04912 0.492581 -6.19008 2.14E-06 -4.06576 -2.03248 -4.06576 -2.03248

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Multiple Regression Example
A paint company is
Region Sales Prom Expen Price Disp Income
attempting to develop a
1 160 150 15 19
2 220 160 13.5 17.5
demand model for its
3 140 50 16.5 14 exterior house paints. The
4 190 190 14.5 21 company believes most
5 130 90 17 15.5 important variables are:
6 160 60 16 14.5
7 200 140 13 21.5
-Promotional
8 150 110 18 18 Expenditures measured in
9 210 200 12 18.5 1000 dollars
10 190 100 15.5 20 -Price measured in dollars
per gallon
-Disposable Income per
household measured in
1000 dollars
-Data were obtained from
10 company sales regions

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Excel Regression Results
SUMMARY OUTPUT
Sales = 310.24 + 0.008 Prom Expen -12.20 Price
Regression Statistics
Multiple R 0.888583 + 2.677 Disp Income
R Square 0.78958
Adjusted R Square
0.68437
Standard Error
17.41711
Observations 10

ANOVA
df SS MS F Significance F
Regression 3 6829.866 2276.622 7.504796 0.018698
Residual 6 1820.134 303.3556
Total 9 8650

Coeffi cients
Standard Error t Stat P-value Lower 95%Upper 95%Lower 95.0%
Upper 95.0%
Intercept 310.2448 95.07486 3.263163 0.017181 77.60497 542.8846 77.60497 542.8846
Prom Expen0.007717 0.204064 0.037816 0.971061 -0.49161 0.507044 -0.49161 0.507044
Price -12.2025 4.58207 -2.6631 0.037369 -23.4144 -0.99057 -23.4144 -0.99057
Disp Income2.676784 3.160072 0.847064 0.429446 -5.05563 10.4092 -5.05563 10.4092

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Coefficients Interpretations
B0= 310.24 This is the intercept, the value of y when all
the variables take the value zero.
B1=0.008 For one unit increase ($1000) in promotional
expenditure, sales increase by 0.008 *1000 = 8 gallons
(assuming the other variables are held constant).

B2= -12.2 For each additional a $1.0 increase in price,


sales decrease by -12.202*1000 = 12202 gallons
B3= 2.677 For additional one unit ($1000) in disposable
income, sales increase by 2.677*1000 =2677 gallons.

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young


Point and Interval Forecasts
Use the model to estimate point forecast (or interval).
Suppose company is interested to estimate sales in
region where promotional expenditures are $185000,
price is $15 per gallon, and disposable income per
house hold is $19500.

2003 Prentice Hall Business Publishing Managerial Economics, 4/e Keat/Young

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy