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
Copy file name to clipboardExpand all lines: lectures/intro_supply_demand.md
+14-34Lines changed: 14 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ from collections import namedtuple
64
64
65
65
Before we look at the model of supply and demand, it will be helpful to have some background on (a) consumer and producer surpluses and (b) integration.
66
66
67
-
(If you are comfortable with both topics you can jump to the next section.)
67
+
(If you are comfortable with both topics you can jump to the {ref}`next section <integration>`.)
68
68
69
69
### A discrete example
70
70
@@ -277,6 +277,7 @@ ax.legend()
277
277
plt.show()
278
278
```
279
279
280
+
(integration)=
280
281
## Integration
281
282
282
283
How can we calculate the consumer and producer surplus in the continuous case?
@@ -357,7 +358,7 @@ $$
357
358
358
359
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.
359
360
360
-
We can use a [namedtuple](https://docs.python.org/3/library/collections.html#collections.namedtuple) to store the parameters for our single good market.
361
+
We can use a [namedtuple](https://docs.python.org/3/library/collections.html#collections.namedtuple) to store the parameters for our single good market.
The next figure plots welfare as a function of $q$.
@@ -655,35 +654,20 @@ All parameters are positive, as before.
655
654
```{exercise}
656
655
:label: isd_ex1
657
656
658
-
Define a new `Market` class that holds the same parameter values as before by
659
-
changing the `inverse_demand` and `inverse_supply` methods to
660
-
match these new definitions.
657
+
Use the same `Market` namedtuple that holds the parameter values as before but
658
+
make new `inverse_demand` and `inverse_supply` functions to match these new definitions.
661
659
662
-
Using the class, plot the inverse demand and supply curves $i_d$ and $i_s$
660
+
Then plot the inverse demand and supply curves $i_d$ and $i_s$.
663
661
664
662
```
665
663
666
-
667
664
```{solution-start} isd_ex1
668
665
:class: dropdown
669
666
```
670
667
671
-
Let us make use of a [namedtuple](https://docs.python.org/3/library/collections.html#collections.namedtuple) container provided by Python to hold the parameters of the Market.
0 commit comments