Skip to content

Commit

Permalink
Tom's edtis of two demand-supply lectures
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassargent30 committed Jul 5, 2023
1 parent 6030b83 commit e7f0cc5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 24 deletions.
40 changes: 17 additions & 23 deletions lectures/intro_supply_demand.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,26 @@ the main topics of elementary microeconomics.

Throughout the lecture, we focus on models with one good and one price.

({doc}`Later <supply_demand_multiple_goods>` we will investigate settings with
many goods.)

In a {doc}`subsequent lecture <supply_demand_multiple_goods>` we will investigate settings with
many goods.

Key infrastructure concepts that we'll encounter in this lecture are

* inverse demand curves
* marginal utilities of wealth
* inverse supply curves
* consumer surplus
* producer surplus
* social welfare as a sum of consumer and producer surpluses
* competitive equilibrium


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
* social welfare as the sum of consumer and producer surpluses
* relationship between equilibrium quantity and social welfare optimum

* [Leon Walras](https://en.wikipedia.org/wiki/L%C3%A9on_Walras)
* [Francis Ysidro Edgeworth](https://en.wikipedia.org/wiki/Francis_Ysidro_Edgeworth)
* [Vilfredo Pareto](https://en.wikipedia.org/wiki/Vilfredo_Pareto)
Throughout the lectures, we'll assume that inverse demand and supply curves are **affine** functions of output.

Important extensions to the key ideas were obtained by
("Affine" means "linear plus a constant".)

* [Abba Lerner](https://en.wikipedia.org/wiki/Abba_P._Lerner)
* [Harold Hotelling](https://en.wikipedia.org/wiki/Harold_Hotelling)
* [Paul Samuelson](https://en.wikipedia.org/wiki/Paul_Samuelson)
* [Kenneth Arrow](https://en.wikipedia.org/wiki/Kenneth_Arrow)
* [Gerard Debreu](https://en.wikipedia.org/wiki/G%C3%A9rard_Debreu)
We'll also assume affine inverse supply and demand functions when we study models with multiple consumption goods in our {doc}`subsequent lecture <supply_demand_multiple_goods>`.

We do this in order to simplify the exposition and enable us to use just a few tools from linear algebra, namely, matrix multiplication and matrix inversion.

In our exposition we will use the following imports.

Expand Down Expand Up @@ -98,6 +90,8 @@ class Market:
```



Let's create an instance.

```{code-cell} ipython3
Expand Down Expand Up @@ -128,7 +122,7 @@ ax.set_ylabel('price')
plt.show()
```


In the above graph, an **equilibrium** price, quantity pair occurs at the intersection of the supply and demand curves.

### Consumer surplus

Expand Down Expand Up @@ -175,12 +169,12 @@ plt.show()
```


Consumer surplus gives a measure of total consumer welfare at quantity $q$.
Consumer surplus provides a measure of total consumer welfare at quantity $q$.

The idea is that the inverse demand curve $d_0 - d_1 q$ shows willingness to
pay at a given quantity $q$.
The idea is that the inverse demand curve $d_0 - d_1 q$ shows a consumer's willingness to
pay for an additional increment of the good at a given quantity $q$.

The difference between willingness to pay and the actual price is the surplus.
The difference between willingness to pay and the actual price is consumer surplus.

The value $S_c(q)$ is the "sum" (i.e., integral) of these surpluses when the total
quantity purchased is $q$ and the purchase price is $p$.
Expand Down Expand Up @@ -245,7 +239,7 @@ The idea is similar to that of consumer surplus.
The inverse supply curve $s_0 + s_1 q$ shows the price at which producers are
prepared to sell, given quantity $q$.

The difference between willingness to sell and the actual price is the surplus.
The difference between willingness to sell and the actual price is producer surplus.

The value $S_p(q)$ is the integral of these surpluses.

Expand Down
30 changes: 29 additions & 1 deletion lectures/supply_demand_multiple_goods.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,44 @@ kernelspec:
## Overview

In a {doc}`previous lecture <intro_supply_demand>` we studied supply, demand
and welfare in a market with just one good.
and welfare in a market with a single consumption good.

In this lecture, we study a setting with $n$ goods and $n$ corresponding prices.

Key infrastructure concepts that we'll encounter in this lecture are

* inverse demand curves
* marginal utilities of wealth
* inverse supply curves
* consumer surplus
* producer surplus
* social welfare as a sum of consumer and producer surpluses
* competitive equilibrium


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

* [Leon Walras](https://en.wikipedia.org/wiki/L%C3%A9on_Walras)
* [Francis Ysidro Edgeworth](https://en.wikipedia.org/wiki/Francis_Ysidro_Edgeworth)
* [Vilfredo Pareto](https://en.wikipedia.org/wiki/Vilfredo_Pareto)

Important extensions to the key ideas were obtained by

* [Abba Lerner](https://en.wikipedia.org/wiki/Abba_P._Lerner)
* [Harold Hotelling](https://en.wikipedia.org/wiki/Harold_Hotelling)
* [Paul Samuelson](https://en.wikipedia.org/wiki/Paul_Samuelson)
* [Kenneth Arrow](https://en.wikipedia.org/wiki/Kenneth_Arrow)
* [Gerard Debreu](https://en.wikipedia.org/wiki/G%C3%A9rard_Debreu)


We shall describe two classic welfare theorems:

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

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

As usual, we start by importing some Python modules.

```{code-cell} ipython3
# import some packages
import numpy as np
Expand Down

1 comment on commit e7f0cc5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.