Skip to content

Commit 5f66cd4

Browse files
Fix minor layout issues
1 parent e2e80ac commit 5f66cd4

File tree

1 file changed

+78
-48
lines changed

1 file changed

+78
-48
lines changed

lectures/supply_demand_heterogeneity.md

Lines changed: 78 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ There are two consumers who differ in their endowment vectors $e_i$ and their bl
99

1010
The total endowment is $e_1 + e_2$.
1111

12-
A competitive equilibrium requires that
12+
A competitive equilibrium requires that
1313

1414
$$
1515
c_1 + c_2 = e_1 + e_2
@@ -21,7 +21,7 @@ $$
2121
c_i = (\Pi^\top \Pi )^{-1}(\Pi^\top b_i - \mu_i p )
2222
$$
2323

24-
Competitive equilibrium then requires that
24+
Competitive equilibrium then requires that
2525

2626
$$
2727
e_1 + e_2 =
@@ -42,7 +42,7 @@ $$ (eq:old7)
4242
4343
for $\mu_i, i = 1,2$.
4444
45-
**Exercise:** Show that, up to normalization by a positive scalar, the same competitive equilibrium price vector that you computed in the preceding two-consumer economy would prevail in a single-consumer economy in which a single **representative consumer** has utility function
45+
**Exercise:** Show that, up to normalization by a positive scalar, the same competitive equilibrium price vector that you computed in the preceding two-consumer economy would prevail in a single-consumer economy in which a single **representative consumer** has utility function
4646
4747
$$
4848
-.5 (\Pi c -b) ^\top (\Pi c -b )
@@ -75,19 +75,19 @@ Below we shall construct a Python class with the following attributes:
7575
* an $n \times 1$ vector $e$
7676
* a scalar "wealth" $W$ with default value $0$
7777
78-
* **Production Costs** pinned down by
78+
* **Production Costs** pinned down by
7979
8080
* an $n \times 1$ nonnegative vector $h$
8181
* an $n \times n$ positive definite matrix $J$
8282
83-
The class will include a test to make sure that $b > > \Pi e $ and raise an exception if it is violated
83+
The class will include a test to make sure that $b > > \Pi e $ and raise an exception if it is violated
8484
(at some threshold level we'd have to specify).
8585
8686
* **A Person** in the form of a pair that consists of
8787
8888
* **Preferences** and **Endowments**
8989
90-
* **A Pure Exchange Economy** will consist of
90+
* **A Pure Exchange Economy** will consist of
9191
9292
* a collection of $m$ **persons**
9393
@@ -131,13 +131,18 @@ To compute a competitive equilibrium of a pure exchange economy, we use the fact
131131
132132
We can use the following steps to compute a competitive equilibrium:
133133
134-
- First, we solve the single representative consumer economy by normalizing $\mu = 1$. Then, we renormalize the price vector by using the first consumption good as numeraire.
134+
- First we solve the single representative consumer economy by normalizing $\mu = 1$. Then, we renormalize the price vector by using the first consumption good as numeraire.
135135
136-
- Next, we use the competitive equilibrium prices to compute each consumer's marginal utility of wealth:
137-
$$ \mu_{i}=\frac{-W_{i}+p^{\top}\left(\Pi^{-1}b_{i}-e_{i}\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}.$$
136+
- Next we use the competitive equilibrium prices to compute each consumer's marginal utility of wealth:
138137
139-
- Finally, we compute a competitive equilibrium allocation by using the demand curves:
140-
$$ c_{i}=\Pi^{-1}b_{i}-(\Pi^{\top}\Pi)^{-1}\mu_{i}p. $$
138+
$$
139+
\mu_{i}=\frac{-W_{i}+p^{\top}\left(\Pi^{-1}b_{i}-e_{i}\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}$$
140+
141+
- Finally we compute a competitive equilibrium allocation by using the demand curves:
142+
143+
$$
144+
c_{i}=\Pi^{-1}b_{i}-(\Pi^{\top}\Pi)^{-1}\mu_{i}p
145+
$$
141146

142147

143148

@@ -148,30 +153,46 @@ exists a single **representative consumer** whose preferences and endowments can
148153

149154
Consider a multiple consumer economy with initial distribution of wealth $W_i$ satisfying $\sum_i W_{i}=0$
150155

151-
We allow an initial redistribution of wealth.
156+
We allow an initial redistribution of wealth.
152157

153158
We have the following objects
154159

155160

156161
- The demand curve:
157-
$$ c_{i}=\Pi^{-1}b_{i}-(\Pi^{\top}\Pi)^{-1}\mu_{i}p $$
162+
163+
$$
164+
c_{i}=\Pi^{-1}b_{i}-(\Pi^{\top}\Pi)^{-1}\mu_{i}p
165+
$$
158166

159167
- The marginal utility of wealth:
160-
$$ \mu_{i}=\frac{-W_{i}+p^{\top}\left(\Pi^{-1}b_{i}-e_{i}\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}$$
168+
169+
$$
170+
\mu_{i}=\frac{-W_{i}+p^{\top}\left(\Pi^{-1}b_{i}-e_{i}\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}
171+
$$
161172

162173
- Market clearing:
163-
$$ \sum c_{i}=\sum e_{i}$$
174+
175+
$$
176+
\sum c_{i}=\sum e_{i}
177+
$$
164178

165179
Denote aggregate consumption $\sum_i c_{i}=c$ and $\sum_i \mu_i = \mu$.
166180

167-
Market clearing requires
181+
Market clearing requires
168182

169-
$$ \Pi^{-1}\left(\sum_{i}b_{i}\right)-(\Pi^{\top}\Pi)^{-1}p\left(\sum_{i}\mu_{i}\right)=\sum_{i}e_{i}$$
183+
$$
184+
\Pi^{-1}\left(\sum_{i}b_{i}\right)-(\Pi^{\top}\Pi)^{-1}p\left(\sum_{i}\mu_{i}\right)=\sum_{i}e_{i}
185+
$$
170186
which, after a few steps, leads to
171-
$$p=\mu^{-1}\left(\Pi^{\top}b-\Pi^{\top}\Pi e\right)$$
187+
188+
$$
189+
p=\mu^{-1}\left(\Pi^{\top}b-\Pi^{\top}\Pi e\right)
190+
$$
172191

173192
where
174-
$$ \mu = \sum_i\mu_{i}=\frac{0 + p^{\top}\left(\Pi^{-1}b-e\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}.
193+
194+
$$
195+
\mu = \sum_i\mu_{i}=\frac{0 + p^{\top}\left(\Pi^{-1}b-e\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}.
175196
$$
176197

177198
Now consider the representative consumer economy specified above.
@@ -180,15 +201,23 @@ Denote the marginal utility of wealth of the representative consumer by $\tilde{
180201

181202
The demand function is
182203

183-
$$c=\Pi^{-1}b-(\Pi^{\top}\Pi)^{-1}\tilde{\mu} p.$$
204+
$$
205+
c=\Pi^{-1}b-(\Pi^{\top}\Pi)^{-1}\tilde{\mu} p
206+
$$
184207

185208
Substituting this into the budget constraint gives
186-
$$\tilde{\mu}=\frac{p^{\top}\left(\Pi^{-1}b-e\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}.$$
209+
210+
$$
211+
\tilde{\mu}=\frac{p^{\top}\left(\Pi^{-1}b-e\right)}{p^{\top}(\Pi^{\top}\Pi)^{-1}p}
212+
$$
187213

188214
In an equilibrium $c=e$, so
189-
$$p=\tilde{\mu}^{-1}(\Pi^{\top}b-\Pi^{\top}\Pi e).$$
190215

191-
Thus, we have verified that, up to choice of a numeraire in which to express absolute prices, the price vector in our representative consumer economy is the same as that in an underlying economy with multiple consumers.
216+
$$
217+
p=\tilde{\mu}^{-1}(\Pi^{\top}b-\Pi^{\top}\Pi e)
218+
$$
219+
220+
Thus, we have verified that, up to choice of a numeraire in which to express absolute prices, the price vector in our representative consumer economy is the same as that in an underlying economy with multiple consumers.
192221
<!-- #endregion -->
193222

194223
```python
@@ -330,7 +359,7 @@ print('Competitive equilibrium price vector:', p)
330359
print('Competitive equilibrium allocation:', c_s)
331360
```
332361

333-
Now let's redistribute endowments before trade.
362+
Now let's redistribute endowments before trade.
334363

335364
```python
336365
bs = [np.array([5, 5]), # first consumer's bliss points
@@ -400,7 +429,7 @@ print('Competitive equilibrium allocation:', c_s)
400429

401430
To compute a competitive equilibrium for a production economy where demand curve is pinned down by the marginal utility of wealth $\mu$, we first compute an allocation by solving a planning problem.
402431

403-
Then we compute the equilibrium price vector using the inverse demand or supply curve.
432+
Then we compute the equilibrium price vector using the inverse demand or supply curve.
404433

405434

406435
```python
@@ -531,9 +560,9 @@ def plot_competitive_equilibrium(PE):
531560
Now let's construct an example of a production economy with one good.
532561

533562
To do this we
563+
<!-- TODO -->
564+
* specify a single **person** and a **cost curve** in a way that let's us replicate the simple single-good supply demand example with which we started
534565

535-
* specify a single **person** and a **cost curve** in a way that let's us replicate the simple
536-
single-good supply demand example with which we started
537566
* compute equilibrium $p$ and $c$ and consumer and producer surpluses
538567

539568
* draw graphs of both surpluses
@@ -584,7 +613,7 @@ print('Consumer surplus:', c_surplus.item())
584613
print('Producer surplus:', p_surplus.item())
585614
```
586615

587-
Now we change the bliss point so that the consumer derives more utility from consumption.
616+
Now we change the bliss point so that the consumer derives more utility from consumption.
588617

589618
```python
590619
PE.mu = 1
@@ -604,7 +633,8 @@ This raises both the equilibrium price and quantity.
604633
#### Example: Single Agent Two-Good Economy **with** Production
605634

606635
* we'll do some experiments like those above
607-
* we can do experiments with a **diagonal** $\Pi$ and also with a **non-diagonal** $\Pi$ matrices to study how cross-slopes affect responses of $p$ and $c$ to various shifts in $b$
636+
637+
* we can do experiments with a **diagonal** $\Pi$ and also with a **non-diagonal** $\Pi$ matrices to study how cross-slopes affect responses of $p$ and $c$ to various shifts in $b$
608638

609639

610640
```python
@@ -625,7 +655,7 @@ print('Competitive equilibrium allocation:', c)
625655
```
626656

627657
```python
628-
PE.b = np.array([12, 10])
658+
PE.b = np.array([12, 10])
629659

630660
c, p = PE.competitive_equilibrium()
631661

@@ -634,12 +664,12 @@ print('Competitive equilibrium allocation:', c)
634664
```
635665

636666
```python
637-
Pi = np.array([[1, 0.5],
667+
Pi = np.array([[1, 0.5],
638668
[0.5, 1]])
639-
b = np.array([10, 10])
669+
b = np.array([10, 10])
640670

641-
h = np.array([0.5, 0.5])
642-
J = np.array([[1, 0.5],
671+
h = np.array([0.5, 0.5])
672+
J = np.array([[1, 0.5],
643673
[0.5, 1]])
644674
mu = 1
645675

@@ -660,30 +690,30 @@ print('Competitive equilibrium allocation:', c)
660690

661691
### A Monopolist
662692

663-
Let's consider a monopolist supplier.
693+
Let's consider a monopolist supplier.
664694

665-
We have included a method in our `productionEconomy` class to compute an equilibrium price and allocation when the supplier is a monopolist.
695+
We have included a method in our `productionEconomy` class to compute an equilibrium price and allocation when the supplier is a monopolist.
666696

667697
Since the supplier now has the price-setting power
668698

669699
- we first compute the optimal quantity that solves the monopolist's profit maximization problem.
670-
- Then we back out an equilibrium price from the consumer's inverse demand curve.
700+
- Then we back out an equilibrium price from the consumer's inverse demand curve.
671701

672702
Next, we use a graph for the single good case to illustrate the difference between a competitive equilibrium and an equilibrium with a monopolist supplier.
673703

674-
Recall that in a competitive equilibrium, a price-taking supplier equates marginal revenue $p$ to marginal cost $h + Hq$.
704+
Recall that in a competitive equilibrium, a price-taking supplier equates marginal revenue $p$ to marginal cost $h + Hq$.
675705

676-
This yields a competitive producer's inverse supply curve.
706+
This yields a competitive producer's inverse supply curve.
677707

678-
A monopolist's marginal revenue is not constant but instead is a non-trivial function of the quantity it sets.
708+
A monopolist's marginal revenue is not constant but instead is a non-trivial function of the quantity it sets.
679709

680710
The monopolist's marginal revenue is
681711

682712
$$
683713
MR(q) = -2\mu^{-1}\Pi^{\top}\Pi q+\mu^{-1}\Pi^{\top}b,
684714
$$
685715

686-
which the monopolist equates to its marginal cost.
716+
which the monopolist equates to its marginal cost.
687717

688718
The plot indicates that the monopolist's sets output lower than either the competitive equilibrium quantity.
689719

@@ -711,14 +741,14 @@ def plot_monopoly(PE):
711741

712742
# inverse supply/demand curve
713743
marg_cost = lambda x: h + H*x
714-
marg_rev = lambda x: -2*1/mu*Pi*Pi*x + 1/mu*Pi*b
744+
marg_rev = lambda x: -2*1/mu*Pi*Pi*x + 1/mu*Pi*b
715745
demand_inv = lambda x: 1/mu*(Pi*b - Pi*Pi*x)
716746

717747
xs = np.linspace(0, 2*c, 100)
718748
pms = np.ones(100) * pm
719749
marg_cost_curve = marg_cost(xs)
720-
marg_rev_curve = marg_rev(xs)
721-
demand_curve = demand_inv(xs)
750+
marg_rev_curve = marg_rev(xs)
751+
demand_curve = demand_inv(xs)
722752

723753
# plot
724754
plt.figure(figsize=[7,5])
@@ -773,10 +803,10 @@ print('Equilibrium with monopolist supplier allocation:', q)
773803
#### A Single-Good Example
774804

775805
```python
776-
Pi = np.array([[1]]) # the matrix now is a singleton
777-
b = np.array([10])
778-
h = np.array([0.5])
779-
J = np.array([[1]])
806+
Pi = np.array([[1]]) # the matrix now is a singleton
807+
b = np.array([10])
808+
h = np.array([0.5])
809+
J = np.array([[1]])
780810
mu = 1
781811

782812
PE = ProductionEconomy(Pi, b, h, J, mu)

0 commit comments

Comments
 (0)