Demand
When a price changes, what happens to what people buy, and to how well off they are?
The part opens in Hunan in 2006, where Robert Jensen and Nolan Miller gave randomly chosen poor households vouchers that cut the price of rice by up to a quarter, and the households that were poor but not the poorest ate less rice: the Giffen behaviour Marshall described in 1895 and Stigler said would make its discoverer immortal. The viewer runs one of the Island's poorest households for a week on $21 and buys more coconuts when they get dearer. Demand is traced from the tangency (price- and income-consumption curves, homogeneity, elasticities and the adding-up rules); Slutsky's equation of 1915, unread for twenty years, splits a price change into substitution and income effects, drawn as two moves with Hicks's and Slutsky's compensations; its elasticity form gives the recipe for Giffen behaviour, and the subsistence model's three zones, Jensen and Miller's table 3 and the same design run on 1,300 simulated households with the truth planted show where to look and how an average hides it. Duality gives four functions for one consumer (Roy, Shephard, a concave expenditure function), and integrability a loop of prices that pumps money from demand that comes from no preference. After an intermission on a century of relative prices, Engel curves (America's century, 2024's quintiles, Hamilton's use of their drift to measure CPI bias, Engel's law as a call that came true), welfare in dollars (CV, EV, consumer's surplus, Willig, Hausman's exact deadweight loss), the cost of living (Konus, the substitution bias, Hicks's virtual prices and Apple-Cinnamon Cheerios), demand systems (the linear expenditure system, the AIDS estimated and tested on an island survey, Gorman's aggregation), the dials, the CPI's methods, food prices and poor households, Ramsey taxes, and a frontier on inflation inequality and welfare that depends on income.
What you need. School algebra and the calculus of Part 5 (derivatives, a Lagrange multiplier); logarithms for the elasticities. Chapters 5 and 6 use partial derivatives and, once, Green's theorem, explained on screen.
- Hook
- the rice of Hunan: a Giffen good found, 2008
- Ideas, models and mathematics
- Marshallian and Hicksian demand, the Slutsky equation derived, duality, Engel curves, compensating and equivalent variation, exact welfare from a demand curve, demand systems, the cost of living
- Agora gains
- a demand system; a welfare calculator
- Play it
- split a price change into its two effects
What you will be able to do
Principles and the major
- Derive a demand curve and an Engel curve from a utility function, and compute own-price, cross-price and income elasticities.
- Split a price change into substitution and income effects with Hicks's and with Slutsky's compensation, and use the Slutsky equation to say when demand can slope up.
- Compute compensating and equivalent variation and consumer's surplus for a price change, and say which is larger and why.
Graduate
- State and use the duality identities (Roy's identity, Shephard's lemma, e(p, v(p, m)) = m), and show that compensated demand slopes down because the expenditure function is concave.
- Check a demand system for integrability (symmetry and negative semidefiniteness of the Slutsky matrix), and estimate and test an almost ideal demand system.
- Relate Laspeyres, Paasche and the true cost-of-living index, and value a new good by its virtual price.
Research
- Explain how scanner data, variety corrections and income-dependent preferences change the measurement of inflation and welfare (Jaravel; Feenstra; Redding and Weinstein; Jaravel and Lashkari; Atkin et al.).
Practice
- Use budget shares to estimate the first-order welfare effect of a price change on different households, and explain how the official CPI allows for substitution.
- Apply Ramsey's inverse-elasticity rule and state the equity objection.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Principles and the major 35 min · Graduate 52 min · Research 55 min · Practice 38 min.
- 0When a price changes, what happens to what people buy?Principles and the major4 min
- 1Play it: a week of food on $21Principles and the major3 min
- 2The demand functionPrinciples and the major4 min
- 3Two effects of one price: the Slutsky equationPrinciples and the major5 min
- 4When demand slopes up: Giffen behaviourPrinciples and the major6 min
- 5Duality: four functions, one consumerGraduate4 min
- 6Integrability: is there a consumer behind the demand?Graduate3 min
- Intermission: a century of relative pricesPrinciples and the major
- 7Engel curvesPrinciples and the major5 min
- 8Welfare in dollarsPrinciples and the major4 min
- 9The cost of living as a welfare problemGraduate4 min
- 10Demand systems you can estimateGraduate4 min
- 11The Dials: how much do people respond?Principles and the major2 min
- 12In practice: price indices, poor households, taxesPractice3 min
- 13Frontier: whose inflation, whose welfare?Research3 min
- Recap, problems, and the road aheadAll tracks3 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
When a price changes, what happens to what people buy?Principles and the major4 min
In the spring of 2006, two economists, Robert Jensen and Nolan Miller, went looking for some of the poorest households in China. They found thirteen hundred of them, on the lists of the urban poor in eleven county towns, half in Hunan in the south, where people live on rice, and half in Gansu in the north, where they live on wheat. For five months, some of those households received vouchers, drawn at random, worth ten, twenty or thirty fen off every jin of their staple, half a kilogram. Rice cost one yuan twenty a jin, so the biggest voucher cut its price by a quarter. A control group got nothing. It's a clean experiment: the price of one food falls, for some households and not others, and nothing else changes.
So: when rice got cheaper, did they eat more rice? Every textbook says yes. That's the law of demand, the most basic prediction in economics. In Hunan, among households that were poor but not the very poorest, the answer was no. They ate less rice while they held the vouchers, and more again when the vouchers ran out. On their numbers, a one percent rise in the price of rice raised those households' rice consumption by about 0.45 percent. Demand sloped up.
This was not supposed to happen, or rather, it was supposed to be a rumour. In 1895 Alfred Marshall added a sentence to the third edition of his Principles. A rise in the price of bread, he wrote, citing Robert Giffen, drains the poorer labouring families so badly that they must give up meat, and since bread is still the cheapest food, they consume more of it, and not less. For a hundred years economists taught the idea and looked for the thing. Nobody found it. George Stigler, Nobel laureate and sceptic, said that an economist who could show the law of demand failing in a real market would be assured of immortality, and rapid promotion while still alive.
The equation that explains Hunan was written down in 1915, by Eugen Slutsky, a statistician in Kiev, in an Italian journal, in the middle of a world war. Almost nobody read it. Twenty years later John Hicks and Roy Allen, in London, found the same result for themselves, and only then did Henry Schultz and Allen bring Slutsky's paper to light. It says that every price change does two things at once. It makes the good cheaper or dearer relative to everything else, and it makes the buyer richer or poorer. This part is about those two things, and about what they're worth in dollars.
So this part asks: when a price changes, what happens to what people buy, and to how well off they are? How does a single price change split into two effects? When can demand slope up, and for whom? And what is a price change worth in dollars: to one household, and to the cost of living of a whole country?
Economics, Built. Part six: demand. This part continues Act Two, on choosing. You'll feed a household for a week on twenty-one dollars, and see for yourself what a dearer staple does. We'll draw the demand function, and Slutsky's two effects as two moves on a picture. We'll find out when demand slopes up, and how Jensen and Miller found it. We'll meet the four functions that describe one consumer, and a loop of prices that pumps money out of a consumer whose demand comes from no preference at all. And then Engel's law, the dollar value of a price change, the cost of living, and the demand systems economists actually estimate.
What it does: Hunan and Gansu, 2006: 1,300 urban poor households in 11 county towns, vouchers of 0.10, 0.20 or 0.30 yuan off a 1.20-yuan jin of rice, June to October; those getting under 80% of their calories from rice: a 1% dearer price, 0.45% more rice; Marshall (1895) and Stigler (1987) quoted; Slutsky (1915), Hicks and Allen (1934); the question; the title; objectives
1Play it: a week of food on $21Principles and the major3 min
A game first. You run a household on the Island, one of its poorest. You have twenty-one dollars for a week's food, and the household must eat fourteen thousand calories, two thousand a day, or go hungry. The market sells two foods. A coconut costs one dollar twenty and brings fourteen hundred calories. A fish costs two dollars and brings seven hundred, and it tastes far better. Per dollar, coconuts give more than three times as many calories. Here is the week on the plane of Part five: fish across, coconuts up. The yellow line is what twenty-one dollars buys. The green line is fourteen thousand calories; bundles above it keep you fed. So you can choose anything in this green sliver: affordable, and enough to eat. You'd like as much fish as possible, so you go to the sliver's far corner, where the money and the calories run out together: about six and a half fish and seven coconuts.
Now the price of coconuts rises, from one dollar twenty to one fifty. Fish stay at two dollars, and you still have twenty-one. The budget line swings in: you can afford fewer coconuts than before. Pause the film and decide. Next week, do you buy more coconuts, or fewer?
Here's what the arithmetic says. You buy more coconuts: from about six point eight to seven point six, while fish fall from six point four to four point eight. Why? At the new price, last week's basket costs twenty-three dollars and four cents: two dollars and four cents more than you have. You must save money without going hungry. Dropping a fish saves two dollars but loses seven hundred calories, and winning those calories back takes half a coconut, seventy-five cents even at the new price. So each swap saves a dollar twenty-five, and you need about one point six of them: one point six fewer fish, and point eight more coconuts. The higher price didn't make coconuts more attractive. It made you poorer, and being poorer pushed you toward the cheapest calories you could find. That is exactly what Marshall described, and what Hunan's households did.
What it does: Coconuts $1.20 (1,400 calories), fish $2 (700 calories, and taste); 14,000 calories; the fed-and-affordable sliver; the best bundle, 6.4 fish and 6.8 coconuts; coconuts go to $1.50; a countdown; 7.6 coconuts and 4.8 fish: the old basket costs $23.04, each fish swapped for half a coconut saves $1.25
2The demand functionPrinciples and the major4 min
Part five ended with one choice: the best bundle on one budget. A demand function says how that choice moves. Here is Bo again, who always spends sixty percent of his sixty dollars on fish. Coconuts cost six dollars; the price of fish will slide from fifteen dollars down to two fifty. As fish get cheaper, the budget line swings out along the fish axis, and Bo's best bundle moves with it. Its path is the price-consumption curve. Now plot each price against the fish Bo buys at it, on a second picture with the price going up the side, as Marshall drew it. That is Bo's demand curve for fish. For Bo it has a formula: thirty-six dollars divided by the price. He spends the same thirty-six dollars on fish whatever they cost.
Hold the prices still and let income grow instead. The budget line moves out without turning, and the best bundle moves along the income-consumption curve. For Bo it's a straight ray from the origin, because he spends the same shares whatever his income. Plot income against the fish he buys, and you have an Engel curve, named after Ernst Engel, whom we'll meet in chapter seven. Most people's curves are not rays. When the curve bends toward a good, the good is a luxury: its share of spending rises with income. When it bends back, so that a richer household buys less of the good, the good is inferior. Play it's coconuts were one: with more money you'd have bought fewer coconuts and more fish.
One property every demand function has. At fish ten dollars, coconuts six, and sixty dollars of income, Bo buys three point six fish and four coconuts. Double every price and his income too. The budget line doesn't move at all: twelve dollars a coconut and a hundred and twenty dollars still buy ten coconuts. So his choice can't move either. Demand depends only on prices relative to income: it is homogeneous of degree zero. If the Island counted its money in cents instead of dollars, nobody's shopping would change. A consumer who behaved otherwise would suffer from what Irving Fisher called money illusion.
Economists summarize demand with elasticities: percent changes per percent change, so the units drop out. The own-price elasticity: how much the quantity moves when the good's own price moves. The cross-price elasticity: when another good's price moves. The income elasticity: when income moves. Bo's are minus one, zero and one: fish one percent dearer means one percent fewer fish, the price of coconuts doesn't touch his fish, and one percent more income buys one percent more. And three rules hold for everyone. Homogeneity again: the elasticities with respect to all prices and income add to zero. Weighted by budget shares, income elasticities average exactly one: a household can't spend more than all of an extra dollar, so not everything can be a luxury. And when one price changes, the budget still has to add up, which ties the price elasticities together too.
What it does: Bo (60% of $60 on fish, coconuts $6) as fish fall from $15 to $2.80: the price-consumption curve and x = 36/p; income from $20 to $76: a ray and a straight Engel curve; luxuries and inferior goods; homogeneity, (10, 6, 60) and (20, 12, 120) give (3.6, 4); elasticities, Bo's −1, 0 and 1; homogeneity, Engel and Cournot aggregation
3Two effects of one price: the Slutsky equationPrinciples and the major5 min
Back to Bo. The price of fish falls from ten dollars to six. His budget line swings out, and he moves from bundle A to bundle C: from three point six fish to six. That move mixes two things. Fish are now cheaper relative to coconuts, and Bo is richer: his sixty dollars buy more than before. To separate them, imagine taking money away from him after the price falls, just enough to put him back on his old indifference curve. That takes fifteen dollars and eighty-four cents. With the new prices and the smaller income, his budget is this dashed line, parallel to the new one, just touching the old curve at B. The move from A to B is the substitution effect: same satisfaction, new relative prices, and Bo slides round his curve toward the good that got cheaper, nought point eight two more fish. Now give the money back. The move from B to C is the income effect: one point five eight more fish, just from being richer. John Hicks drew it this way in 1939.
Slutsky had compensated differently, and more practically. Instead of holding Bo's satisfaction fixed, which nobody can observe, hold fixed what he can afford: leave him just enough money to buy his old bundle A at the new prices, forty-five dollars and sixty cents. The budget line pivots through A. Bo can still have A, but he doesn't want it: at the new prices he moves to B prime, with nought point nine six more fish. The rest, one point four four fish, is the income effect. The split is a little different from Hicks's, because Slutsky's compensation is a little more generous. But it needs nothing except prices and the old bundle, so it can be computed from data, and for small price changes the two splits become the same.
In symbols, for a small price change, this is the Slutsky equation. On the left, how the quantity bought responds to the price: what you actually see. First on the right, the substitution effect: the response of Hicks's compensated demand, written h, which holds satisfaction fixed. Then minus the income effect: how much the good responds to income, times how much of it the consumer buys. The more of a good you buy, the more a rise in its price makes you poorer. Bo's numbers, at a fish price of ten dollars: his fish fall by nought point three six for each dollar the price rises; nought point one four four of that is substitution, and three point six fish times nought point nought six, nought point two one six, is income. And one sign is guaranteed. The substitution term can never be positive: holding satisfaction fixed, a dearer good is always bought less, or no more. We'll see why in chapter five.
Divide through and you get the same equation in elasticities, which is how it's used. The price elasticity equals the compensated elasticity minus the budget share times the income elasticity. For Bo: minus one equals minus nought point four, his substitution, minus nought point six of his budget times an income elasticity of one. Now the household from Play it, buying coconuts. Pinned at the corner between its budget and its calories, it has no room to substitute at all: give it just enough money to buy last week's basket, and it buys exactly that basket again. Its compensated elasticity is zero. Coconuts are thirty-nine percent of its budget, and they're inferior: one percent more income would buy one point one percent fewer coconuts. So the total is plus nought point four three. That's the whole recipe for demand that slopes up. The good must be inferior, it must take a large share of the budget, so that a price rise makes the household much poorer, and there must be little room to substitute away from it. Which kind of household fits that recipe is the next chapter.
What it does: Fish $10 → $6: A (3.6, 4) to C (6, 4); Hicks's compensation $15.84, B (4.42, 2.94): substitution +0.82, income +1.58; Slutsky's, $45.60 through A, B′ (4.56, 3.04): +0.96 and +1.44; the equation, −0.360 = −0.144 − 3.6 × 0.06; ε = εʰ − wη: Bo −1 = −0.4 − 0.6, the Play-it household +0.43 = 0 − 0.39 × (−1.11)
4When demand slopes up: Giffen behaviourPrinciples and the major6 min
First, the history of a rumour. Marshall gave Giffen as his source in 1895, but no reference and no numbers. In 1947 George Stigler went looking for the claim in Giffen's writings and couldn't find it; and the evidence on bread and wheat in Britain didn't show demand sloping up. The example in most textbooks became the potato in the Irish famine of the eighteen-forties. In 1999 Sherwin Rosen argued that it couldn't be right: the price of potatoes rose because blight destroyed the crop, so the Irish could not have eaten more potatoes, whatever they wanted. That's the deeper problem. In a whole market, price and quantity move together for many reasons; Part four's identification problem again. To see a demand curve slope up, you need households, and a price that someone changes on purpose.
Theory first, with the household from Play it. Hold its twenty-one dollars fixed and let the price of coconuts run from very cheap to very dear. When coconuts are cheap, the household eats enough with money to spare, chooses by taste, and its demand slopes down like anyone's. Past about 95 cents, the calorie line starts to bind, and the household is pinned where money and calories run out together. From there, every rise in the price of coconuts means fewer fish and more coconuts: demand slopes up. Past 2 dollars 10 the household has no fish left to give up; it spends everything on coconuts, and a higher price can only mean fewer. In the middle zone the elasticity has a simple form. It depends only on how many calories a dollar buys in each food: the fewer the fish give relative to coconuts, the stronger the effect. At a dollar twenty it's nought point four three. Jensen and Miller's own figures make the same point: in Hunan a yuan bought fourteen hundred calories of rice and three hundred and thirty of pork.
That's the theory Jensen and Miller took to Hunan and Gansu. They surveyed every household three times: in April, before anyone knew about vouchers; in September, after three months with them; and in December, after they had ended. For each household, two changes in its rice consumption, matched with two changes in its price, and compared only with other households in the same town at the same time. The coefficient is the price elasticity, and it is positive if demand slopes up. And the theory told them where to look: among households poor enough to depend on rice, but not so poor that they eat nothing else. They sorted households by the share of their calories that came from rice before the experiment began.
Here is what they found in Hunan. Across all households the elasticity was positive, nought point two two, but not significant: the interval runs well below zero. Among households getting less than eighty percent of their calories from rice, it was nought point four five, and clearly positive. Among the very poorest, who ate almost nothing but rice, it was minus nought point six one: they had nothing to give up, and simply ate less when rice cost more. Between sixty and eighty percent, nought point six four. The mechanism showed too: households that ate meat cut it sharply when rice got dearer. A smoothed curve across calorie shares rose and fell, an inverted U, positive for nearly two thirds of the sample. In Gansu the evidence was weaker, and the authors said why: families there ate almost no meat to give up, and wheat came in many forms that could substitute for one another. One honest caution, which they raised themselves: searching across many cut-offs for a positive number is a forking path, Part four's warning. What protects them is that the theory picked the place to look before the data did.
Could the method have found nothing if nothing was there, or found the truth if it was? On the Island we can check, because we plant the truth. Thirteen hundred of the Island's poorest households, in eleven villages, live on coconuts and fish and a little oil and greens. They get Jensen and Miller's vouchers, at random, and the same three surveys, with consumption reported with error. We planted the subsistence model: households in its middle zone have an elasticity of plus nought point four three; those on either side, negative ones. Run their regression on everyone and you get almost exactly zero: the Giffen households and the others cancel. Restrict to households getting sixty to eighty percent of their calories from coconuts, and it's plus nought point three four, short of the planted value because mismeasured shares put some households in the wrong group. Their fish fall sharply, as the mechanism says. And the kernel-weighted curve, drawn the way they drew theirs, traces the planted inverted U. The lesson goes beyond Giffen goods: an average effect can be zero while a large group responds strongly, in the opposite direction from everyone else.
What it does: Marshall (1895), Stigler (1947), Rosen (1999); the household's coconut demand at $21: down to 95 cents, up to $2.10, down again; ε = r/(1 − r) = 0.43; Jensen and Miller's design; table 3: +0.22 (all), +0.45 (≤ 80%), −0.61 (> 80%), +0.64 (60–80%); meat −1.13 for meat-eaters; the inverted U, 0.53–0.84, peak 0.85 at 0.70; Gansu; the Island: 1,300 households, all −0.00, 60–80% +0.34 against a planted +0.43, fish −1.27, the kernel-weighted curve against the planted one
5Duality: four functions, one consumerGraduate4 min
Everything so far started from one problem. Bo has sixty dollars, and he wants the most satisfaction they can buy. Its answers are his demand, x of p and m, and the satisfaction he reaches, the indirect utility, v of p and m. Now turn the problem inside out. Fix the indifference curve, and ask what is the least money that reaches it at these prices. Start with a budget that's far too big, and shrink it. The cheapest budget that still touches the curve touches it at the same bundle, and costs exactly sixty dollars. Its answers are Hicks's compensated demand, h of p and u, and the expenditure function, e of p and u: the cost of a given level of satisfaction at given prices. The two problems are duals: the answer to each solves the other.
So one consumer can be described by four functions. Two demands: Marshall's, which you can see in a shop, and Hicks's, which holds satisfaction fixed. And two value functions: the indirect utility, and the expenditure function. They are tied together by identities. The indirect utility and the expenditure function are inverses: the least money that reaches what sixty dollars can reach is sixty dollars. And Hicks's demand is Marshall's, evaluated at just enough money. Going up the left side, Roy's identity, from René Roy in 1947: demand is the slope of indirect utility in a price, divided by its slope in money. Up the right, Shephard's lemma, from Ronald Shephard in 1953: compensated demand is simply the slope of the expenditure function in that good's price. Know any one of the four functions, and you can recover the other three.
Shephard's lemma deserves a picture, because it explains the sign promised in chapter three. This curve is the expenditure function: the money Bo needs to stay on his old indifference curve, as the price of fish varies. This straight line is the cost of his old bundle, three point six fish and four coconuts, at each price: what he'd need if he never changed what he buys. At ten dollars they touch, and the slope of the curve there is three point six: the fish in his compensated bundle. That is Shephard's lemma. Away from ten dollars, the curve lies below the line, because Bo can always do at least as well as his old bundle, and usually better by substituting. At six dollars the gap is one dollar forty-four, exactly the difference between Slutsky's compensation and Hicks's. A curve that lies below all its tangent lines is concave. So its slope, the compensated demand, can only fall as the price rises. Compensated demand slopes down, for every consumer. And that gap under the line will come back in chapter nine as the substitution bias in a price index.
These identities are exact, and Agora checks them. Four demand systems you'll meet in this part: Cobb–Douglas, CES, the linear expenditure system and the almost ideal demand system, each with three goods. For each, every identity holds to within about one part in a billion, which is the precision of the numerical derivatives. Why care? Because the functions you can estimate are the ones you can see, demands, and the ones you want for welfare are the ones you can't, expenditure and utility. Duality is the bridge. Chapter eight walks across it.
What it does: Bo's problem and the shopkeeper's; a budget shrinking from $110 to $60; the map of x, h, v and e; Roy (1947), Shephard (1953); Bo's expenditure function against the cost of his old bundle, 3.6p + 24: tangent at $10, gaps at $2, $6 ($1.44, Slutsky's $45.60 against Hicks's $44.16), $18 and $27; concavity; identities checked on Cobb–Douglas, CES, the linear expenditure system and the AIDS, errors about 10⁻¹⁰
6Integrability: is there a consumer behind the demand?Graduate3 min
Economists rarely observe a preference. They observe purchases, fit demand equations to them, and then use those equations for welfare. That only makes sense if some preference could have produced the equations. When can it? The question goes back to Giovanni Antonelli in 1886, and was settled by Leonid Hurwicz and Hirofumi Uzawa in 1971. Spending must add up to income; demand must be homogeneous; the matrix of substitution effects, the Slutsky matrix, must be negative semidefinite, which is the law of compensated demand for any combination of price changes; and that matrix must be symmetric. The compensated effect of the price of coconuts on fish must equal the compensated effect of the price of fish on coconuts. Here are two sets of tastes over fish, coconuts and cloth. The first matrix is symmetric. The second is not: its effects go round in a circle. With only two goods, symmetry comes for free; with three or more, it's a real restriction, and a testable one.
What goes wrong without symmetry? Take the consumer on a trip. Prices of fish and coconuts move round this circle, and come back to where they started; cloth's price never moves. At every step, adjust the consumer's money by just enough to compensate for that step's price change: the cost of what they buy, times how much each price moved. With tastes from a preference, compensated income is simply the expenditure function at fixed utility, so when the prices come home, so does the money. With the circular tastes, it doesn't. Back at the very same prices, the consumer needs three percent less money than they started with, yet at every step they were exactly compensated. Go round the other way, and they'd need three percent more. Someone could walk them round and round and collect the difference: Part five's money pump, built from a demand equation. And by Green's theorem, the gap is the asymmetry of the matrix times the area the loop encloses.
So integrability matters in three ways. It's a test: an estimated demand system whose substitution matrix isn't symmetric can't come from any single consumer, and chapter ten tests it. It's a licence: when the conditions hold, a preference exists, and its expenditure function turns price changes into dollars. And it's Part five again. For a finite list of purchases rather than smooth equations, the same question is whether the purchases satisfy GARP, and Afriat's theorem gives the answer.
What it does: Antonelli (1886), Hurwicz and Uzawa (1971); the four conditions; two Slutsky matrices over fish, coconuts and cloth, one symmetric, one circular; a loop of radius 0.4 in log prices: compensated income returns, or ends 3.0% lower; Green's theorem, (0.02 − 0.08) × π 0.4² = −0.030; a test, a licence, and GARP
Intermission: a century of relative pricesPrinciples and the major
This chapter has no narration to read.
7Engel curvesPrinciples and the major5 min
The curves that show how purchases change with income are named after a statistician. In 1857 Ernst Engel, who ran the statistical bureau of the Kingdom of Saxony, studied the budgets of Belgian working families and found a regularity. The poorer a family, he wrote, the greater the proportion of its spending that must go on food. And he went further: the share spent on food, other things equal, is the best measure of a population's material standard of living. A hundred years later, Hendrik Houthakker compared about forty household surveys from thirty countries and wrote that Engel's law is confirmed by all of them.
Here is Engel's law in America over almost a century. Across, real spending per person; up, the share of it spent on food bought to eat at home. As Americans got richer, the share fell, from about a fifth in 1929 to seven and a half percent in 2025. Real spending per head rose about six and a half times. Americans did buy more food, about two and a half times as much, but far less than in proportion. And food's price relative to everything else ended the century almost where it began, so the change is mostly an income effect: food's income elasticity across the century comes out at about nought point four seven. Below one: food is a necessity. Part of the fall, to be fair, is food that moved from home kitchens to restaurants.
The same law holds across households at one moment. In 2024 the poorest fifth of American households spent a third of their income on food; the middle fifth, twelve percent; the richest fifth, six percent. The richest households spent about three times as much on food as the poorest, with about sixteen times the income. Read as an elasticity, that's about a third between the poorest and the middle, and a half between the middle and the richest, where money goes on restaurants and dearer food rather than more calories. An Engel curve is a demand curve for income instead of price, and its slope sorts goods into necessities, luxuries, and the inferior goods of chapter four.
Engel's second sentence, that the food share measures the standard of living, became a tool for checking price indices in 2001. Bruce Hamilton's idea: if the official price index rises faster than the true cost of living, then real incomes deflated by it understate how rich people really are, more so every year. A household in a later year with the same measured real income is truly richer, so by Engel's law it spends a smaller share on food. So the Engel curve, drawn against measured income, drifts down from one survey to the next, and the drift divided by the curve's slope is the error in the index. On the Island we planted an index that overstates the cost of living by one percent a year, and drew six surveys four years apart. The method recovers the error survey by survey, and 0.97 percent a year in all. On American data, Hamilton found the CPI overstating by about two point seven percent a year from 1974 to 1982 and nought point six from 1982 to 1991; Dora Costa, with the same idea, carried the estimates back to 1888. Ingvild Almås turned it on countries in 2012 and found that the price comparisons behind international incomes make poor countries look richer than they are.
Here are their estimates side by side. Almost no bias before 1919, some in the 1920s and 30s, little in the 1960s, then a large overstatement in the inflation of the 1970s, in both studies the same two point seven points a year, and much less after. The Boskin Commission's 1996 range, from a completely different method, was nought point eight to one point six.
Called it? In 1857 Engel said that poorer families spend a larger share on food, and that the share measures a population's standard of living. A century and a half later, both halves hold: across American households in 2024, and across a century of American growth. It may be the oldest regularity in empirical economics, and it's still true.
What it does: Engel (1857) in Zimmerman's translation; Houthakker (1957); America: food at home 21% → 7.5% of spending as real spending per head rose 6.5-fold, food bought ×2.4, food's relative price ×0.96: a century elasticity of 0.47; 2024 quintiles: 33.0%, 12.2%, 6.4% of income, $5,498, $9,097, $16,989; elasticities 0.34 and 0.49; Hamilton's idea; six island surveys with a 1% a year bias planted, 0.97% recovered; Costa and Hamilton's estimates, 1888–1994; Almås; Called it?: Engel's law, right
8Welfare in dollarsPrinciples and the major4 min
Economists keep asking what a price change is worth: a tax, a tariff, a subsidy, a new railway. The answer should be in dollars, so it can be added up and compared with the cost. Bo again: fish fall from ten dollars to six, and he moves to a higher indifference curve. What is that worth to him? One answer: after the fall, how much money could you take away from him and leave him exactly as well off as before? That's the compensating variation, the same fifteen dollars eighty-four as Hicks's compensation in chapter three. Another answer: suppose the fall never happens. How much would you have to give him to make him as well off as the fall would have? That's the equivalent variation, twenty-one dollars fifty-two. Both are honest. They differ because one counts the dollars at the new prices and the other at the old, and for Bo, whose income matters to how much fish he buys, those dollars are worth different amounts.
The two answers have a picture, and it brings back Marshall's consumer's surplus from Part two. Three demand curves for fish: Marshall's ordinary curve, and Hicks's compensated curves at Bo's old and new satisfaction. The compensating variation is exactly the area to the left of the old compensated curve, between the two prices. By Shephard's lemma, that area is the change in the expenditure function. The ordinary consumer's surplus, the area to the left of Marshall's curve, lies in between. And the equivalent variation is the area to the left of the new compensated curve. In 1976 Robert Willig showed how far apart they can be: the gap is roughly the income elasticity times the surplus as a share of income, halved. For Bo, a big price change that's worth almost a third of his income, that's about fifteen percent. For most price changes it's a few percent, and Marshall's surplus, which you can measure from an ordinary demand curve, is good enough. Willig titled the paper consumer's surplus without apology.
Where the approximation can mislead is the cost of a tax. Put a sixty-cent tax on the Island's coconuts, on an ordinary straight demand curve that shifts with income. The household's loss, measured by Marshall's surplus, is three dollars sixty; exactly, it's three dollars seventy-two. Three percent apart: Willig's rule holds. But the number that matters for tax policy is the deadweight loss: the loss beyond the revenue the government collects. Marshall's triangle says seventy-two cents; the exact triangle, under the compensated curve, says sixty-one. Seventeen percent too big, because the deadweight loss is a small difference between two big numbers, and small errors in each become a large error in the difference. Jerry Hausman's fix, in 1981: from an estimated demand curve, solve Roy's identity backwards for the expenditure function. For a straight demand curve it has a closed form, and exact welfare is no harder to compute than the approximation.
What it does: Bo's gain from fish $10 → $6: CV $15.84, EV $21.52; Marshall's and Hicks's demand curves, the areas, CS $18.39 between; Willig (1976): about 15%, exactly 14%; a 60-cent tax on a $1.20 coconut (x = −4p + 0.1m + 6): CS $3.60, CV $3.72; deadweight loss $0.72 by Marshall, $0.61 exact, 17% too big; Hausman (1981)'s closed form
9The cost of living as a welfare problemGraduate4 min
Part three built price indices from baskets. This part can say what they're for. In 1924 the Russian economist Alexander Konüs defined the true cost-of-living index: the money a household needs at the new prices to be exactly as well off as before, divided by what it needed at the old prices. It's a ratio of expenditure functions. For Bo, when fish fall from ten dollars to six, the true index is nought point seven three six: he needs about a quarter less money. The Laspeyres index, which prices his old basket, says nought point seven six; the Paasche index, which prices his new one, says nought point seven one four. When fish rise to fifteen dollars, the same order: Laspeyres above the truth, Paasche below. That's the concave expenditure function from chapter five. A fixed basket ignores substitution, so it always overstates what a household needs, and the gap is the substitution bias.
How big is the bias? It depends on how easily people substitute. With tastes where fish and coconuts are hard to swap, a CES elasticity of nought point three, the fixed basket overstates the true cost of living by about one percent. With Bo's Cobb–Douglas tastes, by three percent. And where the goods are easy to swap, by almost ten. The more freely people respond to prices, the worse a fixed basket measures what they need.
A fixed basket has a second blind spot: goods that didn't exist when the basket was chosen. John Hicks suggested in 1940 how to price them. Before a good is sold, its price is, in effect, the price at which nobody would buy it, the virtual price. When it arrives, its price falls from there to the shelf price, and the gain is the triangle under the demand curve. Jerry Hausman did it for one breakfast cereal, Apple-Cinnamon Cheerios, launched by General Mills in 1989. From scanner data he estimated a virtual price of about seven dollars, twice the actual price of about three fifty, and a gain to American consumers of about seventy-eight million dollars a year, thirty-one cents a person. Leaving new brands out, he concluded, the consumer price index for cereal may be overstated by about a quarter. And cereal makers launched a hundred and ninety new brands between 1980 and 1992.
In Part three we met the Boskin Commission's verdict on the American CPI. Now its pieces are welfare theory. In 1996 the commission put the overstatement at about one point one points a year. About nought point four of that was substitution, the concave gap this part has drawn twice; a tenth was shoppers switching to cheaper stores; and the largest piece, nought point six, was new products and better quality, Hicks's virtual prices on a national scale. The Bureau of Labor Statistics changed its methods in response, and later estimates of the remaining bias are a little under one point a year. Chapter twelve shows what it changed.
What it does: Konüs (1924); fish $10 → $6: Laspeyres 0.760, true 0.736, Paasche 0.714; $10 → $15: 1.300, 1.275, 1.250; the bias with σ = 0.3, 1, 3: 1.0%, 3.3%, 9.7%; Hicks (1940) and virtual prices; Apple-Cinnamon Cheerios (1989): $7.14 against $3.48, $78.1 million a year, 31 cents a person, the cereal CPI overstated by about 25%; the Boskin Commission's 0.4, 0.1 and 0.6
10Demand systems you can estimateGraduate4 min
To use any of this, economists need demand equations they can fit to data, for many goods at once, that respect the theory. In 1954 Richard Stone fitted the linear expenditure system to Britain's spending: households first buy committed quantities of each good, then split what's left in fixed shares. In 1980 Angus Deaton and John Muellbauer proposed the almost ideal demand system, which became the workhorse: budget shares that are linear in log prices and log real income, flexible enough to fit, with the restrictions of chapter six written as conditions you can test. And behind both, a question W. M. Gorman answered in 1953: when can a whole society's spending be treated as one consumer's? Stone received the Nobel prize in 1984, and Deaton in 2015.
Here is the almost ideal demand system for one good. The share of the budget spent on it is a constant, plus terms in the logs of every price, plus a term in the log of real income. A negative coefficient on income makes the good a necessity, whose share falls as people get richer, Engel's food; a positive one, a luxury. Homogeneity says each good's price coefficients add to zero, and symmetry says the coefficient of fish's price in the coconut equation equals that of coconuts' price in the fish equation. Each is a linear restriction on the coefficients, so each can be tested.
On the Island we can watch the system work. Six thousand households in twenty villages, surveyed over twelve months, buy fish, coconuts and cloth at prices that differ from village to village and month to month for reasons of supply, such as storms and harvests, not of demand: Part four's identification problem, solved by design. Their shares come from an almost ideal demand system we planted. Fitted by iterated least squares, the estimated elasticities land on the planted ones to about the second decimal: coconuts inelastic at minus nought point seven two, cloth a luxury with an income elasticity near one and a half. And the tests: homogeneity and symmetry are not rejected, as they shouldn't be. When Deaton and Muellbauer fitted the system to Britain's spending from 1954 to 1974, homogeneity was rejected. They suspected not irrational consumers but a model too simple for aggregate data that move slowly over time, and that's been the debate ever since.
Gorman's question is worth a picture, because Part five's test treated all of America as one consumer. Here are two islanders' Engel curves for fish. If they are straight and parallel, moving twenty dollars from Chidi to Ana changes nothing: Ana buys exactly the fish Chidi gives up. Total demand then depends only on total income, and the society behaves like one consumer. If the slopes differ, the same transfer changes how much fish is bought in total. Then there's no single consumer whose demand is the market's, and welfare calculations for a representative consumer can mislead. Real Engel curves are rarely parallel; that's one reason the frontier works with household data.
What it does: Stone (1954), Deaton and Muellbauer (1980), Gorman (1953); the AIDS share equation and its restrictions; the Island's survey: 6,000 households, planted and estimated elasticities (coconuts −0.72, cloth's income elasticity 1.48), homogeneity p = 0.41, symmetry p = 0.58; Deaton and Muellbauer's rejection of homogeneity on British data, 1954–74; Gorman's parallel Engel curves: moving $20 from Chidi to Ana changes fish bought by 0 or by −2.4
11The Dials: how much do people respond?Principles and the major2 min
Part two opened a dial for the price elasticity of staples, and this part adds to it. The rows from Part two are meta-analyses: gasoline in the short run, after correcting for publication bias, minus nought point nought nine; in the long run, minus nought point three one; cigarettes about minus a half; beer, wine and spirits from minus nought point four six to minus nought point eight. All negative, all below one in size. Now the experiment from Hunan. All households: plus nought point two two, with an interval that includes zero. Households getting under eighty percent of their calories from rice: plus nought point four five. The very poorest: minus nought point six one. So the status moves, from settled within a range to depends on the setting. In markets, demand for staples slopes down, gently. For households living on one staple, it can slope up, and a subsidy meant to help them eat more can leave them eating less.
And a new dial: the income elasticity of spending on food. Houthakker, in 1957, across about forty surveys: one would not be very far astray, he wrote, at nought point six. Across countries, James Seale and Anita Regmi found it falling with national income: about nought point seven in low-income countries, nought point six and nought point five in the middle, and between nought point one and nought point three in rich ones. Our own computations sit where they should: nought point four seven for America's century, a third to a half across American households today. Below one everywhere it's been measured, and falling as people get richer: Engel's law, as a number.
What it does: Staples' price elasticities: Part 2's meta-analyses (gasoline −0.09 and −0.31, cigarettes −0.48, alcohol −0.46 to −0.80) and Hunan's rows (+0.22, +0.45, −0.61): status now depends on the setting; a new dial, food's income elasticity: Houthakker 0.6; Seale and Regmi 0.7, 0.6, 0.5, 0.1–0.3; ours, 0.47 and 0.34–0.49
12In practice: price indices, poor households, taxesPractice3 min
First, the price index itself. The theory of chapter nine changed how America measures inflation. Since January 1999, the Bureau of Labor Statistics has averaged prices within each narrow stratum, apples with apples, by a geometric mean, which is exactly right if shoppers keep the shares they spend on each variety fixed, as Cobb–Douglas tastes do. And since 2002 it has published a chained CPI, a Törnqvist index whose weights are updated every month, which allows substitution between strata too. How much does it matter? On fifteen broad kinds of American spending from 2000 to 2025, a fixed 2000 basket rises nought point one eight points a year faster than the chained index: substitution bias from broad groups alone, a sizeable part of the Boskin Commission's nought point four.
Second, poor households. Development economists need to know who is hurt by a change in food prices, often with nothing but a household survey. Duality gives a first answer. To first order, a price rise costs a household its net purchases of the good: the share of its budget it spends on it, minus the share it earns by producing it. That's Roy's identity at work. If rice gets ten percent dearer, a city family spending thirty percent of its budget on rice loses about three percent; a farmer who grows what it eats is untouched; a farmer who sells rice gains. Angus Deaton mapped exactly this for rice in Thailand in 1989. It matters because the changes can be enormous. In Indonesia's financial crisis of 1997 and 1998 the price of rice rose almost two hundred percent, for households that spent nearly thirty percent of their budgets on it. For changes that big, the first-order answer is not enough, and substitution, chapter eight's welfare measures, must come in.
Third, taxes. In 1927 Frank Ramsey, a twenty-four-year-old Cambridge mathematician, asked how to raise a given revenue with the least deadweight loss. Suppose the government must raise ten dollars from two goods, with a hundred dollars spent on each: a staple with an elasticity of minus nought point three and a treat with minus one point two. The same five percent tax on both costs nineteen cents of deadweight loss. Eight percent on the staple and two on the treat raises the same money for twelve cents. Ramsey's rule: tax goods in inverse proportion to their elasticities, because a tax on a good people can't avoid distorts little. But this part has shown who can't avoid staples: the poor, who spend the largest share on them. Efficiency says tax the staple, equity says don't, and Part forty-one is about that trade-off.
What it does: The BLS's geometric means (1999) and chained CPI (2002); fifteen kinds of spending, 2000–2025: a fixed 2000 basket 0.18 points a year above the chained Törnqvist; Deaton (1989): net purchases as the first-order welfare effect, three illustrative households; Indonesia 1997–98; Ramsey (1927): $10 from two goods, 5% each costs $0.19, 8% and 2% cost $0.12; equity against efficiency
13Frontier: whose inflation, whose welfare?Research3 min
The frontier starts from a fact the textbook index hides: different households face different inflation. Xavier Jaravel used scanner data, which record purchases barcode by barcode, to price each household's own basket. From 2004 to 2015, retail inflation for the poorest fifth of American households ran about two thirds of a point a year above that of the richest fifth; counting new products, almost nine tenths of a point; over the whole basket, about a third of a point. Two thirds of a point for twelve years is about eight percent of purchasing power. His explanation runs through demand: as the better-off grow richer, firms launch new products for them, and competition in those markets holds their prices down. By his calibration that channel explains more than half of the gap.
Measuring that requires a price index that counts new goods, which chapter nine did by hand for one cereal. Robert Feenstra showed in 1994 that with CES tastes the correction has a simple form: the share of spending on goods that existed in both periods, raised to one over sigma minus one. If five percent of this year's spending goes on goods that didn't exist last year, and sigma is four, the true cost of living is one point seven percent lower than the index of continuing goods says. The less substitutable the new goods, the larger the gain. Stephen Redding and David Weinstein added in 2020 that tastes for particular goods shift too, and that ignoring those shifts biases the usual index upward.
Two papers from 2024 push the theory of this part to its limit. Xavier Jaravel and Danial Lashkari start from Engel: when tastes change with income, an ordinary chained index answers the wrong question. Correcting for it, American real consumption per household in 1955 was understated by eleven and a half percent, and growth since then has been eighteen basis points a year slower than measured. David Atkin and his co-authors take Hamilton's idea further: where prices for much of what people buy are missing, the way spending shares shift with income still recovers welfare changes for each income group, which they did for rural India between 1987 and 2000. The common thread: the cost of living is not one number. It depends on what you buy, how you'd substitute, and what is new on your shelves. Duality, Engel curves and Slutsky's two effects are the tools that measure it.
What it does: Jaravel (2019): the poorest fifth's inflation 0.66 points a year above the richest's in retail, 0.88 with new products, 0.37 for the whole basket, 2004–2015; Feenstra (1994)'s variety correction, 1.7% for 5% of spending on new goods at σ = 4; Redding and Weinstein (2020); Jaravel and Lashkari (2024): 1955 understated by 11.5%, growth 18 basis points lower; Atkin, Faber, Fally and Gonzalez-Navarro (2024)
Recap, problems, and the road aheadAll tracks3 min
So: when a price changes, what happens to what people buy, and to how well off they are? Two things happen at once. The good becomes cheaper or dearer relative to everything else, and the buyer becomes richer or poorer. The first always pushes demand the expected way. The second usually agrees, but for households that live on one staple it can win, and demand slopes up. And how much better or worse off they are is a change in the expenditure function: a number of dollars, different for every household.
Part six in twelve lines. Rice vouchers in Hunan made poor households eat less rice, and in Play it you bought more coconuts when they got dearer. Demand depends only on prices relative to income, and its elasticities add up. Slutsky split every price change into substitution and income, and the elasticity form gave the recipe for demand that slopes up. On the Island, Jensen and Miller's method found the planted Giffen households, and showed how an average can hide them. Duality gave four functions for one consumer, and integrability asked whether any consumer lies behind a demand system, or a money pump. Engel's law held across a century and across today's households, and its drift read the error in a price index. Welfare came in dollars, three ways, with a warning about deadweight losses. A fixed basket overstates the cost of living, and new goods are worth their virtual prices. And inflation itself depends on who you are.
The problems. Bo's two decompositions, by hand; the Slutsky equation in elasticities, and how inferior a good must be to be Giffen; the Play-it household and its elasticity; the four functions of a Cobb–Douglas consumer; a money pump on a square; Engel's law from two numbers; a tax's exact and approximate costs; and a research problem, marked with a star, on telling a drifting Engel curve from a biased price index. Full solutions are in the part's notes.
The reading for this part: the demand chapters of Varian's intermediate textbook; chapters two and three of Mas-Colell, Whinston and Green for the graduate version; Deaton and Muellbauer's book on consumer behaviour, which is still the best account of demand systems; and Nicholson and Snyder. Then the papers, from Slutsky's to the scanner-data frontier.
This part followed one price change through to what people buy and what they're worth. The next adds the two things every real choice has: time, and risk. In 1738 Daniel Bernoulli asked what you would pay to play a coin game whose expected prize is infinite. Almost nobody would pay much, and his explanation was the first utility function. Part seven: time and risk.
Where it goes next. Part 7 adds time and risk; CV and EV return in cost-benefit analysis (Part 18), the CPI and inflation by income group in Part 28, Ramsey and optimal taxation in Part 41, demand estimation with product characteristics in Part 43, and food prices and poverty in Part 46.
Key results
The part's results in one place, for revision.
Try it
Lab 6 · Demand: Slutsky, Giffen, duality and welfare
Split a price change into substitution and income effects two ways and check the Slutsky equation; find the subsistence household's three zones and its Giffen elasticity; run Jensen and Miller's voucher design on simulated households with the truth planted; check the duality identities on four demand systems; send compensated income round a loop of prices and compare it with Green's theorem; recover a planted CPI bias from drifting Engel curves; and compare consumer's surplus, CV and the exact deadweight loss of a tax.
python -m videos.economics.labs 6
needs numpy, scipy, matplotlib · download lab06.py ·
source on GitHubBo, fish $10 -> $6: Hicks (substitution, income) +0.816, +1.584
Bo, fish $10 -> $6: Slutsky (substitution, income) +0.960, +1.440
Bo's Slutsky matrix: symmetric, negative semidefinite asymmetry 6.3e-11
Play-it household at $1.20: zones by income, elasticity deprived < $12.00 < subsistence < $23.76; +0.429
vouchers: all households, coconut shares 60-80% -0.00 (0.05), +0.34 (0.08); planted +0.43
duality identities, four systems: largest relative error 5.3e-10
loop of radius 0.4: log income gap, symmetric / circular (Green) -7.5e-17 / -0.0302 (-0.0302)
Hamilton's method: CPI bias a year, planted / recovered 0.010 / 0.0097
60-cent tax: CS, CV, EV; deadweight loss Marshall / exact 3.600, 3.718, 3.501; 0.720 / 0.615
Slutsky's compensation is the more generous, so it books more of the move as substitution; the subsistence household's coconut demand slopes up exactly in its middle zone; the experiment recovers the Giffen households only when they are sorted by calorie share; every duality identity holds to numerical precision; an asymmetric Slutsky matrix leaves money on the table round a loop, as Green's theorem predicts; Engel curves recover the planted CPI bias; and Marshall's surplus is close to CV while his deadweight loss is not.
The code (134 lines; it asserts its own result)
"""Lab 6: Slutsky's two effects, Giffen behaviour in an experiment, duality, integrability, Engel drift and welfare."""
import numpy as np
from videos.coursekit import labs
from explainer.economics.agora import demand as dm
from explainer.economics.island import truths
TITLE = "Demand: Slutsky, Giffen, duality and welfare"
GOAL = ("Split a price change into substitution and income effects two ways and check the Slutsky equation; find the "
"subsistence household's three zones and its Giffen elasticity; run Jensen and Miller's voucher design on "
"simulated households with the truth planted; check the duality identities on four demand systems; send "
"compensated income round a loop of prices and compare it with Green's theorem; recover a planted CPI bias "
"from drifting Engel curves; and compare consumer's surplus, CV and the exact deadweight loss of a tax.")
TASKS = [
"Make the fish in the subsistence diet cheaper calories (900 calories each). What happens to the Giffen "
"elasticity, and to the range of coconut prices where demand slopes up? Explain with r / (1 - r).",
"In the voucher experiment, double the reporting error. How much does the 60-80% estimate fall, and why does "
"error in the calorie share bias it toward zero? (Hint: misclassification.)",
"Give the AIDS survey an asymmetric gamma (gamma_12 = 0.08, gamma_21 = 0.02, keeping rows and columns summing to "
"zero) and fit it. Does the Wald test reject symmetry, and how large a survey does it need to?",
]
def run(seed=0):
lab = labs.Lab()
T = truths(6)
# Slutsky: Bo, fish $10 -> $6, both compensations, and the equation at a small change
b = T["bo"]
bo = dm.CobbDouglas((b["a"], 1 - b["a"]))
p0, p1, m = np.array([b["fish"][0], b["coconut"]]), np.array([b["fish"][1], b["coconut"]]), b["income"]
hk = dm.decompose(bo, 0, p0, p1, m, "hicks")
sl = dm.decompose(bo, 0, p0, p1, m, "slutsky")
lab.row("Bo, fish $10 -> $6: Hicks (substitution, income)", f"{hk['substitution']:+.3f}, {hk['income']:+.3f}")
lab.row("Bo, fish $10 -> $6: Slutsky (substitution, income)", f"{sl['substitution']:+.3f}, {sl['income']:+.3f}")
S = dm.slutsky_matrix(bo, p0, m)
el = dm.elasticities(bo, p0, m)
assert abs(el["marshall"][0, 0] - (el["hicks"][0, 0] - el["shares"][0] * el["income"][0])) < 1e-6
assert abs(hk["total"] - sl["total"]) < 1e-12 and sl["substitution"] > hk["substitution"] > 0
lab.row("Bo's Slutsky matrix: symmetric, negative semidefinite", f"asymmetry {dm.slutsky_report(S, p0)['asymmetry']:.1e}")
# the subsistence diet: zones and the Giffen elasticity
d = T["diet"]
diet = dm.Diet(d["coconut_kcal"], d["fish_kcal"], d["need"], d["beta"], d["s0"])
lo, hi = diet.zone_bounds(1.2, 2.0)
eps = diet.elasticity(1.2, 2.0, 21.0)
assert abs(eps - diet.giffen_elasticity(1.2, 2.0)) < 1e-6 and eps > 0
lab.row("Play-it household at $1.20: zones by income, elasticity", f"deprived < ${lo:.2f} < subsistence < ${hi:.2f}; "
f"{eps:+.3f}")
# the voucher experiment, with the truth planted
v = T["vouchers"]
island_diet = dm.Diet(d["coconut_kcal"], d["fish_kcal"], d["need"], d["beta"], d["s0"], d["other_share"],
d["other_kcal"])
ex = dm.voucher_experiment(island_diet, v["households"], v["villages"], v["cuts"], v["coconut"], v["fish"],
v["median"], v["sigma"], v["need_sd"], v["report_sd"], v["income_sd"], v["seed"] + seed)
sh = ex["share0"]
full = dm.fe_regression(ex["dS"], ex["dP"], ex["cell"], ex["hh"])
mid = (sh >= 0.6) & (sh <= 0.8)
mid_r = dm.fe_regression(ex["dS"][mid], ex["dP"][mid], ex["cell"][mid], ex["hh"][mid])
lab.row("vouchers: all households, coconut shares 60-80%", f"{full['b']:+.2f} ({full['se']:.2f}), "
f"{mid_r['b']:+.2f} ({mid_r['se']:.2f}); planted "
f"{island_diet.giffen_elasticity(1.2, 2.0):+.2f}")
assert mid_r["b"] > full["b"] and mid_r["b"] > 0
# duality on four systems
worst = 0.0
for sys in (dm.CobbDouglas((0.5, 0.3, 0.2)), dm.CES((0.5, 0.3, 0.2), 0.5),
dm.StoneGeary((0.3, 0.5, 0.2), (5.0, 2.0, 1.0)), dm.AIDS(alpha0=np.log(100.0))):
worst = max(worst, max(dm.duality_errors(sys, np.array([2.0, 3.0, 1.5]), 100.0).values()))
lab.row("duality identities, four systems: largest relative error", f"{worst:.1e}")
assert worst < 1e-6
# integrability: a loop of prices
lp = T["loop"]
path = dm.circle_path((0.0, 0.0), lp["radius"])
gaps = {}
for key in ("symmetric", "circular"):
g = dm.AIDS(alpha=lp["alpha"], beta=(0.0, 0.0, 0.0), gamma=lp[key])
gaps[key] = dm.loop_income(g.shares, path)[-1]
ga = np.array(lp["circular"])
green = (ga[1, 0] - ga[0, 1]) * np.pi * lp["radius"] ** 2
lab.row("loop of radius 0.4: log income gap, symmetric / circular (Green)",
f"{gaps['symmetric']:+.1e} / {gaps['circular']:+.4f} ({green:+.4f})")
assert abs(gaps["symmetric"]) < 1e-9 and abs(gaps["circular"] - green) < 1e-4
# Hamilton: drifting Engel curves read a planted CPI bias
h = T["hamilton"]
rng = np.random.default_rng(h["seed"] + seed)
W, M, Y, R = [], [], [], []
for t in h["years"]:
lrel = rng.normal(0, h["food_price_sd"], h["regions"])[np.arange(h["households"]) % h["regions"]]
ly = np.log(h["median"]) + h["growth"] * t + h["sigma"] * rng.standard_normal(h["households"])
W.append(h["a"] + h["b"] * (ly - np.log(h["median"])) + h["g"] * lrel + rng.normal(0, h["noise"], len(ly)))
M.append(np.exp(ly - h["bias"] * t) / h["median"])
Y.append(np.full(len(ly), t))
R.append(lrel)
fit = dm.hamilton_drift(*map(np.concatenate, (W, M, Y, R)))
per_year = np.polyfit(fit["years"], fit["cumulative_bias"], 1)[0]
lab.row("Hamilton's method: CPI bias a year, planted / recovered", f"{h['bias']:.3f} / {per_year:.4f}")
assert abs(per_year - h["bias"]) < 0.003
# welfare: a coconut tax, Willig and Hausman
tx = T["tax"]
L = dm.LinearDemand(tx["alpha"], tx["delta"], tx["c"])
r = L.tax(tx["price"], tx["taxes"][1], tx["income"])
lab.row("60-cent tax: CS, CV, EV; deadweight loss Marshall / exact",
f"{r['cs']:.3f}, {r['cv']:.3f}, {r['ev']:.3f}; {r['dwl_marshall']:.3f} / {r['dwl_exact']:.3f}")
assert r["ev"] < r["cs"] < r["cv"] and r["dwl_marshall"] > r["dwl_exact"]
lab.note = ("Slutsky's compensation is the more generous, so it books more of the move as substitution; the "
"subsistence household's coconut demand slopes up exactly in its middle zone; the experiment recovers "
"the Giffen households only when they are sorted by calorie share; every duality identity holds to "
"numerical precision; an asymmetric Slutsky matrix leaves money on the table round a loop, as Green's "
"theorem predicts; Engel curves recover the planted CPI bias; and Marshall's surplus is close to CV "
"while his deadweight loss is not.")
fig, ax = labs.figure(2, size=(11, 4.2))
ps = np.linspace(0.45, 2.3, 300)
s_ = [diet.staple(p, 2.0, 21.0) for p in ps]
ax[0].plot(s_, ps, color=labs.ORANGE, lw=2.2)
ax[0].set(title="The Play-it household's coconut demand ($21)", xlabel="coconuts a week",
ylabel="price of a coconut ($)")
grid = np.arange(0.40, 0.951, 0.025)
loc = dm.local_elasticity(ex, grid, 0.10)
ax[1].plot(grid, loc["b"], color=labs.BLUE, lw=2.2, label="estimated")
ax[1].fill_between(grid, loc["lo"], loc["hi"], color=labs.BLUE, alpha=0.2)
ax[1].axhline(0, color="grey", lw=1)
ax[1].set(title="Price elasticity by calorie share (vouchers)", xlabel="share of calories from coconuts",
ylabel="elasticity")
ax[1].legend()
lab.fig = fig
return lab
Now change it
- Make the fish in the subsistence diet cheaper calories (900 calories each). What happens to the Giffen elasticity, and to the range of coconut prices where demand slopes up? Explain with r / (1 - r).
- In the voucher experiment, double the reporting error. How much does the 60-80% estimate fall, and why does error in the calorie share bias it toward zero? (Hint: misclassification.)
- Give the AIDS survey an asymmetric gamma (gamma_12 = 0.08, gamma_21 = 0.02, keeping rows and columns summing to zero) and fit it. Does the Wald test reject symmetry, and how large a survey does it need to?
Problems, with solutions
Try each problem before opening its solution.
1. Bo: u = x^0.6 y^0.4, $60, coconuts $6; fish fall from $10 to $6. Find the bundles A, C, Hicks's B and Slutsky's B′, and both splits into substitution and income effects.
Solution
Cobb–Douglas spends 60% on fish: A = (0.6·60/10, 0.4·60/6) = (3.6, 4) and C = (36/6, 4) = (6, 4). Utility at A is u₀ = 3.6^0.6·4^0.4 ≈ 3.755. Hicks: the income that reaches u₀ at the new prices is e = u₀·(6/0.6)^0.6· (6/0.4)^0.4 ≈ $44.16, so B = (0.6·44.16/6, 0.4·44.16/6) ≈ (4.42, 2.94): substitution +0.82 fish, income +1.58. Slutsky: the income that buys A at the new prices is 6·3.6 + 6·4 = $45.60, so B′ = (4.56, 3.04): substitution +0.96, income +1.44. Slutsky's compensation is $1.44 more generous, so more of the move counts as substitution.
2. A good takes 30% of a budget, with compensated elasticity −0.5 and income elasticity 0.8. Find its price elasticity. How negative must the income elasticity be for demand to slope up?
Solution
ε = εʰ − wη = −0.5 − 0.3·0.8 = −0.74. Demand slopes up when −0.5 − 0.3η > 0, that is η < −0.5/0.3 ≈ −1.67: the good must be strongly inferior, because it takes less than a third of the budget and has real room to substitute. With a share of 0.39 and εʰ = 0, as in Play it, any negative η is enough.
3. Play it: $21, 14,000 calories; coconuts 1,400 calories, fish 700 at $2. Find the bundle at coconut prices $1.20 and $1.50, and show the elasticity in the subsistence zone is r/(1 − r).
Solution
In the subsistence zone both constraints bind: p s + 2f = 21 and 1,400s + 700f = 14,000, so f = 20 − 2s and s = (21 − 40)/(p − 4) = 19/(4 − p). At $1.20, s = 6.79 and f = 6.43; at $1.50, s = 7.60 and f = 4.80. Generally, s = (K p_f − m c_f)/(p_f c_s − p c_f), so ds/dp = s·c_f/(p_f c_s − p c_f) and ε = p c_f/(p_f c_s − p c_f) = r/(1 − r) with r = (c_f/p_f)/(c_s/p). At $1.20, r = 350/1,167 = 0.3 and ε = 0.43. (Check the zone: at $1.20 the taste optimum would buy 3 + (21 − 3.6)/(6·1.2) = 5.42 coconuts and 7.25 fish, 12,658 calories, too few.)
4. Derive the expenditure function and Hicksian demand for u = x^a y^(1−a), and check Shephard's lemma and Roy's identity.
Solution
Demand is x = am/p_x, y = (1 − a)m/p_y, so v(p, m) = m (a/p_x)^a ((1 − a)/p_y)^(1−a). Inverting at v = u, e(p, u) = u (p_x/a)^a (p_y/(1 − a))^(1−a), and h_x(p, u) = x(p, e(p, u)) = a·e/p_x. Shephard: ∂e/∂p_x = a·e/p_x = h_x. Roy: ∂v/∂p_x = −a v/p_x and ∂v/∂m = v/m, so −(∂v/∂p_x)/(∂v/∂m) = a m/p_x = x.
5. Shares w_i = α_i + Σ_j γ_ij log p_j with γ₁₂ = 0.08, γ₂₁ = 0.02. Compensated income goes counter-clockwise round a square of side 0.2 in (log p₁, log p₂). By how much does it change, and in which direction?
Solution
Along the loop d log m = w₁ d log p₁ + w₂ d log p₂, and by Green's theorem the integral round a closed counter-clockwise loop is ∬ (∂w₂/∂log p₁ − ∂w₁/∂log p₂) dA = (γ₂₁ − γ₁₂)·area = (0.02 − 0.08)·0.04 = −0.0024. Log income ends 0.24% lower at the same prices; clockwise it would end 0.24% higher. A symmetric γ gives zero for every loop, which is the integrability condition.
6. 2024: the poorest fifth spent $5,498 on food (33.0% of income), the middle fifth $9,097 (12.2%). Find the incomes and the arc income elasticity of food.
Solution
Incomes are 5,498/0.330 ≈ $16,661 and 9,097/0.122 ≈ $74,566. The log-arc elasticity is ln(9,097/5,498)/ln(74,566/16,661) = 0.504/1.499 ≈ 0.34: food spending rises by about a third of a percent for each percent of income, a necessity. (The midpoint-percent version gives 0.39.)
7. Coconuts: x = −4p + 0.1m + 6, m = 60, p = 1.20. A 60-cent tax: find Marshall's loss, Willig's approximation to CV, and Hausman's exact CV and deadweight loss.
Solution
At m = 60 demand is 12 − 4p: 7.2 coconuts at $1.20 and 4.8 at $1.80. Marshall's loss is ∫ from 1.2 to 1.8 of (12 − 4p) dp = $3.60, and revenue is 0.6·4.8 = $2.88, so Marshall's deadweight loss is $0.72. The income elasticity is 0.1·60/7.2 = 0.83, so Willig's CV ≈ 3.60·(1 + 0.83·3.60/120) ≈ $3.69. Exactly, e(p, k) = k e^{0.1p} + (4p + 40 − 6)/0.1 with k fixed by e(1.2, k) = 60, so e(1.8, k) ≈ $63.72 and CV = $3.72. The compensated demand at $1.80 is x(1.8, 63.72) ≈ 5.17, so the exact deadweight loss is 3.72 − 0.6·5.17 ≈ $0.61: Marshall's is 17% too big, though his loss of surplus was only 3% off.
8. ★ Hamilton's method assumes the food Engel curve's shape is stable. Let tastes drift away from food by 0.2 points of share a year. What does the method report, and how could you tell drift from CPI bias?
Solution
With w = a + b log(true income) + drift·t and log(true income) = log(measured income) + bias·t, the year dummies estimate (b·bias + drift)·t, and the method reports (b·bias + drift)/b = bias + drift/b a year. With b = −0.10 and drift = −0.002, that is bias + 0.02: a planted 1% a year is reported as 3%. Ways to tell them apart: use several indicator goods (a genuine price-index error shifts every good's Engel curve by the same income distance, a taste drift need not); use regions with different measured inflation in the same year (only the bias varies with the regional index); and compare with independent evidence on quality and new goods. Open questions: how much of the measured drift in food's share since the 1970s is eating out rather than CPI bias, and whether the method can be made robust to Engel curves that change slope as well as level (Almås and coauthors' and Logan's critiques).
Notes and sources
Where it comes back
| Idea | Where |
|---|---|
| choice over time and under risk; the expected-utility consumer | Part 7, Time and Risk |
| welfare measures, CV and EV in cost–benefit analysis | Part 18, Social Choice and Welfare |
| the CPI, its biases, and inflation by income group | Part 28, Inflation and Expectations |
| Ramsey taxes, optimal commodity and income taxation | Part 41, Taxes |
| demand estimation with product characteristics (BLP), new goods | Part 43, Measuring Market Power |
| welfare when choices are inconsistent | Part 45, Behavioural Economics |
| food prices, poverty and nutrition; Engel curves for welfare | Part 46, Development |
Sources
Primary texts.
- E. Slutsky, "Sulla teoria del bilancio del consumatore", Giornale degli Economisti e Rivista di Statistica 51 (July 1915); J. S. Chipman and J.-S. Lenfant, "Slutsky's 1915 Article: How It Came to Be Found and Interpreted", History of Political Economy 34(3) (2002) 553–597.
- J. R. Hicks and R. G. D. Allen, "A Reconsideration of the Theory of Value", Economica NS 1 (1934); J. R. Hicks, Value and Capital (Oxford, 1939); "The Valuation of the Social Income", Economica NS 7 (1940).
- A. Marshall, Principles of Economics, 3rd edition (Macmillan, 1895), p. 208.
- E. Engel, "Die Productions- und Consumtionsverhältnisse des Königreichs Sachsen" (1857), as translated in C. C. Zimmerman, "Ernst Engel's Law of Expenditures for Food", Quarterly Journal of Economics 47(1) (1932) 78–101.
- A. A. Konüs, "The Problem of the True Index of the Cost of Living" (1924; English translation in Econometrica 7, 1939).
- R. Roy, "La distribution du revenu entre les divers biens", Econometrica 15 (1947); R. W. Shephard, Cost and Production Functions (Princeton, 1953).
- G. B. Antonelli, Sulla teoria matematica della economia politica (1886); L. Hurwicz and H. Uzawa, "On the Integrability of Demand Functions", in J. S. Chipman et al., eds., Preferences, Utility, and Demand (1971).
- F. P. Ramsey, "A Contribution to the Theory of Taxation", Economic Journal 37 (1927) 47–61.
Papers.
- R. T. Jensen and N. H. Miller, "Giffen Behavior and Subsistence Consumption", American Economic Review 98(4) (2008) 1553–1577, tables 1–3 and 6, figure 2 (read in the authors' manuscript of January 2008).
- G. J. Stigler, "Notes on the History of the Giffen Paradox", Journal of Political Economy 55(2) (1947) 152–156; The Theory of Price, 4th edition (1987); S. Rosen, "Potato Paradoxes", Journal of Political Economy 107(6) (1999) S294–S313; R. Koenker, "Was Bread Giffen?", Review of Economics and Statistics 59(2) (1977).
- R. D. Willig, "Consumer's Surplus without Apology", American Economic Review 66(4) (1976) 589–597.
- J. A. Hausman, "Exact Consumer's Surplus and Deadweight Loss", American Economic Review 71(4) (1981) 662–676; "Valuation of New Goods under Perfect and Imperfect Competition", in T. F. Bresnahan and R. J. Gordon, eds., The Economics of New Goods (Chicago, 1997), ch. 5.
- R. Stone, "Linear Expenditure Systems and Demand Analysis", Economic Journal 64 (1954) 511–527.
- A. Deaton and J. Muellbauer, "An Almost Ideal Demand System", American Economic Review 70(3) (1980) 312–326; Economics and Consumer Behavior (Cambridge, 1980); R. Blundell and J.-M. Robin, "Estimation in Large and Disaggregated Demand Systems", Journal of Applied Econometrics 14 (1999).
- W. M. Gorman, "Community Preference Fields", Econometrica 21 (1953) 63–80.
- H. S. Houthakker, "An International Comparison of Household Expenditure Patterns, Commemorating the Centenary of Engel's Law", Econometrica 25(4) (1957) 532–551; J. L. Seale and A. Regmi, "Modeling International Consumption Patterns", Review of Income and Wealth 52(4) (2006); both as summarized by R. Anker, "Engel's Law Around the World 150 Years Later", PERI Working Paper 247 (2011).
- B. W. Hamilton, "Using Engel's Law to Estimate CPI Bias", American Economic Review 91(3) (2001) 619–630; D. L. Costa, "Estimating Real Income in the United States from 1888 to 1994: Correcting CPI Bias Using Engel Curves", Journal of Political Economy 109(6) (2001) 1288–1310; I. Almås, "International Income Inequality: Measuring PPP Bias by Estimating Engel Curves for Food", American Economic Review 102(2) (2012) 1093–1117.
- M. J. Boskin, E. R. Dulberger, R. J. Gordon, Z. Griliches and D. W. Jorgenson, Toward a More Accurate Measure of the Cost of Living (1996); B. R. Moulton, "The Measurement of Output, Prices, and Productivity" (Brookings, 2018).
- A. Deaton, "Rice Prices and Income Distribution in Thailand: A Non-parametric Analysis", Economic Journal 99 (1989) 1–37; J. Friedman and J. Levinsohn, "The Distributional Impacts of Indonesia's Financial Crisis on Household Welfare", World Bank Economic Review 16(3) (2002), as cited by Jensen and Miller.
- R. C. Feenstra, "New Product Varieties and the Measurement of International Prices", American Economic Review 84(1) (1994) 157–177.
- X. Jaravel, "The Unequal Gains from Product Innovations: Evidence from the U.S. Retail Sector", Quarterly Journal of Economics 134(2) (2019) 715–783; X. Jaravel and D. Lashkari, "Measuring Growth in Consumer Welfare with Income-Dependent Preferences", Quarterly Journal of Economics 139(1) (2024) 477–532.
- S. J. Redding and D. E. Weinstein, "Measuring Aggregate Price Indices with Taste Shocks: Theory and Evidence for CES Preferences", Quarterly Journal of Economics 135(1) (2020) 503–560.
- D. Atkin, B. Faber, T. Fally and M. Gonzalez-Navarro, "Measuring Welfare and Inequality with Incomplete Price Information", Quarterly Journal of Economics 139(1) (2024) 419–475.
Data. BEA, personal consumption expenditures by type of product, 1929–2025, via FRED; USDA ERS, Ag and Food Statistics: Charting the Essentials, Food Prices and Spending (2026), from the BLS Consumer Expenditure Survey, 2024; the BLS Handbook of Methods, the Consumer Price Index.
Textbooks. Varian, Intermediate Microeconomics, chs. 6–10 and 14; Mas-Colell, Whinston and Green, Microeconomic Theory, chs. 2–3; Deaton and Muellbauer, Economics and Consumer Behavior; Nicholson and Snyder, Microeconomic Theory, chs. 5–6; Jehle and Reny, Advanced Microeconomic Theory, ch. 1.
About this partfrom its README
Part 6 of a sixty-eight-part course in economics (see the series plan and the syllabus), the second of Act II, Choosing. It asks what happens, when a price changes, to what people buy and to how well off they are, and answers: two things at once. The good becomes cheaper or dearer relative to everything else, and the buyer richer or poorer. The first always pushes demand the expected way; the second usually agrees, but for households that live on one staple it can win, and demand slopes up. The change in welfare is a change in the expenditure function: a number of dollars, different for every household.
It opens in Hunan in 2006, where Robert Jensen and Nolan Miller gave randomly chosen poor households vouchers that cut the price of rice by up to a quarter, and the households that were poor but not the poorest ate less rice, not more: the Giffen behaviour Marshall described in 1895 and a century of economists failed to find. The equation that explains it was written by Eugen Slutsky in Kiev in 1915 and read by almost nobody for twenty years. From there it covers:
- a game: a week's food for one of the Island's poorest households on $21, 14,000 calories needed, coconuts (cheap calories) and fish (taste); coconuts go up, and the viewer buys more of them;
- the demand function: the price-consumption curve and Bo's demand curve, the income-consumption curve and his Engel curve, homogeneity of degree zero, elasticities and the adding-up rules;
- Slutsky's two effects drawn as two moves, with Hicks's compensation and Slutsky's, the equation, and its elasticity form; the recipe for demand that slopes up;
- Giffen behaviour: the rumour (Marshall, Stigler, Rosen), the subsistence model's three zones, Jensen and Miller's experiment and table 3, and the same design run on 1,300 simulated island households with the truth planted;
- duality: the four functions, Roy's identity and Shephard's lemma, the concave expenditure function, and the identities checked numerically on four demand systems;
- integrability: the Slutsky matrix's symmetry, and a loop of prices that pumps money from a consumer whose demand comes from no preference;
- an intermission without narration: a century of relative prices, fifteen kinds of American spending moving through price and quantity from 1929 to 2025, under the falling price of recreational goods as a tune;
- Engel curves: Engel's law in 1857, across America's century and across 2024's income quintiles, and Hamilton's use of their drift to measure the CPI's bias; Engel's law as Called it?;
- welfare in dollars: compensating and equivalent variation, consumer's surplus between them, Willig's bound, and Hausman's exact surplus and the deadweight loss it corrects;
- the cost of living: Konüs's index, Laspeyres and Paasche around it, the substitution bias, Hicks's virtual prices and Hausman's Apple-Cinnamon Cheerios, and the Boskin Commission's pieces;
- demand systems: the linear expenditure system, the AIDS estimated on a simulated island survey with its tests, and Gorman's condition for a representative consumer;
- the dials (staples' price elasticities, with Hunan's rows; food's income elasticity, new), the CPI's substitution methods, food prices and poor households, Ramsey's rule, and a frontier chapter on inflation inequality, new goods and welfare that depends on income.
What is computed and built
Everything plotted is computed by compute.py from Agora's demand systems (explainer.economics.agora.demand), with
the Island's Part 6 truths in explainer.economics.island, or from the Data Room or a transcribed table; the narration
states the cached numbers.
- Bo (planted in Part 5): Cobb–Douglas with 60% of $60 on fish, coconuts at $6. Demand, compensated demand, indirect utility and expenditure in closed form; the Hicks decomposition from h(p₁, u₀), Slutsky's from x(p₁, p₁·A).
- The subsistence diet (
demand.Diet): a household maximizes β log(s − s₀) + (1 − β) log f with s₀ = 3 coconuts and β = 1/6, subject to its budget and to eating 14,000 calories (coconuts 1,400 each, fish 700); the Island's version spends 12% of its budget on oil and greens at 600 calories a dollar. The zones: deprived when the budget cannot buy the calories even as coconuts; subsistence when the taste optimum falls short of the calories, so the bundle is where the budget and calorie lines cross; standard otherwise. In the subsistence zone the coconut's price elasticity is r/(1 − r), r the fish's calories per dollar over the coconut's. - The voucher experiment (
demand.voucher_experiment; planted): 1,300 households in 11 villages, a control group and vouchers of 10, 20 or 30 cents off $1.20 assigned at random within villages; weekly food money lognormal (median $17, σ 0.3), calorie needs ±10%, income moving 5% between rounds, consumption reported with 12% multiplicative error; three rounds; the regression of the arc percent change in coconuts on the arc percent change in the price, with village-by-round fixed effects and household-clustered standard errors; the kernel-weighted curve uses a biweight window of ±0.10 in the initial calorie share; seed 2006. - Duality checks (
demand.duality_errors): three goods at prices (2, 3, 1.5) and income 100; derivatives by central differences with a relative step of 10⁻⁶. - The integrability loop (
demand.loop_income): shares w = α + γ log p over fish, coconuts and cloth with cloth's price fixed; compensated log income integrated by the midpoint rule over 720 steps round a circle of radius 0.4. - Engel curves: America's real spending per head is nominal spending per head deflated by a chained Fisher index of the fifteen categories (2017 = 1); the century elasticity is log(food quantity ratio) / log(real spending ratio). The quintile elasticities are log ratios of food spending over log ratios of the income implied by each quintile's food spending and share.
- Hamilton's method (
demand.hamilton_drift; planted): six surveys four years apart, 1,500 households each; food's share 0.60 − 0.10 log(real income / 300) + 0.05 log(food's relative price, varying across 10 regions) + noise (s.d. 0.04); real income grows 1.5% a year; the official index overstates the cost of living by 1% a year; food shares on log measured income, the log relative price and year dummies; each dummy over the income slope is the cumulative bias; seed 2001. - Welfare: CV, EV and Marshall's surplus for Bo by the expenditure function and by integrating demand; the coconut
tax with
demand.LinearDemand, whose expenditure function e(p, k) = k e^{δp} − (αp + α/δ + c)/δ is Hausman's closed form; deadweight loss exact as CV − t·h(p₁, u₀), Marshall's as CS − t·x(p₁, m). - The cost of living: Laspeyres, Paasche and Konüs's index for Bo and for CES tastes with σ = 0.3 and 3 (weights 0.6 and 0.4); the Cheerios picture is schematic (a straight line through the observed price with Hausman's virtual price as its intercept); the numbers are his.
- The survey (
demand.Survey,demand.aids_fit; planted): an AIDS over fish, coconuts and cloth with α = (0.35, 0.40, 0.25), β = (−0.04, −0.08, 0.12) and a symmetric, homogeneous γ; α₀ = log 300; 20 villages × 12 months of log prices (village, month and cell shocks with s.d. 0.15, 0.15 and 0.075), 25 households a cell with log spending of s.d. 0.5 around log 300, shares with noise of s.d. 0.03 (summing to zero); estimated by iterated least squares (log a(p) from the current estimates, then a stacked GLS of two equations), with Wald tests from the unrestricted system; seed 1980. - The CPI computation: a fixed-base Laspeyres index (2000 weights) and a chained Törnqvist index of the fifteen PCE categories, 2000–2025.
- Ramsey: two goods with $100 of spending each and elasticities −0.3 and −1.2; deadweight loss approximated by ½|ε|t²·px; $10 of revenue.
- The intermission: relative prices are each category's price index over the chained Fisher index of all fifteen; quantities are per head; one year every 0.42 s; the data melody maps the relative price of recreational goods (log scale) to D dorian.
- The score (
explainer/economics/score.py): the scissors theme, chapter stings, beds under the pauses, and the close. Synthesized from sines; nothing recorded.
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | When a price changes, what happens to what people buy? | Hunan and Gansu, 2006: 1,300 urban poor households in 11 county towns, vouchers of 0.10, 0.20 or 0.30 yuan off a 1.20-yuan jin of rice, June to October; those getting under 80% of their calories from rice: a 1% dearer price, 0.45% more rice; Marshall (1895) and Stigler (1987) quoted; Slutsky (1915), Hicks and Allen (1934); the question; the title; objectives |
| 1 | Play it: a week of food on $21 | Coconuts $1.20 (1,400 calories), fish $2 (700 calories, and taste); 14,000 calories; the fed-and-affordable sliver; the best bundle, 6.4 fish and 6.8 coconuts; coconuts go to $1.50; a countdown; 7.6 coconuts and 4.8 fish: the old basket costs $23.04, each fish swapped for half a coconut saves $1.25 |
| 2 | The demand function | Bo (60% of $60 on fish, coconuts $6) as fish fall from $15 to $2.80: the price-consumption curve and x = 36/p; income from $20 to $76: a ray and a straight Engel curve; luxuries and inferior goods; homogeneity, (10, 6, 60) and (20, 12, 120) give (3.6, 4); elasticities, Bo's −1, 0 and 1; homogeneity, Engel and Cournot aggregation |
| 3 | Two effects of one price: the Slutsky equation | Fish $10 → $6: A (3.6, 4) to C (6, 4); Hicks's compensation $15.84, B (4.42, 2.94): substitution +0.82, income +1.58; Slutsky's, $45.60 through A, B′ (4.56, 3.04): +0.96 and +1.44; the equation, −0.360 = −0.144 − 3.6 × 0.06; ε = εʰ − wη: Bo −1 = −0.4 − 0.6, the Play-it household +0.43 = 0 − 0.39 × (−1.11) |
| 4 | When demand slopes up: Giffen behaviour | Marshall (1895), Stigler (1947), Rosen (1999); the household's coconut demand at $21: down to 95 cents, up to $2.10, down again; ε = r/(1 − r) = 0.43; Jensen and Miller's design; table 3: +0.22 (all), +0.45 (≤ 80%), −0.61 (> 80%), +0.64 (60–80%); meat −1.13 for meat-eaters; the inverted U, 0.53–0.84, peak 0.85 at 0.70; Gansu; the Island: 1,300 households, all −0.00, 60–80% +0.34 against a planted +0.43, fish −1.27, the kernel-weighted curve against the planted one |
| 5 | Duality: four functions, one consumer | Bo's problem and the shopkeeper's; a budget shrinking from $110 to $60; the map of x, h, v and e; Roy (1947), Shephard (1953); Bo's expenditure function against the cost of his old bundle, 3.6p + 24: tangent at $10, gaps at $2, $6 ($1.44, Slutsky's $45.60 against Hicks's $44.16), $18 and $27; concavity; identities checked on Cobb–Douglas, CES, the linear expenditure system and the AIDS, errors about 10⁻¹⁰ |
| 6 | Integrability: is there a consumer behind the demand? | Antonelli (1886), Hurwicz and Uzawa (1971); the four conditions; two Slutsky matrices over fish, coconuts and cloth, one symmetric, one circular; a loop of radius 0.4 in log prices: compensated income returns, or ends 3.0% lower; Green's theorem, (0.02 − 0.08) × π 0.4² = −0.030; a test, a licence, and GARP |
| Intermission: a century of relative prices | No narration: fifteen kinds of spending, relative price and quantity per head (1929 = 1, log scales), 1929–2025; recreational goods to 0.01 of their relative price and 726 times the quantity; health care 3.6 times dearer and 11 times as much; slope −0.84, correlation −0.82; real spending per head ×6.5; not a demand curve; the relative price of recreational goods as a tune; the story so far | |
| 7 | Engel curves | Engel (1857) in Zimmerman's translation; Houthakker (1957); America: food at home 21% → 7.5% of spending as real spending per head rose 6.5-fold, food bought ×2.4, food's relative price ×0.96: a century elasticity of 0.47; 2024 quintiles: 33.0%, 12.2%, 6.4% of income, $5,498, $9,097, $16,989; elasticities 0.34 and 0.49; Hamilton's idea; six island surveys with a 1% a year bias planted, 0.97% recovered; Costa and Hamilton's estimates, 1888–1994; Almås; Called it?: Engel's law, right |
| 8 | Welfare in dollars | Bo's gain from fish $10 → $6: CV $15.84, EV $21.52; Marshall's and Hicks's demand curves, the areas, CS $18.39 between; Willig (1976): about 15%, exactly 14%; a 60-cent tax on a $1.20 coconut (x = −4p + 0.1m + 6): CS $3.60, CV $3.72; deadweight loss $0.72 by Marshall, $0.61 exact, 17% too big; Hausman (1981)'s closed form |
| 9 | The cost of living as a welfare problem | Konüs (1924); fish $10 → $6: Laspeyres 0.760, true 0.736, Paasche 0.714; $10 → $15: 1.300, 1.275, 1.250; the bias with σ = 0.3, 1, 3: 1.0%, 3.3%, 9.7%; Hicks (1940) and virtual prices; Apple-Cinnamon Cheerios (1989): $7.14 against $3.48, $78.1 million a year, 31 cents a person, the cereal CPI overstated by about 25%; the Boskin Commission's 0.4, 0.1 and 0.6 |
| 10 | Demand systems you can estimate | Stone (1954), Deaton and Muellbauer (1980), Gorman (1953); the AIDS share equation and its restrictions; the Island's survey: 6,000 households, planted and estimated elasticities (coconuts −0.72, cloth's income elasticity 1.48), homogeneity p = 0.41, symmetry p = 0.58; Deaton and Muellbauer's rejection of homogeneity on British data, 1954–74; Gorman's parallel Engel curves: moving $20 from Chidi to Ana changes fish bought by 0 or by −2.4 |
| 11 | The Dials: how much do people respond? | Staples' price elasticities: Part 2's meta-analyses (gasoline −0.09 and −0.31, cigarettes −0.48, alcohol −0.46 to −0.80) and Hunan's rows (+0.22, +0.45, −0.61): status now depends on the setting; a new dial, food's income elasticity: Houthakker 0.6; Seale and Regmi 0.7, 0.6, 0.5, 0.1–0.3; ours, 0.47 and 0.34–0.49 |
| 12 | In practice: price indices, poor households, taxes | The BLS's geometric means (1999) and chained CPI (2002); fifteen kinds of spending, 2000–2025: a fixed 2000 basket 0.18 points a year above the chained Törnqvist; Deaton (1989): net purchases as the first-order welfare effect, three illustrative households; Indonesia 1997–98; Ramsey (1927): $10 from two goods, 5% each costs $0.19, 8% and 2% cost $0.12; equity against efficiency |
| 13 | Frontier: whose inflation, whose welfare? | Jaravel (2019): the poorest fifth's inflation 0.66 points a year above the richest's in retail, 0.88 with new products, 0.37 for the whole basket, 2004–2015; Feenstra (1994)'s variety correction, 1.7% for 5% of spending on new goods at σ = 4; Redding and Weinstein (2020); Jaravel and Lashkari (2024): 1955 understated by 11.5%, growth 18 basis points lower; Atkin, Faber, Fally and Gonzalez-Navarro (2024) |
| Recap, problems, and the road ahead | The answer; twelve lines; problems; reading; Bernoulli's St Petersburg game and Part 7 |
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: the rice vouchers (1,300 households, 11 county towns, cuts of 0.10–0.30 yuan on 1.20); +0.45 for households under 80% of calories from rice; Marshall (1895) and Stigler's "immortality" (1987); Slutsky and Hicks and Allen; the question; objectives.
- Play it: a week of food on $21 (14,000 calories; coconuts $1.20 for 1,400, fish $2 for 700); coconuts rise to $1.50 and the viewer buys more of them.
- The demand function: price- and income-consumption curves (Bo), the demand and Engel curves; homogeneity; elasticities and the adding-up rules.
- The Slutsky equation drawn as two moves (Hicks's and Slutsky's compensation); the equation and its elasticity form; the recipe for Giffen behaviour.
- Giffen behaviour: the rumour (Stigler 1947, Rosen 1999); the subsistence model's three zones and its elasticity r/(1 − r); Jensen and Miller's design and table 3 (+0.22, +0.45, −0.61, +0.64; the inverted U, peak 0.85 at a 0.70 rice share); Gansu; the same design on 1,300 simulated households with the truth planted.
- Duality: the four functions, Roy's identity, Shephard's lemma, the concave expenditure function; the identities checked numerically on four systems.
- Integrability: the Slutsky matrix's symmetry; a loop of prices that pumps money (Green's theorem).
- Intermission: a century of relative prices, fifteen kinds of spending, as a data film and melody.
- Engel curves: Engel 1857; America's century and 2024's quintiles; Hamilton 2001 and Costa 2001 (CPI bias from Engel drift), Almås 2012; Called it?: Engel's law.
- Welfare: CV, EV and consumer's surplus; Willig 1976; Hausman 1981's exact surplus and deadweight loss.
- The cost of living: Konüs; the substitution bias; Hicks's virtual prices and Hausman's Apple-Cinnamon Cheerios; the Boskin Commission's pieces.
- Demand systems: the LES (Stone 1954), the AIDS (Deaton and Muellbauer 1980) estimated and tested on an island survey; Gorman's aggregation.
- Dials (staples' price elasticities with Hunan's rows; food's income elasticity, new). 13. In practice: the CPI's geometric means and chained index; food prices and poor households (Deaton 1989); Ramsey taxes. 14. Frontier: inflation inequality (Jaravel 2019), new goods (Feenstra 1994; Redding and Weinstein 2020), income-dependent preferences (Jaravel and Lashkari 2024; Atkin et al. 2024).
Agora: demand: four demand systems with all four dual functions and their identities checked numerically, the
Slutsky matrix and decompositions, the subsistence diet and the voucher experiment, CV/EV/surplus with Willig and
Hausman, price indices and Feenstra, Working–Leser and Hamilton's drift, AIDS estimation with tests, the
integrability loop.
Dials: staples' price elasticities (Hunan's rows added); food's income elasticity (new); CPI bias (Hamilton's and
Costa's rows added). Facts: Engel's law. Called it? Engel 1857.
Reading: Slutsky 1915; Hicks and Allen 1934; Hicks, Value and Capital; Jensen & Miller 2008; Stigler 1947;
Rosen 1999; Roy 1947; Shephard 1953; Hurwicz & Uzawa 1971; Konüs 1924; Willig 1976; Hausman 1981, 1997; Stone 1954;
Deaton & Muellbauer 1980 and Economics and Consumer Behavior; Gorman 1953; Houthakker 1957; Hamilton 2001; Costa
2001; Almås 2012; Deaton 1989; Ramsey 1927; Feenstra 1994; Jaravel 2019; Redding & Weinstein 2020; Jaravel &
Lashkari 2024; Atkin et al. 2024; MWG chs 2–3; Varian chs 6–10, 14; Nicholson & Snyder chs 5–6.
Build the film
python -m videos.economics.econ6.compute # the part's numbers, into .cache/econ6
python tools/build.py econ6 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py econ6 Hook # one chapter, silent, with a contact sheet
Scenes: videos/economics/econ6. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.economics.econ6.compute # every number (seconds), into .cache/econ6/
python tools/qa_scene.py econ6 Giffen # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py econ6 -q l # the whole part, silent preview
python tools/build.py econ6 # 1080p30 with narration and the series' computed score
python -m videos.economics.labs 6 # the lab
The data are frozen extracts in explainer/economics/data/, registered in
SOURCES.md: BEA's personal consumption expenditures by type of
product (fifteen categories, prices and spending, 1929–2025) and the population, from FRED. The published results
(Jensen and Miller; Hausman's cereal; Costa and Hamilton; Engel, Houthakker and Seale and Regmi; the USDA's quintiles;
Jaravel; the BLS's methods; Slutsky's rediscovery) are transcribed in explainer/economics/data/tables.py, each with
where it was read and the date it was checked.