learn-economics-with-phoebe / Foundations session 4 of 6
Learn Economics with Phoebe · Foundations session 4 of 6

When markets fail

Three sessions in, a price has been a sentence, a response and a fork in the road. Tonight is about the three ways the sentence goes wrong. A price can leave out a cost that lands on somebody who was never in the trade. A price can be paid for a quality that nobody could see until the money had moved, and when that happens the best sellers walk out first. And a number that was a good measure can be turned into a target, at which point it stops measuring anything. None of the three is a story about villains. Each is a mechanism, and each one is running inside the last dataset, model or tool you bought.

🟢 Foundations Leaders, product and data teams, anyone who buys data or AI No code 45 min
0-3 · Welcome 3-18 · Three ways a price stops telling the truth 18-40 · Build-along: run the three failures on a purchase you have seen 40-45 · Q&A
Part 0

Where we start

Foundations session 1 made the case that a price is a message a stranger can act on. That case has a condition attached, and the condition is usually left unsaid: the message is only worth acting on when it carries every cost, when the buyer can see what they are paying for, and when the number itself is not being managed. Tonight removes each of those conditions in turn and watches what the price does without it. The three failures have names, externalities, information asymmetry and Goodhart's law, and they are the reason most rules, warranties, audits and benchmarks exist at all.

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class ★ Build-along = everyone works it through

★ What you walk out with tonight. Three questions you can put to any purchase in under a minute: who is paying a cost they did not choose, which quality could not be seen before the money moved, and which number has quietly become a target. One diagram for each, drawn as the mechanism rather than the slogan. And the finding that every one of the three is live inside a data market, where a dataset's quality is sealed until you have paid for it and the good sellers are the first to leave.

Part 1 · covers externalities, public goods

A cost somebody else pays

6 min live

The supply curve from Foundations session 1 was drawn from the seller's costs: what the next unit costs the person making it. That is the private cost. If making the unit also costs somebody outside the trade, a neighbour breathing the smoke, a shared server slowed for every other team, a marketplace's reputation dented by one seller's late parcels, then there is a second, higher cost curve that the price never sees. The gap between the two lines is the externality, and the market settles where the lower line crosses demand, not the higher one.

A COST THE TRADE DID NOT PAY two cost curves: the seller's, and everybody's PRICE UNITS demand private cost social cost demand hatched band = the cost paid by someone outside the trade Qs Qp WHAT THE GAP IS 1 · the seller pays the private cost 2 · a neighbour pays the rest 3 · the price only carries line 1 so the market sits at Qp, not Qs: more units than anybody would choose if every cost were counted. The hatched band is a bill nobody sent. Qs: where the trade would stop with every cost on the tag. Qp: where it stops. The band is the bill nobody sent.
🔍 Click to zoom - the market is not broken at Qp, it is doing exactly what the price told it; the price was just missing a line
LivePrivate cost, social cost, and the wedge between them4 min▶

An externality is a cost or a benefit that lands on somebody who was not party to the trade. The seller counts their own costs when they set a price, and the buyer counts their own gain when they pay it; neither has any reason to count the neighbour. So the neighbour's cost is real, and it is nowhere in the price. The market then does exactly what the price tells it, which is to make more units than anybody would choose if the whole bill had been on the tag. That is the hatched band in the figure, and it is the honest definition of "the market failed": not that the mechanism broke, but that the message it was acting on was incomplete.

The same thing runs the other way. A positive externality is a benefit that lands outside the trade: a vaccine protects the people the patient sits next to, a well-documented internal dataset saves every team that later reuses it. Here the market makes too little, because the person paying for the unit gets only part of its value. Whoever bears the cost or the benefit that the price missed is the person with a claim, and the whole of environmental policy, and most of data-platform policy, is an argument about how to put that missing line back on the tag: a tax, a cap, a chargeback, a rule.

The data habit: whenever a decision looks cheap, ask whose cost is not in the number. A query that runs in seconds because it saturates a shared cluster is cheap to the analyst and dear to everyone queued behind it. A model shipped without a monitoring budget is cheap to the team that shipped it and dear to the team that inherits it. Both are the hatched band.

Self-studyPublic goods, the commons, and why regulation exists3 min▶

A public good is the extreme case of a positive externality: nobody can be excluded from using it, and one person's use does not use it up. A lighthouse, a clean data dictionary, a public benchmark. Because nobody can be excluded, nobody will pay first, since the plan of waiting for somebody else to pay is always cheaper. So the market makes very little of it, and the things that get made are made by whoever is willing to pay for everybody, which is usually a government, a foundation or a platform that benefits indirectly.

A commons is the mirror image: a shared resource that anybody can use and that does get used up. A fishery, a shared compute pool, an on-call rota. Each user gets the whole benefit of one more unit and pays only their share of the depletion, so each one uses too much, and the resource collapses even though every user could see it coming. The tragedy is not stupidity; it is that the private cost and the social cost are different lines, and each person is reading the lower one.

Regulation, in the narrow economic sense, is the set of tools for moving the price back onto the higher line: a tax equal to the missing cost, a cap with tradable permits, a quota, a liability rule that makes the seller pay the neighbour, a chargeback that bills the team for the cluster time it actually used. Each tool has its own failures, but the reason any of them exist is the same hatched band.

Real world

Beira Goods and the late parcel, constructed. Beira, the invented 40-product seller from earlier sessions, saves on a cheaper courier and one parcel in twenty arrives late. Beira's own cost of that is a refund now and then. The marketplace's cost is larger: a buyer who waited two weeks for a Beira parcel trusts the whole platform a little less, and the next seller they see pays for it in a lost sale. Beira set its price on the refund line, not on the trust line, and it was right to, given the price it faced. The fix that platforms reach for is to put the missing line back: a delivery-time rule, a fee, a seller rating that buyers can see. Beira is invented; the mechanism is the reason every marketplace has a seller policy.

Part 2 · covers information asymmetry, adverse selection, moral hazard

The market for lemons

5 min live

A used car is worth a lot if it is sound and little if it is a lemon, and only the seller knows which. A buyer who cannot tell them apart will pay one price for either, somewhere near the average. But the owner of a sound car will not sell it for an average price, so the sound cars leave the market and the average falls, and the next buyer pays less, and the next sound car leaves. That spiral is Akerlof's, from a 1970 paper short enough to read in an evening, and it is the mechanism behind every warranty, audit, certificate and benchmark you have ever been shown.

THE LEMONS SPIRAL one price for goods the buyer cannot tell apart 1 · quality cannot be seen, so one price for all of it 2 · the price is the average of what buyers expect inside 3 · owners of the good ones will not sell at an average 4 · what is left is worse, so buyers expect less and pay less and round again, one notch lower the good ones leave worth more to their owners than the average price Akerlof 1970, QJE 84(3): an average price for unseen quality drives the best goods out, and the market shrinks.
🔍 Click to zoom - nobody in the loop is dishonest; the sound cars leave because their owners can count
LiveWhy the average price drives the best sellers out3 min▶

Start with what the buyer can see: the make, the year, the mileage, the paint. Now what they cannot: whether the engine was ever run dry, whether the service history is real. The seller knows both halves. That gap is information asymmetry, and its first consequence is that the buyer prices the car as a draw from the pool rather than as the specific car in front of them. The offered price is the average of what the pool is expected to contain.

The second consequence is the one that bites. An average price is a good deal for the owner of a lemon and a bad deal for the owner of a sound car, so the sound cars are withdrawn and the lemons are offered. The pool the buyer is drawing from is now worse than the one they priced, so the next offer is lower, which withdraws the next tier of sound cars. Adverse selection is the name for a pool that gets worse because of the price you set for it. In the limit the market for sound cars stops existing, not because anybody lied, but because the honest owners could not prove they were honest.

Akerlof's paper, "The Market for Lemons", Quarterly Journal of Economics 84(3), 1970, pages 488 to 500, works this through for cars, insurance and credit in developing markets, and its closing sections are about the institutions that stop the spiral: brands, chains, licences and guarantees. Every one of them is a way for a good seller to make quality visible before the money moves.

LiveBefore the deal and after it: adverse selection and moral hazard2 min▶

Adverse selection happens before the trade: the hidden fact is a quality that already exists, and the price sorts who shows up. Moral hazard happens after: the hidden fact is a choice the other party makes once the deal is signed, and the deal itself changes the choice. A driver with full insurance parks less carefully. A vendor paid a flat fee for a dataset has less reason to keep it clean than one paid per row that passes a check. A team whose model is judged only at launch has less reason to keep monitoring it than one judged at month six.

The two need different fixes. Adverse selection is fixed by making quality visible up front: a sample, an audit, a signal. Moral hazard is fixed by keeping some of the payoff tied to behaviour after signing: a deductible, a retention clause, a service level, a payment that follows the metric rather than preceding it. Confusing the two is common, and the usual symptom is a beautifully audited purchase that decays in quality within a quarter because nothing after the signature was tied to keeping it good.

Self-studySignalling: how the good sellers get back in3 min▶

A signal is anything a good seller can do cheaply that a bad seller can only do dearly. A warranty is the classic case: a seller who knows the car is sound can promise to fix it for a year at little expected cost, while a seller of a lemon would face a real bill, so only the sound cars get warranties, and the buyer can read the warranty as a fact about the engine. A brand works the same way, since a brand is a promise that is expensive to break. So does a certificate, a published audit, a money-back sample period, or a benchmark score that the seller did not choose the benchmark for.

The test for a signal is cost asymmetry: if the bad seller can send the same signal at the same cost, it is not a signal, it is decoration. A "quality assured" badge that anybody can print is decoration. An independent audit with a named auditor is a signal. A benchmark that the vendor picked, ran and reported is somewhere between, and reading which is the job of the deep-dive track's eighth session, which applies all of this to models and the evals that vouch for them.

Screening is the same trick from the buyer's side: the buyer designs a choice that only the good sellers would accept. A contract that pays per row that passes a check screens out vendors who know their rows will not pass. Insurers, lenders and procurement teams do this all day, and the shape of the contract is itself a statement about what the buyer suspects.

Real world

Every marketplace is a lemons problem with a rating system bolted on. On Olist, the Brazilian marketplace used throughout these sessions, a buyer choosing between two sellers of the same product sees the price and a star rating and almost nothing else; the seller knows how carefully the parcel will be packed and how honest the stock count is. Without the rating, the careful sellers would be paid the same as the careless ones and would have every reason to leave. The rating is a signal that the platform manufactures on the seller's behalf, out of the buyers who came before, and it is the mechanism that keeps the good sellers in the pool. No number is claimed here about how well it works; the point is what it is for.

Part 3 · covers Goodhart's law

The metric that became a target

4 min live

A number on a dashboard is a good measure while nobody has a reason to move it. The day it becomes a target, a bonus, a ranking, a launch gate, the people who can move the number directly start doing so, and moving the number is nearly always cheaper than moving the thing the number stood for. From that day the two part company. The popular wording, "when a measure becomes a target, it ceases to be a good measure", is Marilyn Strathern's, from 1997, and it is called Goodhart's law after a 1975 paper that made the same point about monetary targets in more careful language.

THE NUMBER AND THE THING IT STOOD FOR they track each other right up to the day one of them is rewarded LEVEL TIME the day it became a target they move together the dashboard number the thing it stood for WHY THEY PART before: the number moved only when the thing moved after: the number can be moved directly, and moving the number is cheaper than moving the thing the correlation that made it a good measure is the first casualty The popular wording is Strathern 1997, European Review 5(3) 305-321, not Goodhart 1975. "When a measure becomes a target, it ceases to be a good measure." The number stayed on target. The thing did not.
🔍 Click to zoom - the hatched wedge is the whole law: the number kept its promise and the thing it stood for was left behind
LiveA measure and a target are different objects4 min▶

A measure is a number chosen because it moves when something you care about moves. Ticket resolution time moves when support gets better. Test-set accuracy moves when a model gets better. The number is useful precisely because of that correlation, and the correlation exists because nobody is trying to move the number for its own sake. A target is the same number with a reward attached. The reward gives everyone who can touch the number a reason to move it, and the cheapest way to move a number is almost never the way that moves the thing behind it.

Resolution time falls when agents close tickets early and reopen them. Test-set accuracy rises when the test set leaks into training, or when the team tunes against it for a year until it is a validation set in all but name. Neither of these is fraud; each is a rational response to the price the target put on the number. And in every case the number keeps rising while the thing it stood for stops moving or falls, which is the hatched wedge in the figure and the most expensive shape in management.

Three defences, none of them complete. Pair the metric with a counter-metric that the same cheap move would push the wrong way: resolution time with reopen rate, accuracy with a held-out set nobody has seen. Rotate the measure before it is fully learned. Audit the mechanism, not the number: once a quarter, trace a sample of the units behind the metric back to the thing, and see whether the number still means what it meant when it was chosen.

Self-studyWhere the phrase came from, and what the 1975 paper was about2 min▶

The sentence people quote, "when a measure becomes a target, it ceases to be a good measure", is from Marilyn Strathern's 1997 article in European Review 5(3), pages 305 to 321, on audit in British universities. It is usually attributed to Charles Goodhart, whose 1975 paper on UK monetary policy made the same observation about a statistical relationship collapsing once it was used as a control target, in language aimed at central bankers rather than managers. Both are worth reading; the crisp sentence is hers, the priority is his, and the mechanism is the same in both.

The reason the attribution matters beyond tidiness is that the two texts point at different fixes. Goodhart's context says: a relationship that held under one policy will not hold under a policy that leans on it, so do not build the policy on the relationship. Strathern's context says: an audit culture changes the audited, so measure with care about what the measuring does. A data team needs both readings, one for the model that predicts a metric and one for the dashboard that rewards it.

Real world

The test set that became a validation set. A pattern any ML team will recognise, and no figure is claimed for it: a model's held-out accuracy is reported at launch, then used as the gate for every subsequent release. Each release is tuned until it clears the gate. After a year the held-out set has been consulted so many times that it has stopped being held out; the number on the gate is high and the number on real traffic is not. The metric was a measure at launch and a target by the second release, and everything after that is Strathern's sentence playing out in a CI pipeline. The deep-dive track's eighth session does this properly, for public benchmarks and the evals that replace them.

Build-along

Run the three failures on a data purchase you have seen

★ 22 min · everyone works it through

No code tonight. Pick one purchase you have actually watched happen: a dataset bought from a vendor, a model served through an API, an annotation contract, an analytics tool, a data-quality product. The three failures will each be there, and the worksheet is six questions that find them. The figure draws the middle one, because a dataset is the purest lemon ever sold: its quality is sealed inside until you have paid, and the sellers with the cleanest data are the first to walk away from an average price.

A DATASET'S QUALITY IS SEALED UNTIL YOU HAVE PAID FOR IT what each seller knows A · good B · poor C · good one price set by the average buyers expect the buyer sees the label and the price A and C leave first worth more than the average price THE WAY OUT OF THE SPIRAL a sample before payment an audit by a third party a benchmark the seller did not set each one opens the seal What stays is B. The next buyer expects B and pays less, so the next good seller leaves too. The mechanism is Akerlof's; the goods are datasets. Nothing in the loop needs a dishonest seller, only a sealed box.
🔍 Click to zoom - the dashed arrow is the entire economics of due diligence: anything that lets the buyer see inside before paying stops the good sellers leaving

Question 1 · Name the purchase. One you watched, not one you imagine. What was bought, from whom, for roughly what shape of price (flat, per row, per call, per seat), and who signed. The shape of the price matters for question 4.

★ Step 1 · the purchase, on paperWhat was bought: ______________________ Sold by: ______________________ Price shape (flat / per unit / per call / per seat): ______________________ Who signed, and who uses it: ______________________

Question 2 · Which quality was sealed? List what the buyer could see before paying (a pitch, a schema, a sample of 100 rows, a benchmark score, a logo wall) and what they could not (coverage of your cases, label accuracy on your distribution, freshness, how the score was produced). The second column is where the lemons live.

★ Step 2 · the sealed boxCould be seen before paying: ______________________ Could NOT be seen before paying: ______________________ The one that mattered most: ______________________

Question 3 · Who bore a cost they did not choose? Every purchase has a neighbour. The team that inherited the pipeline, the on-call engineer paged for a vendor's outage, the people whose records were in the dataset, the other tenants on the cluster. Write the neighbour and the cost, and then whether any of it was on the price tag.

★ Step 3 · the hatched bandWho paid a cost outside the trade: ______________________ What the cost was: ______________________ Was it on the tag? (yes / partly / no): ______________________

Question 4 · Which number became a target? Somewhere in the deal a metric was rewarded: an accuracy on a benchmark, a row count, a coverage percentage, a response time in a service level, a usage figure in a renewal. Write it, write who could move it directly, and write the cheapest way to move it without moving the thing. That last line is what the vendor, or your own team, will eventually do.

★ Step 4 · the metricThe rewarded number: ______________________ Who can move it directly: ______________________ Cheapest way to move it, not the thing: ______________________ A counter-metric that would catch it: ______________________

Question 5 · What signal would have opened the seal? For the sealed quality in question 2, name the thing a good seller could have offered cheaply and a bad seller could not: a sample scored on your own cases, a third-party audit, a per-row payment that only pays for rows that pass, a benchmark you chose. If nothing comes to mind, the purchase was made at an average price, and the spiral has already started.

★ Step 5 · the signalThe signal a good seller could send cheaply: ______________________ Why a bad seller could not: ______________________ Was it asked for? (yes / no): ______________________

Question 6 · The sentence. Fold the three failures into one line you could say in a procurement review. It should name a sealed quality, a neighbour's cost and a targeted number, and it should end with the one thing you would ask for next time. Deep-dive session 8 runs the same three questions against model markets, where the sealed box is a model card and the signal is an eval.

★ Step 6 · the sentence"We paid an average price for ___ because we could not see ___ before paying; ___ bore ___ that was not on the tag; and ___ became a target the moment it was rewarded. Next time we ask for ___ before the money moves."

Keep the three questions as a standing checklist. Sealed quality, unpriced neighbour, targeted number. Any purchase that clears all three without a written answer was made on a price that was missing at least one line, and the missing line will be paid by somebody, later, without a receipt.

Homework

Before Foundations session 5

30 min
  1. Finish the six-question worksheet for the purchase you picked, and then run it a second time on a purchase somebody else made. Note which of the three failures was the hardest to find; it is usually the neighbour.
  2. Find one externality in your own work that lands on a team you do not talk to: a query, a schema change, an alert. Write the private cost, the social cost, and what would put the difference on the tag.
  3. Find one signal you have relied on and test it for cost asymmetry: could a bad seller have sent it at the same cost? If yes, write what would have been a real signal.
  4. Bring one price you know well and the year you first knew it. Foundations session 5 is about what a price means when the money it is written in changes value, and that price will be your worked example.
Check yourself

Three questions

Clear all three and Foundations session 4 gets stamped in your passport.

1 · A buyer cannot tell a sound used car from a lemon before paying, so they offer one price for either. What does Akerlof's argument say happens next?

Adverse selection is a pool that gets worse because of the price set for it. The good sellers leave first, and nobody in the loop has to be dishonest. Akerlof 1970, QJE 84(3) 488-500; the institutions that stop it are warranties, brands, audits and any signal a bad seller cannot send cheaply.

2 · A shared analytics cluster is free to every team that uses it. One team's heavy nightly job slows everyone else's morning queries. In the private-cost, social-cost picture, what is going on?

An externality is a cost that lands outside the trade, and the market, or the team, does exactly what the incomplete price tells it. Nothing broke. The fix is to move the price onto the higher cost line, which is what a chargeback, a cap or a rule does.

3 · A model's held-out accuracy is used as the release gate for a year, and every release is tuned until it clears the gate. The gate number keeps rising and accuracy on real traffic does not. Which statement is right?

The metric was a measure at launch and a target by the second release; each tuning pass was a rational response to the reward. The crisp wording is Strathern 1997, European Review 5(3); Goodhart 1975 made the point earlier, about monetary targets, in different words. Punishment and a higher gate both leave the mechanism in place.

Sources covered

What this session teaches, and where it came from

✓Externalities, private vs social cost, public goodsStandard economics, no single source; taught as a missing line on the price tag, not as a broken mechanism
✓Information asymmetry, adverse selection, the lemons spiralAkerlof 1970, "The Market for Lemons", Quarterly Journal of Economics 84(3) 488-500; read at source for these pages
✓Moral hazard, before-the-deal vs after-the-dealStandard economics, no single source; the distinction is taught, the contract theory behind it is not
✓Goodhart's law and its wordingPopular phrasing is Strathern 1997, European Review 5(3) 305-321, read at source; Goodhart 1975 is named as the earlier statement about monetary targets and is paraphrased, not quoted
◐The tragedy of the commons, regulation as a toolkit, signalling and screeningNamed in self-study as standard economics; no paper is cited for any of the three and no empirical figure is claimed
◐Beira Goods, the late parcel; the test set that became a validation setConstructed cases; the page says so, and no number is attached to either
◐Olist seller ratings as a manufactured signalMechanism only; no figure about how well ratings work is claimed, and none was computed

Every fact on this page, and its verification tier, is recorded in the course's source map.

Foundations session 4 cheat sheet · pin this

An externality is a missing lineThe price carries the seller's cost. Whoever else pays was never in the trade. The market did what the price said.
Public good, commonsNobody can be excluded, so nobody pays first. Anybody can use it and it runs out, so everybody uses too much.
The lemons spiralOne average price for unseen quality. The good sellers leave first. Akerlof 1970.
Before vs afterAdverse selection: the hidden fact exists before the deal. Moral hazard: the hidden choice is made after it. Different fixes.
A signal costs the bad seller moreWarranty, audit, per-row payment, a benchmark you chose. A badge anybody can print is decoration.
Measure vs targetReward a number and the cheapest way to move it wins. Strathern 1997 wording. Pair it with a counter-metric.