You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,12 +21,6 @@ Throughout the lecture, we focus on models with one good and one price.
21
21
({doc}`Later <supply_demand_multiple_goods>` we will investigate settings with
22
22
many goods.)
23
23
24
-
We shall describe two classic welfare theorems:
25
-
26
-
***first welfare theorem:** for a given a distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem.
27
-
28
-
***second welfare theorem:** An allocation of goods to consumers that solves a social planning problem can be supported by a competitive equilibrium with an appropriate initial distribution of wealth.
29
-
30
24
Key infrastructure concepts that we'll encounter in this lecture are
31
25
32
26
* inverse demand curves
@@ -37,13 +31,30 @@ Key infrastructure concepts that we'll encounter in this lecture are
37
31
* social welfare as a sum of consumer and producer surpluses
38
32
* competitive equilibrium
39
33
40
-
We will use the following imports.
34
+
35
+
We will provide a version of the [first fundamental welfare theorem](https://en.wikipedia.org/wiki/Fundamental_theorems_of_welfare_economics), which was formulated by
In our exposition we will use the following imports.
41
51
42
52
```{code-cell} ipython3
43
53
import numpy as np
44
54
import matplotlib.pyplot as plt
45
55
```
46
56
57
+
47
58
## Supply and Demand
48
59
49
60
We study a market for a single good in which buyers and sellers exchange a quantity $q$ for a price $p$.
@@ -53,171 +64,564 @@ Quantity $q$ and price $p$ are both scalars.
53
64
We assume that inverse demand and supply curves for the good are:
54
65
55
66
$$
56
-
p = d_0 - d_1 q, \quad d_0, d_1 > 0
67
+
p = d_0 - d_1 q, \quad d_0, d_1 > 0
57
68
$$
58
69
59
70
$$
60
-
p = s_0 + s_1 q , \quad s_0, s_1 > 0
71
+
p = s_0 + s_1 q , \quad s_0, s_1 > 0
61
72
$$
62
73
63
74
We call them inverse demand and supply curves because price is on the left side of the equation rather than on the right side as it would be in a direct demand or supply function.
64
75
65
-
### Surpluses and Welfare
66
76
67
-
We define **consumer surplus** as the area under an inverse demand curve minus $p q$:
77
+
78
+
Here is a class that stores parameters for our single good market, as well as
79
+
implementing the inverse demand and supply curves.
80
+
81
+
```{code-cell} ipython3
82
+
class Market:
83
+
84
+
def __init__(self,
85
+
d_0=1.0, # demand intercept
86
+
d_1=0.6, # demand slope
87
+
s_0=0.1, # supply intercept
88
+
s_1=0.4): # supply slope
89
+
90
+
self.d_0, self.d_1 = d_0, d_1
91
+
self.s_0, self.s_1 = s_0, s_1
92
+
93
+
def inverse_demand(self, q):
94
+
return self.d_0 - self.d_1 * q
95
+
96
+
def inverse_supply(self, q):
97
+
return self.s_0 + self.s_1 * q
98
+
99
+
```
100
+
101
+
Let's create an instance.
102
+
103
+
```{code-cell} ipython3
104
+
market = Market()
105
+
```
106
+
107
+
108
+
Here is a plot of these two functions using `market`.
To compute a quantity that maximizes welfare criterion $\textrm{Welf}$, we differentiate $\textrm{Welf}$ with respect to $q$ and then set the derivative to zero.
276
+
Here is a Python function that evaluates this social welfare at a given
Let's remember the quantity $q$ given by equation {eq}`eq:old1` that a social planner would choose to maximize consumer plus producer surplus.
106
316
107
317
We'll compare it to the quantity that emerges in a competitive equilibrium
108
318
equilibrium that equates supply to demand.
109
319
320
+
321
+
110
322
### Competitive Equilibrium
111
323
112
-
Instead of equating quantities supplied and demanded, we'll can accomplish the same thing by equating demand price to supply price:
324
+
Instead of equating quantities supplied and demanded, we'll can accomplish the
325
+
same thing by equating demand price to supply price:
113
326
114
327
$$
115
-
p = d_0 - d_1 q = s_0 + s_1 q ,
328
+
p = d_0 - d_1 q = s_0 + s_1 q
329
+
$$
330
+
331
+
If we solve the equation defined by the second equality in the above line for
332
+
$q$, we obtain
333
+
116
334
$$
335
+
q = \frac{ d_0 - s_0}{s_1 + d_1}
336
+
$$ (eq:equilib_q)
117
337
118
-
+++
119
338
120
-
It we solve the equation defined by the second equality in the above line for $q$, we obtain the
121
-
competitive equilibrium quantity; it equals the same $q$ given by equation {eq}`eq:old1`.
339
+
This is the competitive equilibrium quantity.
340
+
341
+
Observe that the equilibrium quantity equals the same $q$ given by equation {eq}`eq:old1`.
122
342
123
343
The outcome that the quantity determined by equation {eq}`eq:old1` equates
124
344
supply to demand brings us a **key finding:**
125
345
126
-
* a competitive equilibrium quantity maximizes our welfare criterion
346
+
* a competitive equilibrium quantity maximizes our welfare criterion
347
+
348
+
This is a version of the [first fundamental welfare theorem](https://en.wikipedia.org/wiki/Fundamental_theorems_of_welfare_economics),
127
349
128
350
It also brings a useful **competitive equilibrium computation strategy:**
129
351
130
-
* after solving the welfare problem for an optimal quantity, we can read a competitive equilibrium price from either supply price or demand price at the competitive equilibrium quantity
352
+
* after solving the welfare problem for an optimal quantity, we can read a
353
+
competitive equilibrium price from either supply price or demand price at
354
+
the competitive equilibrium quantity
131
355
132
-
### Generalizations
133
356
134
-
In later lectures, we'll derive generalizations of the above demand and
135
-
supply curves from other objects.
357
+
## Generalizations
358
+
359
+
In a {doc}`later lecture <supply_demand_multiple_goods>`, we'll derive
360
+
generalizations of the above demand and supply curves from other objects.
136
361
137
362
Our generalizations will extend the preceding analysis of a market for a
138
363
single good to the analysis of $n$ simultaneous markets in $n$ goods.
139
364
140
365
In addition
141
366
142
-
* we'll derive **demand curves** from a consumer problem that maximizes a **utility function** subject to a **budget constraint**.
367
+
* we'll derive **demand curves** from a consumer problem that maximizes a
368
+
**utility function** subject to a **budget constraint**.
369
+
370
+
* we'll derive **supply curves** from the problem of a producer who is price
371
+
taker and maximizes his profits minus total costs that are described by a
372
+
**cost function**.
373
+
374
+
## Exercises
143
375
144
-
* we'll derive **supply curves** from the problem of a producer who is price taker and maximizes his profits minus total costs that are described by a **cost function**.
376
+
Suppose now that the inverse demand and supply curves are modified to take the
377
+
form
378
+
379
+
$$
380
+
p = i_d(q) := d_0 - d_1 q^{0.6}
381
+
$$
382
+
383
+
$$
384
+
p = i_s(q) := s_0 + s_1 q^{1.2}
385
+
$$
145
386
146
-
## Code
387
+
All parameters are positive, as before.
388
+
389
+
390
+
391
+
392
+
```{exercise}
393
+
:label: isd_ex1
394
+
395
+
Define a new `Market` class that holds the same parameter values as before by
396
+
changes the `inverse_demand` and `inverse_supply` methods to
397
+
match these new definitions.
398
+
399
+
Using the class, plot the inverse demand and supply curves $i_d$ and $i_s$
Copy file name to clipboardExpand all lines: lectures/supply_demand_multiple_goods.md
+90-48Lines changed: 90 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,16 @@
2
2
3
3
## Overview
4
4
5
-
We study a setting with $n$ goods and $n$ corresponding prices.
5
+
In a {doc}`previous lecture <intro_supply_demand>` we studied supply, demand
6
+
and welfare in a market with just one good.
7
+
8
+
In this lecture, we study a setting with $n$ goods and $n$ corresponding prices.
9
+
10
+
We shall describe two classic welfare theorems:
11
+
12
+
***first welfare theorem:** for a given a distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem.
13
+
14
+
***second welfare theorem:** An allocation of goods to consumers that solves a social planning problem can be supported by a competitive equilibrium with an appropriate initial distribution of wealth.
6
15
7
16
8
17
@@ -30,30 +39,35 @@ $$
30
39
31
40
## From utility function to demand curve
32
41
33
-
Let
42
+
Our study of consumers will use the following primitives
34
43
35
44
* $\Pi$ be an $m \times n$ matrix,
36
-
* $c$ be an $n \times 1$ vector of consumptions of various goods,
37
45
* $b$ be an $m \times 1$ vector of bliss points,
38
46
* $e$ be an $n \times 1$ vector of endowments, and
39
-
* $p$ be an $n \times 1$ vector of prices
40
47
41
-
We assume that $\Pi$ has linearly independent columns, which implies that $\Pi^\top \Pi$ is a positive definite matrix.
42
48
43
-
* it follows that $\Pi^\top \Pi$ has an inverse.
49
+
We will analyze endogenous objects $c$ and $p$, where
50
+
51
+
* $c$ is an $n \times 1$ vector of consumptions of various goods,
52
+
* $p$ is an $n \times 1$ vector of prices
53
+
44
54
45
55
The matrix $\Pi$ describes a consumer's willingness to substitute one good for every other good.
46
56
47
-
We shall see below that $(\Pi^T \Pi)^{-1}$ is a matrix of slopes of (compensated) demand curves for $c$ with respect to a vector of prices:
57
+
We assume that $\Pi$ has linearly independent columns, which implies that $\Pi^\top \Pi$ is a positive definite matrix.
58
+
59
+
* it follows that $\Pi^\top \Pi$ has an inverse.
60
+
61
+
We shall see below that $(\Pi^\top \Pi)^{-1}$ is a matrix of slopes of (compensated) demand curves for $c$ with respect to a vector of prices:
48
62
49
63
$$
50
-
\frac{\partial c } {\partial p} = (\Pi^T \Pi)^{-1}
64
+
\frac{\partial c } {\partial p} = (\Pi^\top \Pi)^{-1}
51
65
$$
52
66
53
67
A consumer faces $p$ as a price taker and chooses $c$ to maximize the utility function
54
68
55
69
$$
56
-
-.5 (\Pi c -b) ^\top (\Pi c -b )
70
+
- \frac{1}{2} (\Pi c -b) ^\top (\Pi c -b )
57
71
$$ (eq:old0)
58
72
59
73
subject to the budget constraint
@@ -62,25 +76,28 @@ $$
62
76
p^\top (c -e ) = 0
63
77
$$ (eq:old2)
64
78
65
-
We shall specify examples in which $\Pi$ and $b$ are such that it typically happens that
79
+
We shall specify examples in which $\Pi$ and $b$ are such that
66
80
67
81
$$
68
-
\Pi c < < b
82
+
\Pi c \ll b
69
83
$$ (eq:bversusc)
70
84
71
-
so that utility function {eq}`eq:old2` tells us that the consumer has much less of each good than he wants.
85
+
This means that the consumer has much less of each good than he wants.
86
+
87
+
The deviation in {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are positive.
72
88
73
-
Condition {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are positive.
74
89
75
90
### Demand Curve Implied by Constrained Utility Maximization
76
91
77
92
For now, we assume that the budget constraint is {eq}`eq:old2`.
78
93
79
94
So we'll be deriving what is known as a **Marshallian** demand curve.
80
95
96
+
Our aim is to maximize [](eq:old0) subject to [](eq:old2).
97
+
81
98
Form a Lagrangian
82
99
83
-
$$ L = -.5 (\Pi c -b)^\top (\Pi c -b ) + \mu [p^\top (e-c)] $$
100
+
$$ L = - \frac{1}{2} (\Pi c -b)^\top (\Pi c -b ) + \mu [p^\top (e-c)] $$
84
101
85
102
where $\mu$ is a Lagrange multiplier that is often called a **marginal utility of wealth**.
86
103
@@ -107,8 +124,13 @@ $$ (eq:old4)
107
124
108
125
Equation {eq}`eq:old4` tells how marginal utility of wealth depends on the endowment vector $e$ and the price vector $p$.
109
126
110
-
**Remark:** Equation {eq}`eq:old4` is a consequence of imposing that $p^\top (c - e) = 0$. We could instead take $\mu$ as a parameter and use {eq}`eq:old3` and the budget constraint {eq}`eq:old2p` to solve for $W.$ Which way we proceed determines whether we are constructing a **Marshallian** or **Hicksian** demand curve.
127
+
```{note}
128
+
Equation {eq}`eq:old4` is a consequence of imposing that $p^\top (c - e) = 0$.
129
+
130
+
We could instead take $\mu$ as a parameter and use {eq}`eq:old3` and the budget constraint {eq}`eq:old2p` to solve for wealth.
111
131
132
+
Which way we proceed determines whether we are constructing a **Marshallian** or **Hicksian** demand curve.
133
+
```
112
134
113
135
## Endowment economy
114
136
@@ -134,52 +156,63 @@ This amounts to choosing a common unit (or numeraire) in which prices of all go
134
156
135
157
We'll set $\mu=1$.
136
158
137
-
**Exercise:** Verify that setting $\mu=1$ in {eq}`eq:old3` implies that formula {eq}`eq:old4` is satisfied.
159
+
```{exercise}
160
+
:label: sdm_ex1
138
161
139
-
**Exercise:** Verify that setting $\mu=2$ in {eq}`eq:old3` also implies that formula {eq}`eq:old4` is satisfied.
162
+
Verify that setting $\mu=1$ in {eq}`eq:old3` implies that formula {eq}`eq:old4` is satisfied.
163
+
164
+
```
165
+
166
+
```{exercise}
167
+
:label: sdm_ex2
168
+
169
+
Verify that setting $\mu=2$ in {eq}`eq:old3` also implies that formula
170
+
{eq}`eq:old4` is satisfied.
171
+
172
+
```
140
173
141
174
142
175
## Digression: Marshallian and Hicksian Demand Curves
143
176
144
-
**Remark:** Sometimes we'll use budget constraint {eq}`eq:old2` in situations in which a consumers's endowment vector $e$ is his **only** source of income. Other times we'll instead assume that the consumer has another source of income (positive or negative) and write his budget constraint as
177
+
Sometimes we'll use budget constraint {eq}`eq:old2` in situations in which a consumers's endowment vector $e$ is his **only** source of income.
178
+
179
+
Other times we'll instead assume that the consumer has another source of income (positive or negative) and write his budget constraint as
145
180
146
181
$$
147
-
p ^\top (c -e ) = W
182
+
p ^\top (c -e ) = w
148
183
$$ (eq:old2p)
149
184
150
-
where $W$ is measured in "dollars" (or some other **numeraire**) and component $p_i$ of the price vector is measured in dollars per unit of good $i$.
185
+
where $w$ is measured in "dollars" (or some other **numeraire**) and component $p_i$ of the price vector is measured in dollars per unit of good $i$.
151
186
152
-
Whether the consumer's budget constraint is {eq}`eq:old2` or {eq}`eq:old2p` and whether we take $W$ as a free parameter or instead as an endogenous variable will affect the consumer's marginal utility of wealth.
187
+
Whether the consumer's budget constraint is {eq}`eq:old2` or {eq}`eq:old2p` and whether we take $w$ as a free parameter or instead as an endogenous variable will affect the consumer's marginal utility of wealth.
153
188
154
189
Consequently, how we set $\mu$ determines whether we are constructing
155
190
156
191
* a **Marshallian** demand curve, as when we use {eq}`eq:old2` and solve for $\mu$ using equation {eq}`eq:old4` below, or
157
-
* a **Hicksian** demand curve, as when we treat $\mu$ as a fixed parameter and solve for $W$ from {eq}`eq:old2p`.
192
+
* a **Hicksian** demand curve, as when we treat $\mu$ as a fixed parameter and solve for $w$ from {eq}`eq:old2p`.
158
193
159
194
Marshallian and Hicksian demand curves contemplate different mental experiments:
160
195
161
-
* For a Marshallian demand curve, hypothetical changes in a price vector have both **substitution** and **income** effects
196
+
For a Marshallian demand curve, hypothetical changes in a price vector have both **substitution** and **income** effects
162
197
163
-
* income effects are consequences of changes in $p^\top e$ associated with the change in the price vector
198
+
* income effects are consequences of changes in $p^\top e$ associated with the change in the price vector
164
199
165
-
* For a Hicksian demand curve, hypothetical price vector changes have only **substitution** effects
200
+
For a Hicksian demand curve, hypothetical price vector changes have only **substitution** effects
166
201
167
-
* changes in the price vector leave the $p^\top e + W$ unaltered because we freeze $\mu$ and solve for $W$
202
+
* changes in the price vector leave the $p^\top e + w$ unaltered because we freeze $\mu$ and solve for $w$
168
203
169
-
Sometimes a Hicksian demand curve is called a **compensated** demand curve in order to emphasize that, to disarm the income (or wealth) effect associated with a price change, the consumer's wealth $W$ is adjusted.
204
+
Sometimes a Hicksian demand curve is called a **compensated** demand curve in order to emphasize that, to disarm the income (or wealth) effect associated with a price change, the consumer's wealth $w$ is adjusted.
170
205
171
206
We'll discuss these distinct demand curves more below.
172
207
173
208
174
209
175
-
## Dynamics and Risk as Special Cases of Pure Exchange Economy
210
+
## Dynamics and Risk as Special Cases
176
211
177
212
Special cases of our $n$-good pure exchange model can be created to represent
178
213
179
-
* dynamics
180
-
- by putting different dates on different commodities
181
-
* risk
182
-
- by interpreting delivery of goods as being contingent on states of the world whose realizations are described by a **known probability distribution**
214
+
* **dynamics** --- by putting different dates on different commodities
215
+
* **risk** --- by interpreting delivery of goods as being contingent on states of the world whose realizations are described by a *known probability distribution*
183
216
184
217
Let's illustrate how.
185
218
@@ -188,7 +221,7 @@ Let's illustrate how.
188
221
Suppose that we want to represent a utility function
0 commit comments