Thought Toys · Strategy & computation · Exhibit 67

Better at both, and still better off trading

Ana bakes faster than Ben. Ana also makes jam faster than Ben. By every measure she is the better producer — and they still both end up with more by having Ben do all the baking. What decides who makes what isn't who's better at it. It's what each of them has to stop doing in order to do it.

Everything the two of them can make together, in a day specialise, then trade both do a bit of everything the gain

Try it
your turn — slide either dial until the amber corner sinks onto the dashed line and the gain vanishes

What you're seeing

Ana and Ben each have one working day. Ana can turn that day into 10 loaves or into her jam figure; Ben can turn his into 6 loaves or into his. Split a day between the two jobs and you get the in-between amounts. The chart shows every combination of bread and jam the pair can produce together. (The two bread figures are held fixed so there's one thing moving at a time. They're levers too: drop Ana's bread output toward 6 and her cost per loaf falls, which would eventually hand her the baking instead. All four numbers matter, only as a ratio.)

The dashed line is the honest baseline: both of them dividing their day the same way, each making a bit of each thing. The amber line is what happens if each one drops a job entirely and they swap afterwards. It bulges outward — the same two people, the same hours, more stuff — and the bulge is the gain from trade.

Which job should each drop? Not the one they're worse at. The one that costs them more of the other thing. Ana makes 10 loaves or 8 jars a day, so every loaf she bakes costs her 0.8 jars. Ben makes 6 loaves or 1 jar, so every loaf costs him about 0.17 jars. Bread is cheap for Ben and expensive for Ana — even though Ana is faster at it. So Ben bakes, Ana makes jam, and there's more of both to go round. Opportunity cost, not skill, is the thing that decides.

Drag the dials until the two costs match exactly and something clean happens: the corner sinks onto the dashed line and the gain doesn't merely shrink, it goes to zero. Trade pays for difference. When there's no difference in what things cost each of them, there is precisely nothing to gain — no matter how much more productive one of them is in absolute terms. Nudge either dial a hair off that tie and the corner lifts again: it isn't that a big difference is needed, only that the two costs aren't the same number. Which direction they differ in is what decides who bakes; how far apart they are only sets how much the swap is worth.

The rule, exactly. With outputs-per-day abread, ajam for Ana and bbread, bjam for Ben, the cost of one loaf is costAna = ajam ⁄ abread,   costBen = bjam ⁄ bbread whoever's is lower bakes. The joint frontier runs from (0, ajam+bjam) through the corner to (abread+bbread, 0); the no-specialisation chord joins the same two endpoints in a straight line, and the two coincide exactly when the costs are equal. Verified in node (improve/verify/67-comparative-advantage.js): the closed-form kinked frontier matches a 20,000-step brute-force search over every division of both producers' labour, at 61 points across four parameter sets, to inside that search's own derived grid resolution (about 0.003% of the chart's scale) rather than a tolerance picked by eye; the chord is confirmed by construction to be exactly the "both split their day in the same proportion" locus; and in the default case Ana out-produces Ben at both goods yet the gain is strictly positive at all 59 interior points of the frontier. Negative controls (three): with the two costs set exactly equal, the gain is exactly zero at all 81 sampled points — refuting "specialisation always pays" — even when one producer is several times more productive overall; specialising the wrong way round lands strictly below the no-trade chord, so the direction is the rule, not specialisation itself; and the absolute-advantage heuristic (the better producer makes everything, leaving the other idle) is shown by direct comparison to yield strictly less — 3.2 jars against 8 at the same bread output.

Also in Strategy & computation: Everyone was consistent. The vote wasn't. →

All 23 in Strategy & computation
  1. 10The evolution of trust
  2. 23Sorting algorithms
  3. 24PageRank & the random surfer
  4. 25Huffman coding
  5. 26Dijkstra's shortest path
  6. 27Nash equilibria
  7. 33The learning-rate cliff
  8. 36A* pathfinding
  9. 37Braess's paradox
  10. 44Diffie–Hellman key exchange
  11. 45Preferential attachment
  12. 46Aliasing & the Nyquist limit
  13. 47The secretary problem
  14. 49Freeze too fast, stay stuck
  15. 51Cross one line, and its territory closes
  16. 56Catch one error, miss the next
  17. 57Why more processors stop helping
  18. 58Why a busy line explodes
  19. 59The set that's only sure when it says no
  20. 60The fit that memorizes instead of learns
  21. 61When the wire breaks, pick one
  22. 67Better at both, and still better off trading — you are here
  23. 69Everyone was consistent. The vote wasn't.

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 67.