Data 88E: Economic Models
Lecture 2: Demand & Elasticity
Data 88: Economic Models, Fall 2023, UC Berkeley
Logistics
Concurrent Enrollment: Today we are going to take attendance on paper.
For concurrent enrollment - please make sure you sign next to your name!
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 5th and the first project is due at midnight on Sep 19th. Please begin working on them soon!
Remember, if you cannot finish the assignments on time, you can still submit them for partial credit.
Data 88: Economic Models, Fall 2023, UC Berkeley
Lab and Project
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!
Pro Tip from Akhil: Use the Textbook and attend Office Hours! Helped me a lot.
Concurrent Enrollment - 79 applications! - Based on today’s attendance we hope to add you to the roster.
Please check that you are on Ed and Gradescope over the next couple of days- email if you have problems
Data 88: Economic Models, Fall 2023, UC Berkeley
My name! & Chat GPT
Due to some dutch people in New York 300 years ago…
My last name appears as two words “Van Dusen”
As in “Dear Professor Van Dusen”
Adhikari on GPT for Data 140 - Your boss will also be using it and thinking about whether you can be replaced by it…
�Jacob Steinhardt on GPT for Data 102 - You can use it but LLM will be setting the curve!
Data 88: Economic Models, Fall 2023, UC Berkeley
Roadmap
Data 88: Economic Models, Fall 2023, UC Berkeley
Definition
Relationship between price of a good or service and the quantity demanded for that good or service at each price
Let’s start with an example from a textbook
�An individual person’s demand
Kms driven per semester
Data 88: Economic Models, Fall 2023, UC Berkeley
Demand Slopes Down - Law of Demand
Slopes down for 3 reasons:
Data 88: Economic Models, Fall 2023, UC Berkeley
Decreasing Marginal Benefit
Data 88: Economic Models, Fall 2023, UC Berkeley
Behind a smooth curve is a chunky staircase
Data 88: Economic Models, Fall 2023, UC Berkeley
Data 88: Economic Models, Fall 2023, UC Berkeley
2) Income Effect
If price goes down, you have more money left to spend!
What do Canadians call their money?
Data 88: Economic Models, Fall 2023, UC Berkeley
3) Substitution Effect
If price of a good goes up, similar goods become relatively cheaper and more attractive
Data 88: Economic Models, Fall 2023, UC Berkeley
Price of Complements
Tolls?
Open Freeways?
Data 88: Economic Models, Fall 2023, UC Berkeley
Price of Substitutes
Lime? Bart? Uber?
Data 88: Economic Models, Fall 2023, UC Berkeley
Micromobility Demand
In 2019, people in the United States took 136 million trips on shared bikes, e-bikes, and scooters, 60% more than 2018.
Why?
Data 88: Economic Models, Fall 2023, UC Berkeley
Shifts in Demand Curve
Exogenous events (outside of the market) can affect the demand curve
Data 88: Economic Models, Fall 2023, UC Berkeley
Elasticity along a curve - From Textbook
Data 88: Economic Models, Fall 2023, UC Berkeley
Elasticity
Inelastic - price changes and quantity does not
Medical necessity
Steeper Curve
Elastic - price changes and quantity moves more
Lots of Substitutes
Flatter Curve
Data 88: Economic Models, Fall 2023, UC Berkeley
Types of Elasticity
Price Elasticity of Demand (% Change in Quantity Demanded) / (% Change in own Price)
PED >1 - elastic
demand is responsive to price - for a given change in P -> bigger change in Q
PED<1 - inelastic
demand is NOT responsive to price - for a given change in P -> smaller change in Q
Income Elasticity of Demand
(% Change in Quantity Demanded) / (% Change in Income)
Cross Price Elasticity of Demand
(% Change in Quantity Demanded of Good A) / (% Change in Price of Good B)
XED > 0 - Substitute
Increase in price for Good B -> Increase in Demand for Good A
XED < 0 - Complement
Increase in price for Good B -> Decrease in Demand for Good A
Data 88: Economic Models, Fall 2023, UC Berkeley
A debate - beef vs chicken - Preferences or Prices?
Pounds Consumed per person per year
Data 88: Economic Models, Fall 2023, UC Berkeley
A debate - beef vs chicken - Preferences or Prices?
source Jayson Lusk
Data 88: Economic Models, Fall 2023, UC Berkeley
A debate - beef vs chicken - Preferences or Prices?
source Jayson Lusk
Ratio of chicken price to beef price
Data 88: Economic Models, Fall 2023, UC Berkeley
A debate - beef vs chicken - Preferences or Prices?
Data 88: Economic Models, Fall 2023, UC Berkeley
A debate - beef vs chicken - Preferences or Prices?
Data 88: Economic Models, Fall 2023, UC Berkeley
Price of Chicken and Beef during Covid-19
How do you think chicken and beef prices fluctuated?
Data 88: Economic Models, Fall 2023, UC Berkeley
Beef Processors Price Fixing Lawsuit
https://www.wcax.com/2021/06/10/unpacking-price-fixing-concerns-meat-processing-industry/
Data 88: Economic Models, Fall 2023, UC Berkeley
Interesting aside - Data and Price Fixing - Agri Stats
https://www.usnews.com/news/best-states/indiana/articles/2021-08-07/data-service-sued-for-facilitating-anti-competitive-behavior
Data 88: Economic Models, Fall 2023, UC Berkeley
Scanner Data - an early “Big Data”
UPC Codes - Laser Scanners
How to make a Demand Curve
Run experiments - track outcomes
Sales
Coupons
Placement on the Shelf, on the Aisle
Data 88: Economic Models, Fall 2023, UC Berkeley
A Meme from 1992 ?!?!
Data 88: Economic Models, Fall 2023, UC Berkeley
Front Page of NYT
Data 88: Economic Models, Fall 2023, UC Berkeley
Applied Economics and Bigger Data !
1990s - Scanner Data - before the internet!
A first example of Big Data
Data had previously been collected from consumer surveys
Sample vs Census
Improve measurement of consumer basket of goods
Basket Changes over time
Can we make a better CPI based on consumption behavior?
Measure choices between premium and generic -
Patent and OTC - patent expires but demand remains
Do rich and poor pay the same prices
Data 88: Economic Models, Fall 2023, UC Berkeley
Household vs Firm
Household sample - Nielsen - Nationally Representative sample of 120,000 household
Households scan everything they buy
Household level attributes eg income level, zip code
Firm Sample
Firms have product, brand data
` Firms have different locations
https://www.cpgdatainsights.com/answer-business-questions/sales-drivers-analysis-panel-data/
Data 88: Economic Models, Fall 2023, UC Berkeley
Another Meme! Trading Privacy for Pennies?
Data 88: Economic Models, Fall 2023, UC Berkeley
Nielsen - leveraging big data since 1923
Originator of the term market share
What do people watch?
Fox news is the top news source
When will ABC be on top
New episodes during ratings “sweeps week “
Now - buy the information directly from
Comcast / DirecTV / Roku …..
Leverage data from multiple markets
What do people buy ?
Coke vs Pepsi Crest vs Colgate
Data 88: Economic Models, Fall 2023, UC Berkeley
Is Nielsen Panel Data still relevant / important?
https://www.nielsen.com/insights/2023/what-is-panel-data-and-why-does-it-matter/
Data 88: Economic Models, Fall 2023, UC Berkeley
Combining Panels and Big Data
Data 88: Economic Models, Fall 2023, UC Berkeley
Nielsen Data Reporting
Data 88: Economic Models, Fall 2023, UC Berkeley
UC Berkeley Access
https://guides.lib.berkeley.edu/c.php?g=4395&p=5048306
Data 88: Economic Models, Fall 2023, UC Berkeley
UC Berkeley Access
Data 88: Economic Models, Fall 2023, UC Berkeley
Faber and Fally, Firm Heterogeneity in Consumption Baskets
https://www.nber.org/system/files/working_papers/w23101/w23101.pdf
Data 88: Economic Models, Fall 2023, UC Berkeley
Faber and Fally, Firm Heterogeneity in Consumption Baskets
https://www.nber.org/system/files/working_papers/w23101/w23101.pdf
Data 88: Economic Models, Fall 2023, UC Berkeley
Dominick’s - A Chicago area Supermarket Chain
https://www.chicagobooth.edu/research/kilts/datasets/dominicks
Data 88: Economic Models, Fall 2023, UC Berkeley
Domenicks Data
Data 88: Economic Models, Fall 2023, UC Berkeley
Exploring the Beer Data Price vs Quantity
Data 88: Economic Models, Fall 2023, UC Berkeley
UPC - what makes a unique item?
Data 88: Economic Models, Fall 2023, UC Berkeley
Problems -
We don’t know the data
Data Cleaning!!!
Merging similar Items with different SKUs?
Data 88: Economic Models, Fall 2023, UC Berkeley
Demand Demo - Go and fill a form in the notebook
WEB Page - Building a Demand Curve - Demand_Curve.ipynb
How much would you be willing to pay for?
Hint - dispersion is good… some of you should bid high or low!
Data 88: Economic Models, Fall 2023, UC Berkeley
Google Form - > Google Sheet
Data 88: Economic Models, Fall 2023, UC Berkeley
Demand Curve from Class Data
Google Form for 4 goods
Please make a bid on each good
How much would you be willing to pay for …..
Google Form outputs to Google Sheets
Google Sheets to Jupyter Notebook
What do we need to do to make a demand curve
Data 88: Economic Models, Fall 2023, UC Berkeley
Demand Curve from Survey Data
Please discuss
Demand
P
Q
Data 88: Economic Models, Fall 2023, UC Berkeley
Reflection of Survey Data
How do we get from raw data to demand curve?
Q_demand_burrito = np.flip(np.cumsum(np.flip(burritos_table.group("price", sum).column(1))))
Data 88: Economic Models, Fall 2023, UC Berkeley
Lecture Notebooks
Price Elasticity of Demand - PriceElasticity.ipynb
Beers - Scanner Data from Domenick’s - ScannerData_Beer.ipynb
Survey Demand data - demand-curve-Fa23.ipynb
Avocados Data - slides-pt2.ipynb
Data 88: Economic Models, Fall 2023, UC Berkeley