Transcript Hot Dogs

Economics of the Firm
Consumer Demand Analysis
Demand relationships are based off of the theory of consumer choice. We can
characterize the average consumer by their utility function.
“Utility” is a function of lemonade and hot dogs
U L, H 
Consumers make choices on what to buy that satisfy two criteria:
Their decision on what to
buy generates maximum
utility
Their decision on what to
buy generates is affordable
PH H  PL L  I
MU H MU L

PH
PL
QH  DPH , PL , I 
These decisions can be represented
by a demand curve
Example: Suppose that you have $10 to spend. Hot Dogs cost $4 apiece and glasses of
lemonade cost $2 apiece.
# Hot Dogs
MU
(Hot Dogs)
# Lemonade
MU
(Lemonade)
1
9
1
4
2
8
2
3
3
7
3
1.5
4
6
4
1
5
5
5
.5
MU H MU L

PH
PL
8 4

4 2
PH H  PL L  I
QH  D4,2,10  2
42  21  10
This point satisfies both
conditions and, hence, is one
point of the demand curve
Now, suppose that the price of hot dogs rises to $6 (Lemonade still costs $2 and you still
have $10 to spend)
# Hot Dogs
MU
(Hot Dogs)
# Lemonade
MU
(Lemonade)
1
9
1
4
2
8
2
3
3
7
3
1.5
4
6
4
1
5
5
5
.5
MU H MU L

PH
PL
8 4

6 2
Your decision at the margin
has been affected. You
need to buy less hot dogs
and more lemonade
(Substitution effect)
PH H  PL L  I
62  21  10
You can’t afford what you
used to be able to afford –
you need to buy less of
something! (Income effect)
Now, suppose that the price of hot dogs rises to $6 (Lemonade still costs $2 and you still
have $10 to spend)
# Hot Dogs
MU
(Hot Dogs)
# Lemonade
MU
(Lemonade)
1
9
1
4
2
8
2
3
3
7
3
1.5
4
6
4
1
5
5
5
.5
MU H MU L

PH
PL
9 3

6 2
PH H  PL L  I
QH  D6,2,10  1
61  22  10
This point satisfies both
conditions and, hence, is one
point of the demand curve
Demand curves slope downwards – this reflects the negative relationship between price
and quantity. Elasticity of Demand measures this effect quantitatively
%Q  50
D 

 1
%P
50
Price
64

 *100  50%
 4 
$6.00
$4.00
DI  $10
Quantity
1
2
1 2 

 *100  50%
2


Arc Elasticity vs. Price Elasticity
At the heart of this issue is this: “How do you calculate a percentage
change?
Suppose that a variable changes from 100 to 125. What is the
percentage increase?
 125  100 
%  
 *100  25%
 100 
- OR -
 125  100 
%  
 *100  20%
 125 
Note: This discrepancy wouldn’t be a big deal if these two
points weren’t so far apart!
Consider the following demand curve:
Q  80  4 P
Price
P  11
Q  36
$12.00
% Q
D 
% P
$10.00
DI  $10
Quantity
32
40
Arc Elasticity
 32  40 
%Q  
 *100  22%
 36 
 12  10 
%P  
 *100  18%
 11 
 22
D 
 1.2
18
Consider the following demand curve:
Q  80  4 P
Price
% Q
D 
% P
$12.00
$10.00
DI  $10
Quantity
32
40
Point Elasticity
 32  40 
%Q  
 *100  20%
 40 
 12  10 
%P  
 *100  20%
 10 
 20
D 
 1
20
If demand is linear, the slope is a constant, but the elasticity is not!!
Price
$18.00
Q  80  4 P
%Q Q  P 
 
D 

%P P  Q 
$10.00
$2.00
DI  $10
Quantity
8
 18 
 D  4   9
8
40
72
 10 
  1
40
 
 D  4
 2 
  .11
72
 
 D  4
If demand is linear, the slope is a constant, but the elasticity is not!!
Q  80  4 P
High prices = High Elasticities
 D  9
Price
Unit Elasticity
 D  1
$18.00
Low prices = Low Elasticities
 D  .11
$10.00
$2.00
DI  $10
Quantity
8
40
72
If you are interested in maximizing revenues, you are looking for the
spot on the demand curve where elasticity equals 1.
Revenues
TR  PQ  %TR  %P  %Q  1   %P
Price
Q  80  4 P
D 1
D 1
Now, suppose that the price of a hot dog is $4, Lemonade costs $2, but you have $20 to
spend.
# Hot Dogs
MU
(Hot Dogs)
# Lemonade
MU
(Lemonade)
1
9
1
4
2
8
2
3
3
7
3
1.5
4
6
4
1
5
5
5
.5
MU H MU L

PH
PL
8 4

4 2
PH H  PL L  I
42  21  20
Your decision at the margin is unaffected, but you have some
income left over (this is a pure income effect)
Now, suppose that the price of a hot dog is $4, Lemonade costs $2, but you have $20 to
spend.
# Hot Dogs
MU
(Hot Dogs)
# Lemonade
MU
(Lemonade)
1
9
1
4
2
8
2
3
3
7
3
1.5
4
6
4
1
5
5
5
.5
MU H MU L

PH
PL
6 3

4 2
PH H  PL L  I
QH  D4,2,20  4
44  22  20
This point satisfies both
conditions and, hence, is one
point of the demand curve
For any fixed price, demand (typically) responds positively to increases in income. Income
Elasticity measures this effect quantitatively
%Q 100
D 

1
%I 100
Price
 20  10 
%I  
 *100  100%
 10 
$4.00
DI  $20
DI  $10
Quantity
2
4
42
%Q  
 *100  100%
2


Cross price elasticity refers to the impact on demand of another price changing
Note: These numbers aren’t coming
from the previous example!!
Price
%QH 200
L 

2
%PL 100
42
%PL  
 *100  100%
 2 
$4.00
DPL  $4
DPL  $2
Quantity
2
6
62
%Q  
 *100  200%
2


A positive cross price elasticity refers to a substitute while a negative cross
price elasticity refers to a compliment
Demand Factors
Cross Sectional estimation holds the time period constant and estimates the variation
in demand resulting from variation in the demand factors
Time
t-1
t
t+1
For example: can we predict demand for Pepsi in South Bend by looking at
selected statistics for South bend
Estimating Cross Sectional Demand Curves
Lets begin by estimating a basic demand curve – quantity demanded is a
function of price.
QX  DPX 
Next, we need to assume a functional form. For simplicity, lets start with a
linear model
QX  a0  a1PX  
Next, Collect Data on Prices and Sales
4
3.5
3
Price
2.5
2
1.5
1
0.5
0
0
20
40
60
80
100
Quantity
120
140
160
180
Regression Results
Variable
Coefficient
Standard Error
t Stat
Intercept
47.996
3.004
15.977
Price (X)
-10.04
.774
-12.967
That is, we have estimated the following equation
QX  48  10PX
Regression Statistics
R Squared
Standard Error
Observations
.782
10.02
250
QX  48 10PX  
(3.004)
(0.774)
(10.02)
Values
Price of X
Average Price of X
$2.50
$5
Mean  48  10(2.50)  23


StdDev  (3.004) 2  (.774) 2 (2.50) 2  2(2.50)5 .7742  10.02  9.90
Our forecast of demand is normally distributed with a mean of 23 and a
standard deviation of 9.90.
2
QX  48  10PX
If we want to calculate the
elasticity of our estimated demand
curve, we need to specify a
specific point.
x  10p x
x
 10
p x
PX
x  p x 
 px 


10
 
   x
p x  x 
 x 
 2.50 
  1.09
 23 
 x  10
$2.50
P  $2.50
QX  48  102.50   23
23
QX
Given our model of demand as a function of income, and prices, we could
specify a variety of functional forms
Linear Demand Curves
x  a0  4 px
x  4p x
Here, quantity demanded responds to
dollar changes in price (i.e. a $1 increase in
price lowers demand by 4 units.
PX
x
 4
p x
x p x
 px 
  x  4 
p x x
 x 
QX
Given our model of demand as a function of income, and prices, we could
specify a variety of functional forms
Semi Log Demand Curves
xd  ln a0  4 ln px
x  4 ln p x
x
 4
%p x
x 1
1
  x  4 
%p x x
 x
Here, quantity demanded responds to
percentage changes in price (i.e. a 1%
increase in price lowers demand by 4 units.
 ln px  %px
PX
QX
Given our model of demand as a function of income, and prices, we could
specify a variety of functional forms
Semi Log Demand Curves
ln xd  a0  4 px
 ln x  4p x
%x
 4
p x
%x p x
 px 
  x  4 
p x 1
 1 
Here, percentage change in quantity
demanded responds to a dollar change in
price (i.e. a $1 increase in price lowers
demand by 4%.
PX
QX
Given our model of demand as a function of income, and prices, we could
specify a variety of functional forms
Log Demand Curves
ln xd  ln a0  4 ln px
 ln x  4 ln p x
Here, percentage change in quantity
demanded responds to a percentage
change in price (i.e. a 1% increase in price
lowers demand by 4%.
PX
% x
  x  4
% p x
QX
Log Linear demands have constant elasticities!!
One Problem
Suppose you observed the following data points. Could you
estimate a demand curve?
px
D
x
Estimating demand curves
A problem with estimating demand curves is the simultaneity
problem.
xd  a0  a1 px  a2 I   d
px
S
Market prices are the result of
the interaction between
demand and supply!!
px
D
xd  xs
x
Estimating demand curves
Case #1: Both supply and demand
shifts!!
px
S
Case #2: All the points are due to
supply shifts
px
S’
S’’
S
S’
S’’
D
D’
D’’
D
x
x
An example…
Demand
Supply
Equilibrium
Suppose you get a random shock to
demand
xd  a0  a1 px  a2 I   d
xs  b0  b1 px   s
xs  xd
The shock effects quantity
demanded which (due to the
equilibrium condition influences
price!
Therefore, price and the error
term are correlated! A big
problem !!
Suppose we solved for price and quantity by using the
equilibrium condition
xs  xd
a0  a1 px  a2 I   d  b0  b1 px   s
 a0  b0   a2    d   s 
  
 I  

p x  
 b1  a1   b1  a1   b1  a1 
 a0  b0 
 a2 
 d s 
  b1 
 I  b1 
   s
x  b0  b1 
 b1  a1 
 b1  a1 
 b1  a1 
We could estimate the following equations
p x   0   1 I  1
x   2   3 I  2
The original parameters are related as follows:
 a2 

 1  
 b1  a1 
 a2 

 3  b1 
 b1  a1 
3
b1 
1
b0  x  b1 px
We can solve for the supply
parameters, but not
demand. Why?
xd  a0  a1 px  a2 I   d
xs  b0  b1 px   s
px
By including a demand shifter (Income), we
are able to identify demand shifts and, hence,
trace out the supply curve!!
S
D
D
D
x
Demand Factors
Time Series estimation holds the demand factors constant and estimates the
variation in demand over time
Time
t-1
t
t+1
For example: can we predict demand for Pepsi in South Bend next year by
looking at how demand varies across time
Time series estimation leaves the demand factors constant and looks at
variations in demand over time. Essentially, we want to separate demand
changes into various frequencies
Trend: Long term movements in demand (i.e. demand
for movie tickets grows by an average of 6% per year)
Business Cycle: Movements in demand related to the
state of the economy (i.e. demand for movie tickets
grows by more than 6% during economic expansions
and less than 6% during recessions)
Seasonal: Movements in demand related to time of
year. (i.e. demand for movie tickets is highest in the
summer and around Christmas
Time Period
Quantity (millions of kilowatt hours)
2003:1
11
2003:2
15
2003:3
12
2003:4
14
2004:1
12
2004:2
17
2004:3
13
2004:4
16
2005:1
14
2005:2
18
2005:3
15
2005:4
17
2006:1
15
2006:2
20
2006:3
16
2006:4
19
Suppose that you
work for a local
power company.
You have been
asked to forecast
energy demand for
the upcoming year.
You have data over
the previous 4
years:
First, let’s plot the data…what do you see?
25
20
15
10
5
0
2003-1
2004-1
2005-1
2006-1
This data seems to have a linear trend
A linear trend takes the following form:
Estimated value for
time zero
Estimated quarterly growth
(in kilowatt hours)
xt  x0  bt
Forecasted value at time
t (note: time periods are
quarters and time zero is
2003:1)
Time period: t = 0 is 2003:1
and periods are quarters
Regression Results
Variable
Coefficient
Standard Error
t Stat
Intercept
11.9
.953
12.5
Time Trend
.394
.099
4.00
Regression Statistics
R Squared
Standard Error
Observations
.53
1.82
16
xt  11.9  .394t
Lets forecast electricity usage at the mean time period (t = 8)
xˆt  11.9  .3948  15.05
Var xˆt   3.50
Here’s a plot of our regression line with our error bands…again, note that the
forecast error will be lowest at the mean time period
25
20
15
10
5
0
2003-1
2004-1
2005-1
T=8
2006-1
We can use this linear trend model to predict as far out as we want, but note
that the error involved gets worse!
70
60
50
40
30
20
10
0
Sample
xˆt  11.9  .39476  41.85
Var xˆt   47.7
One method of evaluating a forecast is to calculate the root mean squared error
Time Period
Actual
Predicted
Error
2003:1
11
12.29
-1.29
2003:2
15
12.68
2.31
2003:3
12
13.08
-1.08
2003:4
14
13.47
.52
2004:1
12
13.87
-1.87
2004:2
17
14.26
2.73
2004:3
13
14.66
-1.65
2004:4
16
15.05
.94
2005:1
14
15.44
-1.44
2005:2
18
15.84
2.15
2005:3
15
16.23
-1.23
2005:4
17
16.63
.37
2006:1
15
17.02
-2.02
2006:2
20
17.41
2.58
2006:3
16
17.81
-1.81
2006:4
19
18.20
.79
Sum of squared forecast
errors
 A  F 
2
RMSE 
t
n
Number of
Observations
RMSE  1.70
t
Lets take another look at the data…it seems that there is a regular pattern…
25
20
Q2
Q2
Q2
Q2
15
10
5
0
2003-1
2004-1
2005-1
2006-1
We are systematically under predicting usage in the second quarter
Average Ratios
Time Period
Actual
Predicted
Ratio
Adjusted
2003:1
11
12.29
.89
12.29(.87)=10.90
2003:2
15
12.68
1.18
12.68(1.16) = 14.77
2003:3
12
13.08
.91
13.08(.91) = 11.86
•Q2 = 1.16
2003:4
14
13.47
1.03
13.47(1.04) = 14.04
•Q3 = .91
2004:1
12
13.87
.87
13.87(.87) = 12.30
2004:2
17
14.26
1.19
14.26(1.16) = 16.61
2004:3
13
14.66
.88
14.66(.91) = 13.29
2004:4
16
15.05
1.06
15.05(1.04) = 15.68
2005:1
14
15.44
.91
15.44(.87) = 13.70
2005:2
18
15.84
1.14
15.84(1.16) = 18.45
2005:3
15
16.23
.92
16.23(.91) = 14.72
2005:4
17
16.63
1.02
16.63(1.04) = 17.33
2006:1
15
17.02
.88
17.02(.87) = 15.10
2006:2
20
17.41
1.14
17.41(1.16) = 20.28
2006:3
16
17.81
.89
17.81(.91) = 16.15
2006:4
19
18.20
1.04
18.20(1.04) = 18.96
We can adjust for this seasonal component…
•Q1 = .87
•Q4 = 1.04
Now, we have a pretty good fit!!
20
19
18
17
16
15
14
13
12
11
10
2003-1
2004-1
2005-1
2006-1
RMSE  .26
Recall our prediction for period 76 ( Year 2022 Q4)
70
60
50
40
30
20
10
0
xˆt  11.9  .39476  41.851.04  43.52
We could also account for seasonal variation by using dummy variables
xt  x0  b0t  b1D1  b2 D2  b3 D3
1, if quarter i
Di  
 0, else
Note: we only need three quarter dummies. If the observation is from quarter 4, then
D1  D2  D3  0
xt  x0  b0t
Regression Results
Variable
Coefficient
Intercept
Standard Error
t Stat
12.75
.226
56.38
.375
.0168
22.2
D1
-2.375
.219
-10.83
D2
1.75
.215
8.1
D3
-2.125
.213
-9.93
Time Trend
Regression Statistics
R Squared
.99
Standard Error
.30
Observations
16
Note the much better fit!!
xt  12.75  .375t  2.375D1  1.75D2  2.125D3
Time Period
Actual
Ratio Method
Dummy
Variables
2003:1
11
10.90
10.75
2003:2
15
14.77
15.25
2003:3
12
11.86
11.75
2003:4
14
14.04
14.25
2004:1
12
12.30
12.25
2004:2
17
16.61
16.75
2004:3
13
13.29
13.25
2004:4
16
15.68
15.75
2005:1
14
13.70
13.75
2005:2
18
18.45
18.25
2005:3
15
14.72
14.75
2005:4
17
17.33
17.25
2006:1
15
15.10
15.25
2006:2
20
20.28
19.75
2006:3
16
16.15
16.25
2006:4
19
18.96
18.75
Ratio Method
RMSE  .26
Dummy Variables
RMSE  .25
A plot confirms the similarity of the methods
20
19
18
17
16
15
14
13
12
11
10
2003-1
2004-1
2005-1
Dummy
2006-1
Ratio
Recall our prediction for period 76 ( Year 2022 Q4)
70
60
50
40
30
20
10
0
xt  12.75  .37576  41.25
Recall, our trend line took the form…
xt  x0  bt
This parameter is measuring quarterly change in
electricity demand in millions of kilowatt hours.
Often times, its more realistic to assume that demand grows by a constant
percentage rather that a constant quantity. For example, if we knew that
electricity demand grew by g% per quarter, then our forecasting equation would
take the form
 g% 
xt  x0 1 

 100 
t
If we wish to estimate this equation, we have a little work to do…
xt  x0 1  g 
t
Note: this growth rate is in
decimal form
If we convert our data to natural logs, we get the following linear relationship that can
be estimated
ln xt  ln x0  t ln 1  g 
Regression Results
Variable
Coefficient
Standard Error
t Stat
Intercept
2.49
.063
39.6
Time Trend
.026
.006
4.06
Regression Statistics
R Squared
Standard Error
Observations
.54
.1197
ln xt  2.49  .026t
16
Lets forecast electricity usage at the mean time period (t = 8)
ln xˆt  2.49  .0268  2.698
BE CAREFUL….THESE NUMBERS ARE LOGS !!!
Var xˆt   .0152
ln xˆt  2.49  .0268  2.698
Var xˆt   .0152
The natural log of forecasted demand is 2.698. Therefore, to get the actual demand
forecast, use the exponential function
e
2.698
 14.85
Likewise, with the error bands…a 95% confidence interval is +/- 2 SD
2.698  /  2 .0152  2.451,2.945
e
2.451
,e
2.945
  11.60,19.00
Again, here is a plot of our forecasts with the error bands
30
25
20
15
10
5
0
2003-1
2004-1
2005-1
T=8
2006-1
RMSE  1.70
When plotted in logs, our period 76 ( year 2022 Q4) looks similar to the linear
trend
7
6
5
4
3
2
1
0
1
7
13 19 25 31 37 43 49 55 61 67 73 79 85 91 97
ln xˆt  2.49  .02676  4.49
Var ln xˆt   .207
Again, we need to convert back to levels for the forecast to be relevant!!
600
500
400
300
200
100
0
1
13
25
37
49
Errors is growth rates compound quickly!!
61
73
85
97
e 4.49  89.22
 /  2SD  35.8,221.8
Quarter
Market Share
1
20
2
22
25
3
23
20
4
24
5
18
6
23
7
19
5
8
17
0
9
22
10
23
11
18
12
23
30
15
10
Consider a new forecasting problem.
You are asked to forecast a company’s
market share for the 13th quarter.
1
2
3
4
5
6
7
8
9
10
There doesn’t seem to be any
discernable trend here…
11
12
Smoothing techniques are often used when data exhibits no trend or seasonal/cyclical
component. They are used to filter out short term noise in the data.
Quarter
Market
Share
MA(3)
MA(5)
1
20
2
22
3
23
4
24
21.67
5
18
23
6
23
21.67
21.4
7
19
21.67
22
8
17
20
21.4
9
22
19.67
20.2
10
23
19.33
19.8
11
18
20.67
20.8
12
23
21
19.8
A moving average of length N is
equal to the average value over
the previous N periods
t 1
MAN  
A
tN
N
t
The longer the moving average, the smoother the forecasts are…
30
25
20
Actual
15
MA(3)
MA(5)
10
5
0
1
2
3
4
5
6
7
8
9
10
11
12
Calculating forecasts is straightforward…
MA(3)
Quarter
Market
Share
MA(3)
MA(5)
1
20
2
22
3
23
4
24
21.67
5
18
23
6
23
21.67
21.4
7
19
21.67
22
8
17
20
21.4
9
22
19.67
20.2
10
23
19.33
19.8
11
18
20.67
20.8
12
23
21
19.8
23  18  23
 21.33
3
MA(5)
23  18  23  22  17
 20.6
5
So, how do we choose N??
Quarter
Market
Share
MA(3)
Squared
Error
MA(5)
Squared
Error
1
20
2
22
3
23
4
24
21.67
5.4289
5
18
23
25
6
23
21.67
1.7689
21.4
2.56
7
19
21.67
7.1289
22
9
8
17
20
9
21.4
19.36
9
22
19.67
5.4289
20.2
3.24
10
23
19.33
13.4689
19.8
10.24
11
18
20.67
7.1289
20.8
7.84
12
23
21
4
19.8
10.24
Total = 78.3534
RMSE 
78.3534
 2.95
9
Total = 62.48
RMSE 
62.48
 2.99
7
Exponential smoothing involves a forecast equation that takes the following form
Ft 1  wAt  1  wFt
w  0,1
Forecast for time t
Forecast for time t+1
Actual value at time
t
Smoothing parameter
Note: when w = 1, your forecast is equal to the previous value. When w = 0, your
forecast is a constant.
For exponential smoothing, we need to choose a value for the weighting formula as
well as an initial forecast
Quarter
Market
Share
W=.3
W=.5
1
20
21.0
21.0
2
22
20.7
20.5
3
23
21.1
21.3
4
24
21.7
22.2
5
18
22.4
23.1
6
23
21.1
20.6
7
19
21.7
21.8
8
17
20.9
20.4
9
22
19.7
18.7
10
23
20.4
20.4
11
18
21.2
21.7
12
23
20.2
19.9
Usually, the initial forecast
is chosen to equal the
sample average
.523  .520.6  21.8
As was mentioned earlier, the smaller w will produce a smoother forecast
30
25
20
15
10
5
0
1
2
3
4
5
Actual
6
7
w=.3
8
9
w=.5
10
11
12
Calculating forecasts is straightforward…
W=.3
Quarter
Market
Share
W=.3
W=.5
1
20
21.0
21.0
2
22
20.7
20.5
3
23
21.1
21.3
4
24
21.7
22.2
5
18
22.4
23.1
6
23
21.1
20.6
7
19
21.7
21.8
8
17
20.9
20.4
9
22
19.7
18.7
10
23
20.4
20.4
11
18
21.2
21.7
12
23
20.2
19.9
.323  .720.2  21.04
W=.5
.523  .519.9  21.45
So, how do we choose W??
Quarter
Market
Share
W = .3
Squared
Error
W=.5
Squared
Error
1
20
21.0
1
21.0
1
2
22
20.7
1.69
20.5
2.25
3
23
21.1
3.61
21.3
2.89
4
24
21.7
5.29
22.2
3.24
5
18
22.4
19.36
23.1
26.01
6
23
21.1
3.61
20.6
5.76
7
19
21.7
7.29
21.8
7.84
8
17
20.9
15.21
20.4
11.56
9
22
19.7
5.29
18.7
10.89
10
23
20.4
6.76
20.4
6.76
11
18
21.2
10.24
21.7
13.69
12
23
20.2
7.84
19.9
9.61
Total = 87.19
RMSE 
87.19
 2.70
12
Total = 101.5
RMSE 
101.5
 2.91
12