my-markdown-library 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/F24LS_md/ Lecture 4 - Public.md +347 -0
- data/F24LS_md/Lecture 1 - Introduction and Overview.md +327 -0
- data/F24LS_md/Lecture 10 - Development_.md +631 -0
- data/F24LS_md/Lecture 11 - Econometrics.md +345 -0
- data/F24LS_md/Lecture 12 - Finance.md +692 -0
- data/F24LS_md/Lecture 13 - Environmental Economics.md +299 -0
- data/F24LS_md/Lecture 15 - Conclusion.md +272 -0
- data/F24LS_md/Lecture 2 - Demand.md +349 -0
- data/F24LS_md/Lecture 3 - Supply.md +329 -0
- data/F24LS_md/Lecture 5 - Production C-D.md +291 -0
- data/F24LS_md/Lecture 6 - Utility and Latex.md +440 -0
- data/F24LS_md/Lecture 7 - Inequality.md +607 -0
- data/F24LS_md/Lecture 8 - Macroeconomics.md +704 -0
- data/F24LS_md/Lecture 8 - Macro.md +700 -0
- data/F24LS_md/Lecture 9 - Game Theory_.md +436 -0
- data/F24LS_md/summary.yaml +105 -0
- data/F24Lec_MD/LecNB_summary.yaml +206 -0
- data/F24Lec_MD/lec01/lec01.md +267 -0
- data/F24Lec_MD/lec02/Avocados_demand.md +425 -0
- data/F24Lec_MD/lec02/Demand_Steps_24.md +126 -0
- data/F24Lec_MD/lec02/PriceElasticity.md +83 -0
- data/F24Lec_MD/lec02/ScannerData_Beer.md +171 -0
- data/F24Lec_MD/lec02/demand-curve-Fa24.md +213 -0
- data/F24Lec_MD/lec03/3.0-CubicCostCurve.md +239 -0
- data/F24Lec_MD/lec03/3.1-Supply.md +274 -0
- data/F24Lec_MD/lec03/3.2-sympy.md +332 -0
- data/F24Lec_MD/lec03/3.3a-california-energy.md +120 -0
- data/F24Lec_MD/lec03/3.3b-a-really-hot-tuesday.md +121 -0
- data/F24Lec_MD/lec04/lec04-CSfromSurvey-closed.md +335 -0
- data/F24Lec_MD/lec04/lec04-CSfromSurvey.md +331 -0
- data/F24Lec_MD/lec04/lec04-Supply-Demand-closed.md +519 -0
- data/F24Lec_MD/lec04/lec04-Supply-Demand.md +514 -0
- data/F24Lec_MD/lec04/lec04-four-plot-24.md +34 -0
- data/F24Lec_MD/lec04/lec04-four-plot.md +34 -0
- data/F24Lec_MD/lec05/Lec5-Cobb-Douglas.md +131 -0
- data/F24Lec_MD/lec05/Lec5-CobbD-AER1928.md +283 -0
- data/F24Lec_MD/lec06/6.1-Sympy-Differentiation.md +253 -0
- data/F24Lec_MD/lec06/6.2-3D-utility.md +287 -0
- data/F24Lec_MD/lec06/6.3-QuantEcon-Optimization.md +399 -0
- data/F24Lec_MD/lec06/6.4-latex.md +138 -0
- data/F24Lec_MD/lec06/6.5-Edgeworth.md +269 -0
- data/F24Lec_MD/lec07/7.1-inequality.md +283 -0
- data/F24Lec_MD/lec07/7.2-historical-inequality.md +237 -0
- data/F24Lec_MD/lec08/macro-fred-api.md +313 -0
- data/F24Lec_MD/lec09/lecNB-prisoners-dilemma.md +88 -0
- data/F24Lec_MD/lec10/Lec10.2-waterguard.md +401 -0
- data/F24Lec_MD/lec10/lec10.1-mapping.md +199 -0
- data/F24Lec_MD/lec11/11.1-slr.md +305 -0
- data/F24Lec_MD/lec11/11.2-mlr.md +171 -0
- data/F24Lec_MD/lec12/Lec12-4-PersonalFinance.md +590 -0
- data/F24Lec_MD/lec12/lec12-1_Interest_Payments.md +267 -0
- data/F24Lec_MD/lec12/lec12-2-stocks-options.md +235 -0
- data/F24Lec_MD/lec13/Co2_ClimateChange.md +139 -0
- data/F24Lec_MD/lec13/ConstructingMAC.md +213 -0
- data/F24Lec_MD/lec13/EmissionsTracker.md +170 -0
- data/F24Lec_MD/lec13/KuznetsHypothesis.md +219 -0
- data/F24Lec_MD/lec13/RoslingPlots.md +217 -0
- data/F24Lec_MD/lec15/vibecession.md +485 -0
- data/F24Textbook_MD/00-intro/index.md +292 -0
- data/F24Textbook_MD/01-demand/01-demand.md +152 -0
- data/F24Textbook_MD/01-demand/02-example.md +131 -0
- data/F24Textbook_MD/01-demand/03-log-log.md +284 -0
- data/F24Textbook_MD/01-demand/04-elasticity.md +248 -0
- data/F24Textbook_MD/01-demand/index.md +15 -0
- data/F24Textbook_MD/02-supply/01-supply.md +203 -0
- data/F24Textbook_MD/02-supply/02-eep147-example.md +86 -0
- data/F24Textbook_MD/02-supply/03-sympy.md +138 -0
- data/F24Textbook_MD/02-supply/04-market-equilibria.md +204 -0
- data/F24Textbook_MD/02-supply/index.md +16 -0
- data/F24Textbook_MD/03-public/govt-intervention.md +73 -0
- data/F24Textbook_MD/03-public/index.md +10 -0
- data/F24Textbook_MD/03-public/surplus.md +351 -0
- data/F24Textbook_MD/03-public/taxes-subsidies.md +282 -0
- data/F24Textbook_MD/04-production/index.md +15 -0
- data/F24Textbook_MD/04-production/production.md +178 -0
- data/F24Textbook_MD/04-production/shifts.md +296 -0
- data/F24Textbook_MD/05-utility/budget-constraints.md +166 -0
- data/F24Textbook_MD/05-utility/index.md +15 -0
- data/F24Textbook_MD/05-utility/utility.md +136 -0
- data/F24Textbook_MD/06-inequality/historical-inequality.md +253 -0
- data/F24Textbook_MD/06-inequality/index.md +15 -0
- data/F24Textbook_MD/06-inequality/inequality.md +226 -0
- data/F24Textbook_MD/07-game-theory/bertrand.md +257 -0
- data/F24Textbook_MD/07-game-theory/cournot.md +333 -0
- data/F24Textbook_MD/07-game-theory/equilibria-oligopolies.md +96 -0
- data/F24Textbook_MD/07-game-theory/expected-utility.md +61 -0
- data/F24Textbook_MD/07-game-theory/index.md +19 -0
- data/F24Textbook_MD/07-game-theory/python-classes.md +340 -0
- data/F24Textbook_MD/08-development/index.md +35 -0
- data/F24Textbook_MD/09-macro/CentralBanks.md +101 -0
- data/F24Textbook_MD/09-macro/Indicators.md +77 -0
- data/F24Textbook_MD/09-macro/fiscal_policy.md +36 -0
- data/F24Textbook_MD/09-macro/index.md +14 -0
- data/F24Textbook_MD/09-macro/is_curve.md +76 -0
- data/F24Textbook_MD/09-macro/phillips_curve.md +70 -0
- data/F24Textbook_MD/10-finance/index.md +10 -0
- data/F24Textbook_MD/10-finance/options.md +178 -0
- data/F24Textbook_MD/10-finance/value-interest.md +60 -0
- data/F24Textbook_MD/11-econometrics/index.md +16 -0
- data/F24Textbook_MD/11-econometrics/multivariable.md +218 -0
- data/F24Textbook_MD/11-econometrics/reading-econ-papers.md +25 -0
- data/F24Textbook_MD/11-econometrics/single-variable.md +483 -0
- data/F24Textbook_MD/11-econometrics/statsmodels.md +58 -0
- data/F24Textbook_MD/12-environmental/KuznetsHypothesis-Copy1.md +187 -0
- data/F24Textbook_MD/12-environmental/KuznetsHypothesis.md +187 -0
- data/F24Textbook_MD/12-environmental/MAC.md +254 -0
- data/F24Textbook_MD/12-environmental/index.md +36 -0
- data/F24Textbook_MD/LICENSE.md +11 -0
- data/F24Textbook_MD/intro.md +26 -0
- data/F24Textbook_MD/references.md +25 -0
- data/F24Textbook_MD/summary.yaml +414 -0
- metadata +155 -0
@@ -0,0 +1,349 @@
|
|
1
|
+
---
|
2
|
+
title: "Lecture 2 - Demand"
|
3
|
+
type: slides
|
4
|
+
week: 2
|
5
|
+
source_path: "/Users/ericvandusen/Documents/Data88E-ForTraining/F24LS/Lecture 2 - Demand.pptx"
|
6
|
+
---
|
7
|
+
|
8
|
+
## Slide 1: Data 88E: Economic Models
|
9
|
+
|
10
|
+
- Lecture 2: Demand & Elasticity
|
11
|
+
|
12
|
+
## Slide 2: Logistics
|
13
|
+
|
14
|
+
- Lab 1 and Project 1: You can access your first lab and project from the website. The first lab is due before next lecture at midnight on Sep 10th and the first project is due at midnight on Sep 17th. Please begin working on them soon!
|
15
|
+
- Remember, if you cannot finish the assignments on time, you can still submit them for partial credit.
|
16
|
+
|
17
|
+
## Slide 3: Lab and Project
|
18
|
+
|
19
|
+
- The Gradescope assignments for both the lab and project are already set up. Later tonight, there will be a Ed post with instructions on how to submit the assignments. Please follow the instructions in the post carefully. Until then, you can work on the lab and project on your own - remember to save the files while you are working on them so you don’t lose any progress!
|
20
|
+
- Pro Tip from Staff: Use the Textbook and attend Office Hours! Helped me a lot.
|
21
|
+
- Please check that you are on Ed and Gradescope over the next couple of days- email if you have problems
|
22
|
+
|
23
|
+
## Slide 4: Roadmap
|
24
|
+
|
25
|
+
- Properties of the Demand Curve
|
26
|
+
- Textbook personal demand curve
|
27
|
+
- Chicken vs beef?
|
28
|
+
- Pandemic response?
|
29
|
+
- Scanner Data
|
30
|
+
- Dominicks - Beer Data Set
|
31
|
+
- Class level Data
|
32
|
+
- Survey to Demand curve
|
33
|
+
- Constructing the demand curve - a real world example - Avocados.csv
|
34
|
+
- Expressing the demand curve mathematically
|
35
|
+
- Different models for demand modeling
|
36
|
+
- Elasticity - and Logs
|
37
|
+
|
38
|
+
## Slide 5: Definition
|
39
|
+
|
40
|
+
- Relationship between price of a good or service and the quantity demanded for that good or service at each price
|
41
|
+
- Let’s start with an example from a textbook
|
42
|
+
- An individual person’s demand
|
43
|
+
- Kms driven per semester
|
44
|
+
|
45
|
+
## Slide 6: Demand Slopes Down - Law of Demand
|
46
|
+
|
47
|
+
- Slopes down for 3 reasons:
|
48
|
+
- Decreasing Marginal Benefit - Diminishing Marginal Utility
|
49
|
+
- You don’t need that much of any one good!
|
50
|
+
- Substitution Effect
|
51
|
+
- You can get utility from other goods
|
52
|
+
- Income Effect
|
53
|
+
- A cheaper price leaves more money in your pocket to buy more
|
54
|
+
|
55
|
+
## Slide 7: Demand Slopes Down - Demand Schedule
|
56
|
+
|
57
|
+
- Decreasing Marginal Benefit
|
58
|
+
- Tanks of gas per semester
|
59
|
+
- First tank is worth a lot… last tank worth less
|
60
|
+
- https://pressbooks.bccampus.ca/uvicecon103/chapter/3-2-building-demand-and-consumer-surplus/
|
61
|
+
|
62
|
+
## Slide 8: Demand Slopes Down
|
63
|
+
|
64
|
+
- Behind a smooth curve is a chunky staircase
|
65
|
+
|
66
|
+
<details><summary>Speaker notes</summary>
|
67
|
+
|
68
|
+
USD/gal: $0.79 USD = 1 CAD → $10.44/gal
|
69
|
+
Current CAD/L 1.305
|
70
|
+
|
71
|
+
</details>
|
72
|
+
|
73
|
+
## Slide 9: Demand Slopes Down
|
74
|
+
|
75
|
+
## Slide 10: 2) Income Effect
|
76
|
+
|
77
|
+
- If price goes down, you have more money left to spend!
|
78
|
+
- What do Canadians call their money?
|
79
|
+
|
80
|
+
<details><summary>Speaker notes</summary>
|
81
|
+
|
82
|
+
loonie
|
83
|
+
|
84
|
+
</details>
|
85
|
+
|
86
|
+
## Slide 11: 3) Substitution Effect
|
87
|
+
|
88
|
+
- If price of a good goes up, similar goods become relatively cheaper and more attractive
|
89
|
+
|
90
|
+
## Slide 12: Price of Complements
|
91
|
+
|
92
|
+
- Tolls?
|
93
|
+
- Open Freeways?
|
94
|
+
|
95
|
+
## Slide 13: Price of Substitutes
|
96
|
+
|
97
|
+
- Lime? Bart? Uber?
|
98
|
+
|
99
|
+
## Slide 14: Micromobility Demand
|
100
|
+
|
101
|
+
- In 2019, people in the United States took 136 million trips on shared bikes, e-bikes, and scooters, 60% more than 2018.
|
102
|
+
- National Association of City Transportation Officials
|
103
|
+
- Why?
|
104
|
+
|
105
|
+
## Slide 15: Shifts in Demand Curve
|
106
|
+
|
107
|
+
- Exogenous events (outside of the market) can affect the demand curve
|
108
|
+
- Buyer's income
|
109
|
+
- Consumer preferences
|
110
|
+
- Expectation of future price/supply/demand
|
111
|
+
- Changes in the price of related goods
|
112
|
+
|
113
|
+
## Slide 16: US Gasoline Consumption has flattened
|
114
|
+
|
115
|
+
- https://wolfstreet.com/2024/03/07/gasoline-demand-has-a-long-term-structural-problem-plunging-per-capita-consumption/
|
116
|
+
|
117
|
+
## Slide 17: Per Capita Gasoline Sales are going down
|
118
|
+
|
119
|
+
## Slide 18: Elasticity along a curve - From Textbook
|
120
|
+
|
121
|
+
## Slide 19: Elasticity
|
122
|
+
|
123
|
+
- Inelastic - price changes and quantity does not
|
124
|
+
- Medical necessity
|
125
|
+
- Steeper Curve
|
126
|
+
- Elastic - price changes and quantity moves more
|
127
|
+
- Lots of Substitutes
|
128
|
+
- Flatter Curve
|
129
|
+
|
130
|
+
## Slide 20: Types of Elasticity
|
131
|
+
|
132
|
+
- Price Elasticity of Demand (% Change in Quantity Demanded) / (% Change in own Price)
|
133
|
+
- PED >1 - elastic
|
134
|
+
- demand is responsive to price - for a given change in P -> bigger change in Q
|
135
|
+
- PED<1 - inelastic
|
136
|
+
- demand is NOT responsive to price - for a given change in P -> smaller change in Q
|
137
|
+
- Income Elasticity of Demand
|
138
|
+
- (% Change in Quantity Demanded) / (% Change in Income)
|
139
|
+
- Cross Price Elasticity of Demand
|
140
|
+
- (% Change in Quantity Demanded of Good A) / (% Change in Price of Good B)
|
141
|
+
- XED > 0 - Substitute
|
142
|
+
- Increase in price for Good B -> Increase in Demand for Good A
|
143
|
+
- XED < 0 - Complement
|
144
|
+
- Increase in price for Good B -> Decrease in Demand for Good A
|
145
|
+
|
146
|
+
## Slide 21: A debate - beef vs chicken - Preferences or Prices?
|
147
|
+
|
148
|
+
- Pounds Consumed per person per year
|
149
|
+
|
150
|
+
<details><summary>Speaker notes</summary>
|
151
|
+
|
152
|
+
This graph is about consumption over time - what happend to beef since the 70s?
|
153
|
+
|
154
|
+
</details>
|
155
|
+
|
156
|
+
## Slide 22: A debate - beef vs chicken - Preferences or Prices?
|
157
|
+
|
158
|
+
- source Jayson Lusk
|
159
|
+
|
160
|
+
## Slide 23: A debate - beef vs chicken - Preferences or Prices?
|
161
|
+
|
162
|
+
- source Jayson Lusk
|
163
|
+
- Ratio of chicken price to beef price
|
164
|
+
|
165
|
+
## Slide 24: A debate - beef vs chicken - Preferences or Prices?
|
166
|
+
|
167
|
+
## Slide 25: A debate - beef vs chicken - Preferences or Prices?
|
168
|
+
|
169
|
+
## Slide 26: Price of Chicken and Beef during Covid-19
|
170
|
+
|
171
|
+
- How do you think chicken and beef prices fluctuated?
|
172
|
+
- Chicken - Consumers perceive link between virus and poultry
|
173
|
+
- In India, chicken prices have decreased by 70%
|
174
|
+
- “People were avoiding consumption of meat, fish, chicken, and egg” -
|
175
|
+
- Economic Times of India
|
176
|
+
- Beef - Supply change interruption because meat packing factories are a covid hotspot
|
177
|
+
- The retail price for beef in April was $6.22 per pound — 26 cents higher per pound than the month before (BLS)
|
178
|
+
- At the same time, at the end of April, the average price for a steer was below $100 per hundred pounds; the five-year average for that same week was about $135 per hundred pounds
|
179
|
+
- Unexpected price fluctuations → USDA investigation
|
180
|
+
- Politico
|
181
|
+
|
182
|
+
## Slide 27: Beef Processors Price Fixing Lawsuit
|
183
|
+
|
184
|
+
- https://www.wcax.com/2021/06/10/unpacking-price-fixing-concerns-meat-processing-industry/
|
185
|
+
|
186
|
+
## Slide 28: Interesting aside - Data and Price Fixing - Agri Stats
|
187
|
+
|
188
|
+
- https://www.usnews.com/news/best-states/indiana/articles/2021-08-07/data-service-sued-for-facilitating-anti-competitive-behavior
|
189
|
+
|
190
|
+
## Slide 29: (untitled)
|
191
|
+
|
192
|
+
- https://www.reuters.com/legal/government/data-company-agri-stats-must-face-justice-dept-antitrust-lawsuit-2024-05-28/
|
193
|
+
|
194
|
+
## Slide 30: Scanner Data - an early “Big Data”
|
195
|
+
|
196
|
+
- UPC Codes - Laser Scanners
|
197
|
+
- How to make a Demand Curve
|
198
|
+
- Run experiments - track outcomes
|
199
|
+
- Sales
|
200
|
+
- Coupons
|
201
|
+
- Placement on the Shelf, on the Aisle
|
202
|
+
|
203
|
+
## Slide 31: A Meme from 1992 ?!?!
|
204
|
+
|
205
|
+
## Slide 32: Front Page of NYT
|
206
|
+
|
207
|
+
## Slide 33: Applied Economics and Bigger Data !
|
208
|
+
|
209
|
+
- 1990s - Scanner Data - before the internet!
|
210
|
+
- A first example of Big Data
|
211
|
+
- Data had previously been collected from consumer surveys
|
212
|
+
- Sample vs Census
|
213
|
+
- Improve measurement of consumer basket of goods
|
214
|
+
- Basket Changes over time
|
215
|
+
- Can we make a better CPI based on consumption behavior?
|
216
|
+
- Measure choices between premium and generic -
|
217
|
+
- Patent and OTC - patent expires but demand remains
|
218
|
+
- Do rich and poor pay the same prices
|
219
|
+
|
220
|
+
## Slide 34: Household vs Firm
|
221
|
+
|
222
|
+
- Household sample - Nielsen - Nationally Representative sample of 120,000 household
|
223
|
+
- Households scan everything they buy
|
224
|
+
- Household level attributes eg income level, zip code
|
225
|
+
- Firm Sample
|
226
|
+
- Firms have product, brand data
|
227
|
+
- ` Firms have different locations
|
228
|
+
- https://www.cpgdatainsights.com/answer-business-questions/sales-drivers-analysis-panel-data/
|
229
|
+
|
230
|
+
## Slide 35: Another Meme! Trading Privacy for Pennies?
|
231
|
+
|
232
|
+
## Slide 36: Nielsen - leveraging big data since 1923
|
233
|
+
|
234
|
+
- Originator of the term market share
|
235
|
+
- What do people watch?
|
236
|
+
- Fox news is the top news source
|
237
|
+
- When will ABC be on top
|
238
|
+
- New episodes during ratings “sweeps week “
|
239
|
+
- Now - buy the information directly from
|
240
|
+
- Comcast / DirecTV / Roku …..
|
241
|
+
- Leverage data from multiple markets
|
242
|
+
- What do people buy ?
|
243
|
+
- Coke vs Pepsi Crest vs Colgate
|
244
|
+
|
245
|
+
## Slide 37: Is Nielsen Panel Data still relevant / important?
|
246
|
+
|
247
|
+
- https://www.nielsen.com/insights/2023/what-is-panel-data-and-why-does-it-matter/
|
248
|
+
|
249
|
+
## Slide 38: Combining Panels and Big Data
|
250
|
+
|
251
|
+
## Slide 39: Nielsen Data Reporting
|
252
|
+
|
253
|
+
## Slide 40: UC Berkeley Access
|
254
|
+
|
255
|
+
- https://guides.lib.berkeley.edu/c.php?g=4395&p=5048306
|
256
|
+
|
257
|
+
## Slide 41: UC Berkeley Access
|
258
|
+
|
259
|
+
## Slide 42: Faber and Fally, Firm Heterogeneity in Consumption Baskets
|
260
|
+
|
261
|
+
- https://www.nber.org/system/files/working\_papers/w23101/w23101.pdf
|
262
|
+
|
263
|
+
## Slide 43: Faber and Fally, Firm Heterogeneity in Consumption Baskets
|
264
|
+
|
265
|
+
- https://www.nber.org/system/files/working\_papers/w23101/w23101.pdf
|
266
|
+
|
267
|
+
## Slide 44: Dominick’s - A Chicago area Supermarket Chain
|
268
|
+
|
269
|
+
- https://www.chicagobooth.edu/research/kilts/datasets/dominicks
|
270
|
+
|
271
|
+
## Slide 45: Domenicks Data
|
272
|
+
|
273
|
+
## Slide 46: (untitled)
|
274
|
+
|
275
|
+
## Slide 47: Exploring the Beer Data Price vs Quantity
|
276
|
+
|
277
|
+
## Slide 48: UPC - what makes a unique item?
|
278
|
+
|
279
|
+
## Slide 49: Problems -
|
280
|
+
|
281
|
+
- We don’t know the data
|
282
|
+
- Data Cleaning!!!
|
283
|
+
- Merging similar Items with different SKUs?
|
284
|
+
|
285
|
+
## Slide 50: Demand Demo - Go and fill a form in the notebook
|
286
|
+
|
287
|
+
- WEB Page - Building a Demand Curve - Demand\_Curve.ipynb
|
288
|
+
- How much would you be willing to pay for?
|
289
|
+
- Cup of Coffee
|
290
|
+
- Gourmet Burrito
|
291
|
+
- 2 Greek Theater Tickets
|
292
|
+
- iPhone 16
|
293
|
+
- Hint - dispersion is good… some of you should bid high or low!
|
294
|
+
- https://tinyurl.com/data88fa24demand
|
295
|
+
|
296
|
+
## Slide 51: Google Form - > Google Sheet
|
297
|
+
|
298
|
+
## Slide 52: Demand Curve from Class Data
|
299
|
+
|
300
|
+
- Google Form for 4 goods
|
301
|
+
- Please make a bid on each good
|
302
|
+
- How much would you be willing to pay for …..
|
303
|
+
- Google Form outputs to Google Sheets
|
304
|
+
- Google Sheets to Jupyter Notebook
|
305
|
+
- via .csv - file to download and upload
|
306
|
+
- Via API - read directly
|
307
|
+
- What do we need to do to make a demand curve
|
308
|
+
|
309
|
+
<details><summary>Speaker notes</summary>
|
310
|
+
|
311
|
+
After everyone completes the survey, ask everyone to go into breakout rooms
|
312
|
+
|
313
|
+
</details>
|
314
|
+
|
315
|
+
## Slide 53: Demand Curve from Survey Data
|
316
|
+
|
317
|
+
- Please discuss
|
318
|
+
- What would it take to make this survey data into a demand curve?
|
319
|
+
- What transformation would you make to the data
|
320
|
+
- What would you want to graph from this data to make something like a demand curve
|
321
|
+
- Demand
|
322
|
+
- P
|
323
|
+
- Q
|
324
|
+
|
325
|
+
<details><summary>Speaker notes</summary>
|
326
|
+
|
327
|
+
After everyone completes the survey, ask everyone to go into breakout rooms
|
328
|
+
|
329
|
+
</details>
|
330
|
+
|
331
|
+
## Slide 54: Reflection of Survey Data
|
332
|
+
|
333
|
+
- How do we get from raw data to demand curve?
|
334
|
+
- Import data
|
335
|
+
- Convert to numeric data
|
336
|
+
- Count bids by price
|
337
|
+
- Cumulative sums of bids by price
|
338
|
+
- Graph the demand curve’s line
|
339
|
+
- Get slope and intercept from data
|
340
|
+
- Graph the slope and intercept on top of demand line
|
341
|
+
- Q\_demand\_burrito = np.flip(np.cumsum(np.flip(burritos\_table.group("price", sum).column(1))))
|
342
|
+
|
343
|
+
## Slide 55: Lecture Notebooks
|
344
|
+
|
345
|
+
- Price Elasticity of Demand - PriceElasticity.ipynb
|
346
|
+
- Beers - Scanner Data from Domenick’s - ScannerData\_Beer.ipynb
|
347
|
+
- Survey Demand data - Demand\_Steps\_24.ipynb
|
348
|
+
- Avocados Data - Avocados\_demand.ipynb
|
349
|
+
|
@@ -0,0 +1,329 @@
|
|
1
|
+
---
|
2
|
+
title: "Lecture 3 - Supply"
|
3
|
+
type: slides
|
4
|
+
week: 3
|
5
|
+
source_path: "/Users/ericvandusen/Documents/Data88E-ForTraining/F24LS/Lecture 3 - Supply.pptx"
|
6
|
+
---
|
7
|
+
|
8
|
+
## Slide 1: Data 88: Economic Models
|
9
|
+
|
10
|
+
- Lecture 3: Supply and Market Equilibrium
|
11
|
+
|
12
|
+
## Slide 2: (untitled)
|
13
|
+
|
14
|
+
## Slide 3: Announcements
|
15
|
+
|
16
|
+
- Today’s lecture:
|
17
|
+
- Supply - Classic things you have seen in Econ 1 or Econ 100 - done in Python
|
18
|
+
- Cost Curves - cubic model - data tables
|
19
|
+
- using data tables to make cost curves
|
20
|
+
- Electricity Market in California
|
21
|
+
- a supply curve example
|
22
|
+
- Equilibrium
|
23
|
+
- Symbolic Python
|
24
|
+
- Solve for market equilibrium, 2 equations 2 unknowns, using python
|
25
|
+
- A simple data application
|
26
|
+
- A table for the demand curve for oranges
|
27
|
+
- Next time
|
28
|
+
- Government / Tax / Welfare
|
29
|
+
|
30
|
+
## Slide 4: Office Hours
|
31
|
+
|
32
|
+
- Monday 2-4 101B-A Warren
|
33
|
+
- Tuesday 12-2 101B-A Warren
|
34
|
+
- Refer to Ed for updated information
|
35
|
+
|
36
|
+
## Slide 5: Extra Credit for Answering Ed questions!
|
37
|
+
|
38
|
+
- Good Samaritan Policy
|
39
|
+
- We will be tracking who contributes to answering other people’s questions on Ed
|
40
|
+
- We will apply this to your Participation Grade !
|
41
|
+
|
42
|
+
## Slide 6: Confusion in Lab 1
|
43
|
+
|
44
|
+
- Which is the cause, which is the effect?
|
45
|
+
- Which is the X, which is the Y
|
46
|
+
- Qd = Q(P)
|
47
|
+
- Consumers take a price and decide how much to consume
|
48
|
+
- In Econ - we put Price on the Y axis, but think of it as the “X”
|
49
|
+
- Consumers / Firms - “take a price” and respond to it by setting quantity
|
50
|
+
|
51
|
+
## Slide 7: There’s 6 Lecture Notebooks ! (Sorry)
|
52
|
+
|
53
|
+
- Supply - with Cubic function
|
54
|
+
- Supply - with fixed table
|
55
|
+
- California Energy
|
56
|
+
- CAISO - really hot Tuesday
|
57
|
+
- Symbolic Python
|
58
|
+
|
59
|
+
## Slide 8: Cost and Supply Curves
|
60
|
+
|
61
|
+
## Slide 9: Starting off in the Abstract- Cost Curves
|
62
|
+
|
63
|
+
- C(Q) - Cost function
|
64
|
+
- Total Costs of producing a Unit of Output
|
65
|
+
- Average Costs - C(Q) / Q
|
66
|
+
- Marginal Costs - Cost to produce an additional unit
|
67
|
+
- MC = Δ TVC/ Δ Q
|
68
|
+
- Or Equivalently MC = Δ TC/ Δ Q
|
69
|
+
|
70
|
+
## Slide 10: Varian Chapter 21
|
71
|
+
|
72
|
+
## Slide 11: https://econvideos.ucsd.edu/video\_handbooks/Intermediate-Microeconomics-Video-Handbook/media/w22g3.html
|
73
|
+
|
74
|
+
## Slide 12: Fixed versus Variable - Short Run
|
75
|
+
|
76
|
+
- Variable Cost - inputs can be adjusted or changed in short run
|
77
|
+
- AVC(Q) = C(Q)/Q
|
78
|
+
- Labor, raw materials, etc.
|
79
|
+
- Fixed Costs - (capital, land) cannot be adjusted in the short run
|
80
|
+
- cost of producing nothing
|
81
|
+
- Overhead like machines, land, etc.
|
82
|
+
|
83
|
+
## Slide 13: Total Costs - what shape is this and what is the “intuition”
|
84
|
+
|
85
|
+
- Quantity of Output
|
86
|
+
- C(Q)
|
87
|
+
- $
|
88
|
+
|
89
|
+
## Slide 14: Cost Curves
|
90
|
+
|
91
|
+
- Total Costs
|
92
|
+
- Quantity of Output
|
93
|
+
- C(Q)
|
94
|
+
- $
|
95
|
+
- $/q
|
96
|
+
- $/q
|
97
|
+
- AC(Q)
|
98
|
+
- MC(Q)
|
99
|
+
- Average Costs
|
100
|
+
- Marginal Costs
|
101
|
+
- q
|
102
|
+
|
103
|
+
## Slide 15: Lecture Notebook - Cubic Function
|
104
|
+
|
105
|
+
- Specify parts of cubic function
|
106
|
+
|
107
|
+
## Slide 16: Marginal Cost crosses through bottom of Average Cost
|
108
|
+
|
109
|
+
- at MC < AC AC is decreasing
|
110
|
+
- The cost of each additional unit is less than the average cost
|
111
|
+
- at MC> AC AC is increasing
|
112
|
+
- The cost of each additional unit is more than the average cost
|
113
|
+
- at MC=AC AC is flat
|
114
|
+
- The cost of each additional unit does not change the average
|
115
|
+
|
116
|
+
## Slide 17: U Shaped Picture
|
117
|
+
|
118
|
+
- AC
|
119
|
+
- AVC
|
120
|
+
- MC
|
121
|
+
- Q
|
122
|
+
- $ / unit
|
123
|
+
|
124
|
+
## Slide 18: Where does Price Come in?
|
125
|
+
|
126
|
+
- AC
|
127
|
+
- AVC
|
128
|
+
- MC
|
129
|
+
- Q
|
130
|
+
- $ / unit
|
131
|
+
- P
|
132
|
+
- Q(P)
|
133
|
+
|
134
|
+
## Slide 19: Determinants of Supply
|
135
|
+
|
136
|
+
- Firm will produce only if Price is above AVC for some quantity
|
137
|
+
- If firm decides to produce following the rule above, it will produce till the quantity when Price <= MC
|
138
|
+
|
139
|
+
## Slide 20: Jump to Notebook ( & Textbook)
|
140
|
+
|
141
|
+
- Market Supply is a horizontal sum of Firm supply
|
142
|
+
- Build a Cost Table
|
143
|
+
- Start with Fixed and Variable Costs for a range of outputs
|
144
|
+
- Total Cost
|
145
|
+
- Average Variable Costs, Average Fixed Costs, Average Total Costs
|
146
|
+
- Marginal Costs (np.diff)
|
147
|
+
- Interactive with Production coming from Price
|
148
|
+
|
149
|
+
## Slide 21: Python techniques - np.diff
|
150
|
+
|
151
|
+
## Slide 22: Python techniques - CSAPS
|
152
|
+
|
153
|
+
- CSAPS - Cubic Spline Approximation
|
154
|
+
- https://csaps.readthedocs.io/
|
155
|
+
- ( From Matlab from Fortran )
|
156
|
+
|
157
|
+
## Slide 23: https://www.aaea.org/UserFiles/file/AETR\_2021\_003RProofFinal.pdf
|
158
|
+
|
159
|
+
## Slide 24: Lecture Notebook
|
160
|
+
|
161
|
+
## Slide 25: Case Study - Market Supply - California Electricity Strategy Game
|
162
|
+
|
163
|
+
## Slide 26: Case Study - 2001 Energy Crisis
|
164
|
+
|
165
|
+
## Slide 27: Enron and the California blackout of 2001
|
166
|
+
|
167
|
+
- Private energy trading firm
|
168
|
+
- Hold production off market
|
169
|
+
- Idle plants
|
170
|
+
- Reduce transmission
|
171
|
+
|
172
|
+
## Slide 28: Energy Strategy Game - How does the game work
|
173
|
+
|
174
|
+
- Groups are in teams - that own a portfolio of plants
|
175
|
+
- Plants have different Variable costs and production capacities
|
176
|
+
- The day is divided into four time periods
|
177
|
+
- Teams look at a forecast for each time period and bid how much power they plan to supply
|
178
|
+
- Market clears at power supplied, and quantity demanded
|
179
|
+
- Market Price yields profits for each plant, and each portfolio
|
180
|
+
|
181
|
+
## Slide 29: Energy Game
|
182
|
+
|
183
|
+
- Today we are just looking at the Supply Curve
|
184
|
+
- Variable Costs per unit of electricity produced
|
185
|
+
- Start by ranking all producers ( plants ) by their variable costs from low to high
|
186
|
+
- Graph with width of bar being quantity supplied in MW
|
187
|
+
- Profits = Price - VC
|
188
|
+
- Where price is determined by Market Demand vs Market Supply
|
189
|
+
- (This Energy grid is 20 years out of date)
|
190
|
+
- No solar, no wind, no batteries
|
191
|
+
|
192
|
+
## Slide 30: https://www.energymarketgame.org/
|
193
|
+
|
194
|
+
|
195
|
+
Environmental Economics and Policy 147
|
196
|
+
Prof Meredith Fowlie
|
197
|
+
|
198
|
+
- https://www.energymarketgame.org/
|
199
|
+
- Environmental Economics and Policy 147
|
200
|
+
- Prof Meredith Fowlie
|
201
|
+
- If you are interested after Lecture Notebook:
|
202
|
+
|
203
|
+
## Slide 31: Case Study
|
204
|
+
|
205
|
+
- Electricity Market for California - all of the plants supplying electricity into the grid
|
206
|
+
- California Independent Systems Operator - a market for electricity
|
207
|
+
- ISO controls 300 million MWH per year
|
208
|
+
- ~ 80 percent of California’s Energy
|
209
|
+
- Is Electricity an Undifferentiated Commodity? Yes but….
|
210
|
+
- Time of Day Matters
|
211
|
+
- Carbon intensity matters?
|
212
|
+
- On Demand vs Renewables
|
213
|
+
|
214
|
+
## Slide 32: ISO Control Room in Folsom CA
|
215
|
+
|
216
|
+
- http://www.caiso.com/Documents/2014-2016StrategicPlan-ReaderFriendly.pdf
|
217
|
+
|
218
|
+
## Slide 33: Aside - Forecasting Peak Demand
|
219
|
+
|
220
|
+
- http://www.caiso.com/Documents/2020SummerLoadsandResourcesAssessment.pdf
|
221
|
+
- http://www.caiso.com/Documents/2022-Summer-Loads-and-Resources-Assessment.pdf
|
222
|
+
|
223
|
+
## Slide 34: Simulations of Possible Outcomes
|
224
|
+
|
225
|
+
## Slide 35: (untitled)
|
226
|
+
|
227
|
+
## Slide 36: Forecasting!
|
228
|
+
|
229
|
+
- https://www.caiso.com/about/Pages/Blog/Posts/Reliability-and-the-growing-importance-of-forecasting.aspx
|
230
|
+
|
231
|
+
## Slide 37: Simulations of Running out of Power
|
232
|
+
|
233
|
+
## Slide 38: CAISO Dashboard - Demand for Electricity
|
234
|
+
|
235
|
+
- https://www.caiso.com/TodaysOutlook/Pages/index.html
|
236
|
+
|
237
|
+
## Slide 39: Net Demand - the duck curve ?
|
238
|
+
|
239
|
+
## Slide 40: April 17 - 2024 - Net Demand is Negative
|
240
|
+
|
241
|
+
## Slide 41: Negative Prices
|
242
|
+
|
243
|
+
- Only for a few hours of the day?
|
244
|
+
- How much to subsidize, build batteries?
|
245
|
+
- How much to pay homeowners for the electricity?
|
246
|
+
- What about when everyone moves to electric cars?
|
247
|
+
- “Dumping” electricity on other states?
|
248
|
+
- “Disconnecting” from the grid for a few hours
|
249
|
+
|
250
|
+
## Slide 42: September 6, 2022 - a very hot day
|
251
|
+
|
252
|
+
## Slide 43: (untitled)
|
253
|
+
|
254
|
+
## Slide 44: Demand Event - send out a text to everyone
|
255
|
+
|
256
|
+
## Slide 45: Insert PollEV
|
257
|
+
|
258
|
+
- How much do you think is nuclear?
|
259
|
+
- What do you think happens when there’s too much solar?
|
260
|
+
|
261
|
+
## Slide 46: (untitled)
|
262
|
+
|
263
|
+
## Slide 47: (untitled)
|
264
|
+
|
265
|
+
## Slide 48: (untitled)
|
266
|
+
|
267
|
+
## Slide 49: Supply - Right Now and Yesterday
|
268
|
+
|
269
|
+
- https://www.caiso.com/TodaysOutlook/Pages/supply.html
|
270
|
+
|
271
|
+
## Slide 50: Diablo Canyon - PGE - two 1.1 MW reactors
|
272
|
+
|
273
|
+
- Expires November 2024 and August 2025
|
274
|
+
- But at the last minute…
|
275
|
+
- Got extended to 2030
|
276
|
+
|
277
|
+
## Slide 51: PGE Transmission Lines
|
278
|
+
|
279
|
+
- 2023 Schatz Center Wind Transmission Report
|
280
|
+
|
281
|
+
## Slide 52: Burea of Ocean Energy Management
|
282
|
+
|
283
|
+
- BOEM Presentation
|
284
|
+
|
285
|
+
## Slide 53: BOEM
|
286
|
+
|
287
|
+
## Slide 54: Wind Lease Areas were auctioned in 2022
|
288
|
+
|
289
|
+
## Slide 55: Last year in NYT - who should pay for rooftop solar?
|
290
|
+
|
291
|
+
- https://www.nytimes.com/2022/01/24/business/energy-environment/california-rooftop-solar-utilities.html
|
292
|
+
|
293
|
+
## Slide 56: Supply - 24hrs - Yesterday
|
294
|
+
|
295
|
+
- https://www.caiso.com/TodaysOutlook/Pages/supply.html
|
296
|
+
|
297
|
+
## Slide 57: The Grid has Batteries - and Huge Imports
|
298
|
+
|
299
|
+
## Slide 58: Batteries vs Gas Plants
|
300
|
+
|
301
|
+
- https://www.nytimes.com/2020/09/03/business/energy-environment/california-electricity-blackout-battery.html
|
302
|
+
|
303
|
+
## Slide 59: CO2 Dashboard!
|
304
|
+
|
305
|
+
## Slide 60: CO2 Trend over time
|
306
|
+
|
307
|
+
## Slide 61: Price Map - Needs some explanations
|
308
|
+
|
309
|
+
## Slide 62: On to SymPy - Symbolic Python
|
310
|
+
|
311
|
+
- Intro and why
|
312
|
+
- Solving a system of equations
|
313
|
+
- 2 Equations and 2 Unknowns
|
314
|
+
- Q as function of Price - Demand
|
315
|
+
- Q as function of Price - Supply
|
316
|
+
- Q\* and P\* are the unique solution
|
317
|
+
|
318
|
+
## Slide 63: And On the the Lab
|
319
|
+
|
320
|
+
- Oranges Supply and Demand
|
321
|
+
- Supply - consumption over a period of years
|
322
|
+
- Demand - they just make it up !
|
323
|
+
|
324
|
+
## Slide 64: Pears vs Oranges 1
|
325
|
+
|
326
|
+
- https://drive.google.com/file/d/1Exya7KgLoU9wLj4Y6TJNI-PmH5zZVj9w
|
327
|
+
|
328
|
+
## Slide 65: Oranges - the data table!
|
329
|
+
|