Sub topic 11
Comparative advantage and gains from trade
This chapter assumes you know opportunity cost (the value of the best alternative given up) and can read a straight-line production possibilities frontier (PPF). It also assumes basic ratio arithmetic. Here you will use those tools to explain why two producers can both end up better off by specializing and trading, even when one of them is better at making everything.
The question trade has to answer
Suppose two producers, A and B, each make wheat and cloth. A is more productive at both goods. Intuition says A should make everything and B has nothing to offer. That intuition is wrong, and the reason is the central result of this chapter.
Productivity tells you how much you can produce. It does not tell you what you give up to produce it. Trade decisions depend on what you give up, so the right comparison is opportunity cost.
Absolute advantage versus comparative advantage
- A producer has an absolute advantage in a good if it can make more of that good than another producer with the same resources and time.
- A producer has a comparative advantage in a good if its opportunity cost of making that good is lower than the other producer's.
Absolute advantage compares output. Comparative advantage compares opportunity costs. The two can disagree.
Computing opportunity costs from a linear frontier
Each producer has one day of time. If it spends the whole day on one good, it makes the following amounts.
| Producer | Maximum wheat per day | Maximum cloth per day |
|---|---|---|
| A | 10 | 20 |
| B | 6 | 6 |
A has an absolute advantage in both goods (10 > 6 and 20 > 6). Now compute the cost of one unit of each good. With a straight-line frontier, the opportunity cost of one unit of a good is the maximum of the other good divided by the maximum of this good.
# Output per day if each producer uses all its time on one good.
max_output = {
"A": {"wheat": 10, "cloth": 20},
"B": {"wheat": 6, "cloth": 6},
}
def cost_of(producer, good, other):
"""Units of `other` given up to make one unit of `good` (linear frontier)."""
m = max_output[producer]
return m[other] / m[good]
def comparative_advantage(good, other):
"""The producer with the lowest opportunity cost of `good`."""
return min(max_output, key=lambda p: cost_of(p, good, other))
for p in ("A", "B"):
print(p, "wheat costs", cost_of(p, "wheat", "cloth"), "cloth")
print(p, "cloth costs", cost_of(p, "cloth", "wheat"), "wheat")
print("Wheat:", comparative_advantage("wheat", "cloth")) # B
print("Cloth:", comparative_advantage("cloth", "wheat")) # AThe output is:
A wheat costs 2.0 cloth
A cloth costs 0.5 wheat
B wheat costs 1.0 cloth
B cloth costs 1.0 wheat
Wheat: B
Cloth: AThe table of costs is easier to read than the code output.
| Producer | Cost of 1 wheat | Cost of 1 cloth |
|---|---|---|
| A | 2 cloth | 0.5 wheat |
| B | 1 cloth | 1 wheat |
B gives up less cloth per unit of wheat (1 versus 2), so B has the comparative advantage in wheat. A gives up less wheat per unit of cloth (0.5 versus 1), so A has the comparative advantage in cloth. A is better at both goods in absolute terms, yet B still has a comparative advantage in wheat.
The advantage is also a matter of which good the producer is relatively better at. A is twice as productive as B in wheat (10 versus 6, a ratio of about 1.67) and more than three times as productive in cloth (20 versus 6, a ratio of about 3.33). A's edge is larger in cloth, so A's relative strength is cloth.
Why both producers cannot have the advantage in the same good
The cost of wheat is the reciprocal of the cost of cloth for the same producer. A's wheat costs 2 cloth, and A's cloth costs 1/2 wheat. If A's cost of wheat is lower than B's, then A's cost of cloth must be higher than B's. So unless the two cost ratios are exactly equal, each producer has a comparative advantage in exactly one good.
Production and consumption without trade
Without trade, each producer can consume only what it makes. Assume each splits its day evenly between the two goods, which sits at the middle of a straight-line frontier.
| Producer | Wheat | Cloth |
|---|---|---|
| A (half day each) | 5 | 10 |
| B (half day each) | 3 | 3 |
| Total | 8 | 13 |
Specialization
Now each producer concentrates on the good where its opportunity cost is lower. B makes wheat only, which gives 6 wheat. A makes cloth, but A also makes 2 wheat so the world still has 8 wheat. Making those 2 wheat costs A 4 cloth (at 2 cloth per wheat), so A makes 20 − 4 = 16 cloth.
| Producer | Wheat | Cloth |
|---|---|---|
| A | 2 | 16 |
| B | 6 | 0 |
| Total | 8 | 16 |
The total wheat is unchanged at 8, and total cloth rises from 13 to 16. Specialization moved production to the producer who gives up less. The 3 extra units of cloth are the gains from trade. They exist only because the producers moved resources toward their lower opportunity costs.
The next step is to share that extra output.
Terms of trade
The terms of trade are the rate at which the two goods exchange. A will buy wheat from B only if the price is below what A pays to make wheat itself, which is 2 cloth. B will sell wheat only if the price is above what B gives up to make it, which is 1 cloth. Any price between those limits makes both better off.
| Price of 1 wheat (in cloth) | Result |
|---|---|
| Below 1 | B refuses: it can make cloth cheaper than it earns |
| Exactly 1 | B gains nothing, A takes all the gains |
| Between 1 and 2 | Both gain |
| Exactly 2 | A gains nothing, B takes all the gains |
| Above 2 | A refuses: it can make wheat cheaper itself |
Where the price falls inside the range decides how the gains are split. Bargaining power, the number of other buyers and sellers, and market conditions determine that, and later chapters on markets cover it. Here, assume a price of 1.5 cloth per wheat.
price = 1.5 # cloth per wheat, between 1 and 2
traded_wheat = 3 # wheat A buys from B
# (wheat, cloth) consumed without trade, from the half-day split.
before = {"A": (5, 10), "B": (3, 3)}
# After specialization and trade.
after = {
"A": (2 + traded_wheat, 16 - price * traded_wheat),
"B": (6 - traded_wheat, price * traded_wheat),
}
for p in ("A", "B"):
dw = after[p][0] - before[p][0]
dc = after[p][1] - before[p][1]
print(p, "before", before[p], "after", after[p], "change", (dw, dc))The output is:
A before (5, 10) after (5, 11.5) change (0, 1.5)
B before (3, 3) after (3, 4.5) change (0, 1.5)Each producer consumes the same wheat as before and 1.5 more cloth. The two gains add up to the 3 extra units of cloth. Trade lets each producer consume a bundle that lies outside its own frontier, which neither could reach alone.
The flow of goods
Common errors
Confusing absolute and comparative advantage
The most common mistake is to conclude that a producer with an absolute advantage in everything should produce everything. Compare opportunity costs, not outputs. A producer that is better at everything still gives up something by using its time on a low-value task, and that cost is the reason to trade.
Comparing the wrong ratio
Check which good sits in the numerator. The cost of wheat in cloth is cloth divided by wheat. If you flip it, you get the cost of cloth, and you will assign the advantages to the wrong producers. A quick test is that the two costs for one producer must be reciprocals of each other.
Assuming equal costs still give gains
If both producers have the same opportunity costs, no one has a comparative advantage and there are no gains from specialization. For example, two producers who each give up exactly 1 cloth per wheat have nothing to gain by trading with each other.
Choosing a price outside the range
A price outside the two producers' opportunity costs leaves one of them worse off than self-sufficiency, so that producer refuses the trade. Always check that the price lies between the two costs.
Treating wages or money prices as the basis
Comparative advantage is defined with opportunity costs measured in goods. Money wages and exchange rates affect which trades happen in practice, but they are not what creates the gains. The gains come from differences in what each side gives up.
Limits of the model
The straight-line frontier gives complete specialization. Real frontiers usually bow outward because of increasing opportunity costs (covered earlier in this tutorial). As a producer shifts more resources into one good, its cost of that good rises, and the gap between the producers narrows. The result is partial specialization: each producer expands its comparative-advantage good until the costs of the two sides are close. The reasoning still holds, but the endpoint is not "all of one good".
The model also hides several real-world points.
- It treats each side as one producer. Inside a country, some workers and firms lose when trade expands, even when the country gains overall. Gains in total do not guarantee that everyone gains.
- It ignores transport and transaction costs. If these exceed the gain from specialization, trade does not happen.
- It treats production possibilities as fixed. Over time, experience and investment can change which good a producer is best at.
- It ignores bargaining. The model says gains exist, not who gets how much of them.
None of these removes the main result. They explain why the model is a starting point for more detailed analysis.
How this connects to the rest of the tutorial
The chapter combines two earlier ideas. Opportunity cost gives the numbers that decide who should make what. The production possibilities frontier shows the trade-off for each producer and, with a straight line, makes the cost a constant ratio. With both in place, the question "who should produce this?" has a precise answer: the producer who gives up the least.
Exercises
Exercise
Lena can edit 6 photos or write 3 articles in one hour. Omar can edit 2 photos or write 2 articles in one hour. Who has the comparative advantage in articles, and between which two prices (in photos per article) can both gain from trade?
Show answer
Lena gives up 6 / 3 = 2 photos per article. Omar gives up 2 / 2 = 1 photo per article. Omar has the comparative advantage in articles because his cost is lower. Lena has the comparative advantage in photos: her cost is 3 / 6 = 0.5 articles per photo, and Omar's is 1 article per photo. Both gain at any price between 1 and 2 photos per article. Lena would pay up to 2 photos for an article, which is her own cost, and Omar would accept at least 1 photo, which is his.
Exercise
Country X can make more of every good than country Y. Explain why X can still gain by trading with Y.
Show answer
The gains depend on opportunity costs, not on output levels. If X's relative strength is greater in one good, X gives up less by making that good and more by making the other. Y gives up less than X for the other good. If each specializes where its opportunity cost is lower and trades at a price between the two costs, total output of both goods can rise, and both countries can consume more than they could alone. X's absolute advantage does not remove the cost of using its limited resources on the good where it is relatively weaker.
Exercise
Producer P gives up 3 units of good S to make 1 unit of good T. Producer R also gives up 3 units of S to make 1 unit of T. Does specialization create gains from trade? Why or why not?
Show answer
No. The opportunity costs are identical, so neither producer has a comparative advantage. Moving production from one to the other does not change the total output of either good, so there is no extra output to share. Trade could still happen for other reasons, such as variety, but the specialization gain described in this chapter is zero.