Regression Techniques and Demand Estimation
Regression Techniques and Demand Estimation
Estimation
From Theory to Practice
Problems:
1. Selection of a representative sample
what is a good sample!
2. Response bias
how truthful can they be?
Qi = α + β 1Y - β 2 pi + β 3ps - β 4pc + β 5Z + e
where
Qi = quantity demanded of good i
Y = income
pi = price of good i
ps = price of the substitute(s)
pc = price of the complement(s)
Z = other relevant determinant(s) of demand
e = error term
Values of α and β i ?
Types of Data
Model: Yt = a + bX t + et
Y = a
+
bX
t t
et = Yt − Y
t
Ordinary Least Squares (OLS)
n n n
∑t ∑ t t ∑ t
e 2
t =1
= (Y −
t =1
Y) 2
= (Y
t =1
− a
− )2
bX t
Ordinary Least Squares (OLS)
Estimation Procedure
n
∑(X t − X )(Yt − Y )
b= t =1
a= Y − bX
n
∑(X
t =1
t − X) 2
Ordinary Least Squares (OLS)
Estimation Example
T im e Xt Yt Xt − X Yt − Y ( X t − X )(Yt −Y ) ( X t − X2 )
1 10 44 -2 -6 12 4
2 9 40 -3 -1 0 30 9
3 11 42 -1 -8 8 1
4 12 46 0 -4 0 0
5 11 48 -1 -2 2 1
6 12 52 0 2 0 0
7 13 54 1 4 4 1
8 13 58 1 8 8 1
9 14 56 2 6 12 4
10 15 60 3 10 30 9
n
120 n
500 n
106 30
106
n = 10 ∑X
t =1
t = 120 ∑Y
t =1
t = 500 ∑(X
t =1
t − X ) 2 = 30 b=
30
= 3.533
n n n
X 120 Y 500
X =∑ t = = 12 Y =∑ t = = 50 ∑(X t − X )(Yt − Y ) = 106 a= 50 − (3.533)(12) = 7.60
t =1 n 10 t =1 n 10 t =1
Ordinary Least Squares (OLS)
Estimation Example
n
X t 120
n = 10 X =∑ = = 12
t =1 n 10
n
n n Yt 500
∑X = 120 ∑Y = 500 Y =∑ = = 50
t =1 n 10
t t
t =1 t =1
n
106
∑(X
t =1
t − X ) = 30
2
b=
30
= 3.533
∑(X
t =1
t − X )(Yt − Y ) = 106 a= 50 − (3.533)(12) = 7.60
Tests of Significance
Example Calculation
n n
∑ e = ∑ (Yt − Yt ) = 65.4830
t =1
2
t
2
t =1
n
∑ t
( X
t =1
− X ) 2
= 30
sb =
∑ t
(Y − Y) 2
=
65.4830
= 0.52
( n − k )∑ ( X t − X ) 2
(10 − 2)(30)
Tests of Significance
b 3.53
t= = = 6.79
sb 0.52
b̂
t=
SE b̂
b: estimated coefficient
SEb: standard error of the estimated coefficient
Rule of 2: if absolute value of t is greater than
2, estimated coefficient is significant at the 5%
level
If coefficient passes t-test, the variable has a
true impact on demand
Tests of Significance
Tests of Significance
∑ (Yt − Y ) = ∑ (Y − Y ) + ∑ (Yt − Yt )
2 2 2
Sum of Squares
2 RSS ESS
R = = 1−
TSS TSS
R2 is always between 0 and 1
If it’s near 1 it means that the regression line
is a good fit to the data
Another interpretation: the percentage of
variance ”accounted for”
Tests of Significance
Coefficient of Determination
R =
2 Explained Variation
=
∑ (Y− Y ) 2
Total Variation ∑ t
(Y − Y ) 2
373.84
R =
2
= 0.85
440.00
Multiple Regression Analysis
(n − 1)
R = 1 − (1 − R )
2 2
(n − k )
Multiple Regression Analysis
R 2 /(k − 1)
F=
(1 − R 2 ) /(n − k )
Problems in Regression Analysis
Multicollinearity:
Two or more explanatory
variables are highly correlated.
Heteroskedasticity: Variance of error term is not
independent of the Y variable.
Autocorrelation: Consecutive error terms are
correlated.
Durbin-Watson Statistic
∑ t t −1
( e − e ) 2
d= t =2
n
∑t
e 2
t =1
Linear Function:
QX = a0 + a1PX + a2 I + a3 N + a4 PY + L + e