Skip to content

Commit e2e80ac

Browse files
Remove reduntent white spaces
1 parent 6767534 commit e2e80ac

File tree

2 files changed

+59
-65
lines changed

2 files changed

+59
-65
lines changed

lectures/intro_supply_demand.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ many goods.)
2323

2424
We shall describe two classic welfare theorems:
2525

26-
* **first welfare theorem:** for a given distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem.
26+
* **first welfare theorem:** for a given distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem.
2727

2828
* **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.
2929

@@ -46,9 +46,9 @@ import matplotlib.pyplot as plt
4646

4747
## Supply and Demand
4848

49-
We study a market for a single good in which buyers and sellers exchange a quantity $q$ for a price $p$.
49+
We study a market for a single good in which buyers and sellers exchange a quantity $q$ for a price $p$.
5050

51-
Quantity $q$ and price $p$ are both scalars.
51+
Quantity $q$ and price $p$ are both scalars.
5252

5353
We assume that inverse demand and supply curves for the good are:
5454

@@ -64,19 +64,19 @@ We call them inverse demand and supply curves because price is on the left side
6464

6565
### Surpluses and Welfare
6666

67-
We define **consumer surplus** as the area under an inverse demand curve minus $p q$:
67+
We define **consumer surplus** as the area under an inverse demand curve minus $p q$:
6868

6969
$$
7070
\int_0^q (d_0 - d_1 x) dx - pq = d_0 q -.5 d_1 q^2 - pq
7171
$$
7272

73-
We define **producer surplus** as $p q$ minus the area under an inverse supply curve:
73+
We define **producer surplus** as $p q$ minus the area under an inverse supply curve:
7474

7575
$$
7676
p q - \int_0^q (s_0 + s_1 x) dx = pq - s_0 q - .5 s_1 q^2
7777
$$
7878

79-
Sometimes economists measure social welfare by a **welfare criterion** that equals consumer surplus plus producer surplus
79+
Sometimes economists measure social welfare by a **welfare criterion** that equals consumer surplus plus producer surplus
8080

8181
$$
8282
\int_0^q (d_0 - d_1 x) dx - \int_0^q (s_0 + s_1 x) dx \equiv \textrm{Welf}
@@ -88,7 +88,7 @@ $$
8888
\textrm{Welf} = (d_0 - s_0) q - .5 (d_1 + s_1) q^2
8989
$$
9090

91-
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.
91+
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.
9292

9393
We get
9494

@@ -104,7 +104,7 @@ $$ (eq:old1)
104104
105105
Let's remember the quantity $q$ given by equation {eq}`eq:old1` that a social planner would choose to maximize consumer surplus plus producer surplus.
106106
107-
We'll compare it to the quantity that emerges in a competitive equilibrium that equates supply to demand.
107+
We'll compare it to the quantity that emerges in a competitive equilibrium that equates supply to demand.
108108
109109
### Competitive Equilibrium
110110
@@ -124,23 +124,21 @@ supply to demand brings us a **key finding:**
124124
125125
* a competitive equilibrium quantity maximizes our welfare criterion
126126
127-
It also brings a useful **competitive equilibrium computation strategy:**
127+
It also brings a useful **competitive equilibrium computation strategy:**
128128
129-
* 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
129+
* 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
130130
131131
### Generalizations
132132
133-
In later lectures, we'll derive generalizations of the above demand and
134-
supply curves from other objects.
133+
In later lectures, we'll derive generalizations of the above demand and supply curves from other objects.
135134
136-
Our generalizations will extend the preceding analysis of a market for a
137-
single good to the analysis of $n$ simultaneous markets in $n$ goods.
135+
Our generalizations will extend the preceding analysis of a market for a single good to the analysis of $n$ simultaneous markets in $n$ goods.
138136
139137
In addition
140138
141-
* we'll derive **demand curves** from a consumer problem that maximizes a **utility function** subject to a **budget constraint**.
139+
* we'll derive **demand curves** from a consumer problem that maximizes a **utility function** subject to a **budget constraint**.
142140
143-
* 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**.
141+
* 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**.
144142
145143
## Code
146144

lectures/supply_demand_multiple_goods.md

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We study a setting with $n$ goods and $n$ corresponding prices.
88

99
## Formulas from Linear Algebra
1010

11-
We shall apply formulas from linear algebra that
11+
We shall apply formulas from linear algebra that
1212

1313
* differentiate an inner product with respect to each vector
1414
* differentiate a product of a matrix and a vector with respect to the vector
@@ -62,21 +62,21 @@ $$
6262
p^\top (c -e ) = 0
6363
$$ (eq:old2)
6464
65-
We shall specify examples in which $\Pi$ and $b$ are such that it typically happens that
65+
We shall specify examples in which $\Pi$ and $b$ are such that it typically happens that
6666
6767
$$
6868
\Pi c < < b
6969
$$ (eq:bversusc)
7070
71-
so that utility function {eq}`eq:old2` tells us that the consumer has much less of each good than he wants.
71+
so that utility function {eq}`eq:old2` tells us that the consumer has much less of each good than he wants.
7272
73-
Condition {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are positive.
73+
Condition {eq}`eq:bversusc` will ultimately assure us that competitive equilibrium prices are positive.
7474
7575
### Demand Curve Implied by Constrained Utility Maximization
7676
7777
For now, we assume that the budget constraint is {eq}`eq:old2`.
7878
79-
So we'll be deriving what is known as a **Marshallian** demand curve.
79+
So we'll be deriving what is known as a **Marshallian** demand curve.
8080
8181
Form a Lagrangian
8282
@@ -105,20 +105,20 @@ $$
105105
\mu(p,e) = \frac{p^\top ( \Pi^\top \Pi )^{-1} \Pi^\top b - p^\top e}{p^\top (\Pi^\top \Pi )^{-1} p}.
106106
$$ (eq:old4)
107107
108-
Equation {eq}`eq:old4` tells how marginal utility of wealth depends on the endowment vector $e$ and the price vector $p$.
108+
Equation {eq}`eq:old4` tells how marginal utility of wealth depends on the endowment vector $e$ and the price vector $p$.
109109
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.
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.
111111
112112
113113
## Endowment Economy
114114
115-
We now study a pure-exchange economy, or what is sometimes called an endowment economy.
115+
We now study a pure-exchange economy, or what is sometimes called an endowment economy.
116116
117117
Consider a single-consumer, multiple-goods economy without production.
118118
119-
The only source of goods is the single consumer's endowment vector $e$.
119+
The only source of goods is the single consumer's endowment vector $e$.
120120
121-
A competitive equilibrium price vector induces the consumer to choose $c=e$.
121+
A competitive equilibrium price vector induces the consumer to choose $c=e$.
122122
123123
This implies that the equilibrium price vector satisfies
124124
@@ -128,41 +128,41 @@ $$
128128
129129
In the present case where we have imposed budget constraint in the form {eq}`eq:old2`, we are free to normalize the price vector by setting the marginal utility of wealth $\mu =1$ (or any other value for that matter).
130130
131-
This amounts to choosing a common unit (or numeraire) in which prices of all goods are expressed.
131+
This amounts to choosing a common unit (or numeraire) in which prices of all goods are expressed.
132132
133133
(Doubling all prices will affect neither quantities nor relative prices.)
134134
135135
We'll set $\mu=1$.
136136
137-
**Exercise:** Verify that setting $\mu=1$ in {eq}`eq:old3` implies that formula {eq}`eq:old4` is satisfied.
137+
**Exercise:** Verify that setting $\mu=1$ in {eq}`eq:old3` implies that formula {eq}`eq:old4` is satisfied.
138138
139-
**Exercise:** Verify that setting $\mu=2$ in {eq}`eq:old3` also implies that formula {eq}`eq:old4` is satisfied.
139+
**Exercise:** Verify that setting $\mu=2$ in {eq}`eq:old3` also implies that formula {eq}`eq:old4` is satisfied.
140140
141141
142142
## Digression: Marshallian and Hicksian Demand Curves
143143
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
144+
**Remark:** Sometimes we'll use budget constraint {eq}`eq:old2` in situations in which a consumer'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
145145
146146
$$
147147
p ^\top (c -e ) = W
148148
$$ (eq:old2p)
149149
150150
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$.
151151
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.
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.
153153
154-
Consequently, how we set $\mu$ determines whether we are constructing
154+
Consequently, how we set $\mu$ determines whether we are constructing
155155
156156
* 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`.
157+
* a **Hicksian** demand curve, as when we treat $\mu$ as a fixed parameter and solve for $W$ from {eq}`eq:old2p`.
158158
159159
Marshallian and Hicksian demand curves contemplate different mental experiments:
160160
161-
* For a Marshallian demand curve, hypothetical changes in a price vector have both **substitution** and **income** effects
161+
* For a Marshallian demand curve, hypothetical changes in a price vector have both **substitution** and **income** effects
162162
163-
* income effects are consequences of changes in $p^\top e$ associated with the change in the price vector
163+
* income effects are consequences of changes in $p^\top e$ associated with the change in the price vector
164164
165-
* For a Hicksian demand curve, hypothetical price vector changes have only **substitution** effects
165+
* For a Hicksian demand curve, hypothetical price vector changes have only **substitution** effects
166166
167167
* changes in the price vector leave the $p^\top e + W$ unaltered because we freeze $\mu$ and solve for $W$
168168
@@ -174,12 +174,12 @@ We'll discuss these distinct demand curves more below.
174174
175175
## Dynamics and Risk as Special Cases of Pure Exchange Economy
176176
177-
Special cases of our $n$-good pure exchange model can be created to represent
177+
Special cases of our $n$-good pure exchange model can be created to represent
178178
179179
* dynamics
180180
- by putting different dates on different commodities
181181
* risk
182-
- by interpreting delivery of goods as being contingent on states of the world whose realizations are described by a **known probability distribution**
182+
- by interpreting delivery of goods as being contingent on states of the world whose realizations are described by a **known probability distribution**
183183
184184
Let's illustrate how.
185185
@@ -193,7 +193,7 @@ $$
193193
194194
where $\beta \in (0,1)$ is a discount factor, $c_1$ is consumption at time $1$ and $c_2$ is consumption at time 2.
195195
196-
To capture this with our quadratic utility function {eq}`eq:old0`, set
196+
To capture this with our quadratic utility function {eq}`eq:old0`, set
197197
198198
$$
199199
\Pi = \begin{bmatrix} 1 & 0 \cr
@@ -211,7 +211,7 @@ b = \begin{bmatrix} b_1 \cr \sqrt{\beta} b_2
211211
\end{bmatrix}
212212
$$
213213
214-
The budget constraint {eq}`eq:old2` becomes
214+
The budget constraint {eq}`eq:old2` becomes
215215
216216
$$
217217
p_1 c_1 + p_2 c_2 = p_1 e_1 + p_2 e_2
@@ -223,23 +223,23 @@ The right side is the **discounted present value** of the consumer's endowment.
223223
224224
The relative price $\frac{p_1}{p_2}$ has units of time $2$ goods per unit of time $1$ goods.
225225
226-
Consequently, $(1+r) = R \equiv \frac{p_1}{p_2}$ is the **gross interest rate** and $r$ is the **net interest rate**.
226+
Consequently, $(1+r) = R \equiv \frac{p_1}{p_2}$ is the **gross interest rate** and $r$ is the **net interest rate**.
227227
228228
### Risk and State-Contingent Claims
229229
230-
We study risk in the context of a **static** environment, meaning that there is only one period.
230+
We study risk in the context of a **static** environment, meaning that there is only one period.
231231
232232
By **risk** we mean that an outcome is not known in advance, but that it is governed by a known probability distribution.
233233
234234
As an example, our consumer confronts **risk** meaning in particular that
235235
236236
* there are two states of nature, $1$ and $2$.
237237
238-
* the consumer knows that probability that state $1$ occurs is $\lambda$.
238+
* the consumer knows that probability that state $1$ occurs is $\lambda$.
239239
240-
* the consumer knows that the probability that state $2$ occurs is $(1-\lambda)$.
240+
* the consumer knows that the probability that state $2$ occurs is $(1-\lambda)$.
241241
242-
Before the outcome is realized, the the consumer's **expected utility** is
242+
Before the outcome is realized, the consumer's **expected utility** is
243243
244244
$$
245245
-.5 [\lambda (c_1 - b_1)^2 + (1-\lambda)(c_2 - b_2)^2]
@@ -261,16 +261,12 @@ $$
261261
c = \begin{bmatrix} c_1 \cr c_2 \end{bmatrix}
262262
$$
263263
264-
$$
265-
b = \begin{bmatrix} b_1 \cr b_2 \end{bmatrix}
266-
$$
267-
268264
<!-- #region -->
269265
$$
270266
b = \begin{bmatrix} \sqrt{\lambda}b_1 \cr \sqrt{1-\lambda}b_2 \end{bmatrix}
271267
$$
272268
273-
A consumer's endowment vector is
269+
A consumer's endowment vector is
274270
275271
$$
276272
e = \begin{bmatrix} e_1 \cr e_2 \end{bmatrix}
@@ -286,9 +282,9 @@ where $p_i$ is the price of one unit of consumption in state $i$.
286282
287283
The state-contingent goods being traded are often called **Arrow securities**.
288284
289-
Before the random state of the world $i$ is realized, the consumer sells his/her state-contingent endowment bundle and purchases a state-contingent consumption bundle.
285+
Before the random state of the world $i$ is realized, the consumer sells his/her state-contingent endowment bundle and purchases a state-contingent consumption bundle.
290286
291-
Trading such state-contingent goods is one way economists often model **insurance**.
287+
Trading such state-contingent goods is one way economists often model **insurance**.
292288
293289
## Exercises We Can Do
294290
@@ -306,23 +302,23 @@ Up to now we have described a pure exchange economy in which endowments of good
306302
307303
### Supply Curve of a Competitive Firm
308304
309-
A competitive firm that can produce goods takes a price vector $p$ as given and chooses a quantity $q$
305+
A competitive firm that can produce goods takes a price vector $p$ as given and chooses a quantity $q$
310306
to maximize total revenue minus total costs.
311307
312-
The firm's total revenue equals $p^\top q$ and its total cost equals $C(q)$ where $C(q)$ is a total cost function
308+
The firm's total revenue equals $p^\top q$ and its total cost equals $C(q)$ where $C(q)$ is a total cost function
313309
314310
$$
315311
C(q) = h ^\top q + .5 q^\top J q
316312
$$
317313
318314
319-
and $J$ is a positive definite matrix.
315+
and $J$ is a positive definite matrix.
320316
321317
322318
So the firm's profits are
323319
324320
$$
325-
p^\top q - C(q)
321+
p^\top q - C(q)
326322
$$ (eq:compprofits)
327323
328324
@@ -344,7 +340,7 @@ An $n \times 1$ vector of marginal revenues for the price-taking firm is $\frac{
344340
345341
So **price equals marginal revenue** for our price-taking competitive firm.
346342
347-
The firm maximizes total profits by setting **marginal revenue to marginal costs**.
343+
The firm maximizes total profits by setting **marginal revenue to marginal costs**.
348344
349345
This leads to the following **inverse supply curve** for the competitive firm:
350346
@@ -360,9 +356,9 @@ $$
360356
361357
#### $\mu=1$ Warmup
362358
363-
As a special case, let's pin down a demand curve by setting the marginal utility of wealth $\mu =1$.
359+
As a special case, let's pin down a demand curve by setting the marginal utility of wealth $\mu =1$.
364360
365-
Equating supply price to demand price we get
361+
Equating supply price to demand price we get
366362
367363
$$
368364
p = h + H c = \Pi^\top b - \Pi^\top \Pi c ,
@@ -404,10 +400,10 @@ setting quantity.
404400
405401
A monopolist takes a **demand curve** and not the **price** as beyond its control.
406402
407-
Thus, instead of being a price-taker, a monopolist sets prices to maximize profits subject to the inverse demand curve
403+
Thus, instead of being a price-taker, a monopolist sets prices to maximize profits subject to the inverse demand curve
408404
{eq}`eq:old5pa`.
409405
410-
So the monopolist's total profits as a function of its output $q$ is
406+
So the monopolist's total profits as a function of its output $q$ is
411407
412408
$$
413409
[\mu^{-1} \Pi^\top (b - \Pi q)]^\top q - h^\top q - .5 q^\top J q
@@ -421,21 +417,21 @@ $$
421417
q = (H + 2 \mu^{-1} \Pi^\top \Pi)^{-1} (\mu^{-1} \Pi^\top b - h)
422418
$$ (eq:qmonop)
423419
424-
We'll soon see that a monopolist sets a **lower output** $q$ than does either a
420+
We'll soon see that a monopolist sets a **lower output** $q$ than does either a
425421
426422
* planner who chooses $q$ to maximize social welfare
427423
428424
* a competitive equilibrium
429425
430426
431-
**Exercise:** Please verify the monopolist's supply curve {eq}`eq:qmonop`.
427+
**Exercise:** Please verify the monopolist's supply curve {eq}`eq:qmonop`.
432428
433429
434430
435431
436432
## Multi-Good Welfare Maximization Problem
437433
438-
Our welfare maximization problem -- also sometimes called a social planning problem -- is to choose $c$ to maximize
434+
Our welfare maximization problem -- also sometimes called a social planning problem -- is to choose $c$ to maximize
439435
440436
$$
441437
-.5 \mu^{-1}(\Pi c -b) ^\top (\Pi c -b )
@@ -463,7 +459,7 @@ $$
463459
464460
which implies {eq}`eq:old5p`.
465461
466-
Thus, as for the single-good case, with multiple goods a competitive equilibrium quantity vector solves a planning problem.
462+
Thus, as for the single-good case, with multiple goods a competitive equilibrium quantity vector solves a planning problem.
467463
468464
(This is another version of the first welfare theorem.)
469465

0 commit comments

Comments
 (0)