Shelves / Arithmetic and Numbers
AN·08
Ratio, Proportion and Rates
Comparing quantities by how many times, not how much more: what a ratio is and how it differs from a fraction, sharing in a ratio, proportion and the rule of three, direct and inverse proportion and how to test for them, rates and unit prices, why average speed isn't the average of the speeds, and Simpson's paradox, where combining groups reverses a comparison.
Start here
What this chapter answers
What does "rice to water 2 : 3" mean, and how is it different from ? How do you share ₹9,000 between three people in the ratio 2 : 3 : 4? If 4 kg cost ₹260, why is the price of 7 kg found by one division and one multiplication? Which is cheaper per kilogram, a 500 g pack or a 5 kg sack? If three workers take 20 days, why do five take 12, not 33? Why is a trip at 60 km/h there and 40 km/h back not an average of 50 km/h? And how can a treatment be better for every kind of patient and worse overall?
Ratio in one picture
A recipe says rice and water in the ratio 2 : 3. Picture it as cups in a row: two cups of rice, three cups of water. Make twice as much: four and six. Make half as much: one and one and a half. The amounts change; the ratio, "for every 2 of rice, 3 of water", doesn't. Everything in this chapter is about keeping that "for every" fixed while the amounts change, and about noticing when it isn't fixed at all.
Ratios
What a ratio says
A ratio compares two quantities by how many times one fits in the other: "for every of the first, there are of the second". A class with 12 girls and 18 boys has girls to boys 12 : 18. Ratios can compare more than two quantities (cement, sand and gravel 1 : 2 : 4) and can compare quantities of different kinds (₹260 for 4 kg), though then it's usually called a rate (later in this chapter).
A ratio and a fraction are closely related but answer different questions. Girls to boys is 12 : 18; girls as a fraction of the class is , because the class is 30. A ratio compares part with part; a fraction usually compares part with whole. To go from one to the other, add the parts: in 2 : 3, the first part is of the whole.
Equivalent ratios and simplest form
Multiplying or dividing every part by the same number gives an equivalent ratio, describing the same "for every": . Dividing by the gcd of the parts (chapter 5) gives the simplest form: , so . For three parts, divide by the gcd of all three: . Ratios with fractions or decimals are cleared first: , and (multiply both by 6).
Sharing in a ratio
To share ₹9,000 between Asha, Bilal and Chitra in the ratio 2 : 3 : 4, count the parts: . One part is , so the shares are ₹2,000, ₹3,000 and ₹4,000. Check: they add to ₹9,000, and . Every sharing problem has these two steps: find one part, then multiply. When one part isn't a whole number of paise, the shares need a rounding rule that keeps the total right (chapter 6's exercises, S3).
Proportion
Two equal ratios
A proportion says two ratios are equal: , or . By chapter 6's test, that's exactly when (the "cross-products" are equal). So if three of the four numbers are known, the fourth follows. If 4 kg cost ₹260, how much do 7 kg cost?
That is the rule of three: multiply the two numbers that sit diagonally across from the unknown, divide by the third.
The unit method
The same answer with more meaning: find the value for one unit, then scale. 4 kg cost ₹260, so 1 kg costs , and 7 kg cost . The middle number, ₹65 per kg, is the unit rate, and it's usually the most useful number in the problem: it compares packs, checks bills and predicts any amount. The rule of three and the unit method are the same calculation in a different order.
Scaling: recipes and maps
A recipe for 4 scaled to 6 multiplies every amount by the scale factor : the ratios between ingredients are unchanged. A map at 1 : 50,000 means 1 cm on the map is 50,000 cm (500 m) on the ground; 3.4 cm on the map is cm, 1.7 km. A scale is a ratio with the units cancelled, which is why it can be written without units at all; areas scale by the square of the factor (a square 1 cm on a side on that map is m on the ground, 25 hectares), a point chapter 10 returns to.
Direct and inverse proportion
Two quantities are in direct proportion when one is always the same multiple of the other: for a fixed . Double one, and the other doubles. Price and weight at a fixed price per kg are directly proportional ( is the unit price). On a graph, the points lie on a straight line through the origin.
They're in inverse proportion when their product is fixed: . Double one, and the other halves. If a job takes 60 worker-days, 1 worker takes 60 days, 2 take 30, 3 take 20, 5 take 12. Speed and time for a fixed distance are inversely proportional too.
The curve never reaches zero: more workers always help a little less. (Real jobs are not this tidy: ten people can't paint one small room ten times as fast. Inverse proportion is a model, right only when the work really divides.)
Is it proportional? Test it
Many relationships look proportional and aren't. A taxi that charges ₹50 to start plus ₹25 a kilometre charges ₹75 for 1 km and ₹300 for 10 km: ten times the distance, four times the fare. The test is simple: direct proportion means the ratio is the same for every pair; inverse proportion means the product is the same. The taxi fails both; its fare minus the fixed ₹50 is what's proportional to the distance.
Rates
Quantities per unit of another
A rate is a ratio between quantities of different kinds, written "per": 65 rupees per kilogram, 48 kilometres per hour, 14 kilometres per litre, 120 heartbeats per minute. Its unit is the two units divided (₹/kg, km/h), and the arithmetic of units follows the arithmetic of the numbers: . A rate turned upside down is still a rate, answering the other question: 14 km per litre is litre per km.
Unit prices
Which is cheapest: 500 g for ₹46, 1 kg for ₹89, or 5 kg for ₹430? Bring each to the same unit: ₹92, ₹89 and ₹86 per kg. The sack is cheapest per kg, by about 7 % against the small pack. (Whether it's the best buy also depends on storage, waste and how fast you use it; the unit price answers only the price question.) To compare two packs without dividing, cross-multiply as in chapter 6: against tells you the 1 kg pack is cheaper per gram than the 500 g one, exactly.
Average speed
Drive 120 km to a town at 60 km/h and back at 40 km/h. The average speed is not 50 km/h. Average speed is total distance ÷ total time: the trip there takes 2 hours, back takes 3, so 240 km in 5 hours is 48 km/h. The slower leg lasts longer, so it counts for more. The average of the speeds would be right only if you spent equal time at each speed. For equal distances the right average is the harmonic mean: .
The rule behind it is chapter 6's: combine rates by combining their totals, not by averaging the rates. A rate is a record ("so many km in so many hours"), and records combine as the mediant: .
Simpson's paradox
That rule has a surprising consequence. Here are real numbers from a 1986 study of two treatments for kidney stones, split by the size of the stone:
| Aspect | Small stones | Large stones | All patients |
|---|---|---|---|
| Treatment A | 81 of 87 (93 %) | 192 of 263 (73 %) | 273 of 350 (78 %) |
| Treatment B | 234 of 270 (87 %) | 55 of 80 (69 %) | 289 of 350 (83 %) |
Treatment A did better for small stones and better for large stones, yet worse overall. Nothing is miscounted. Treatment A was given mostly to the harder, large-stone cases (263 of its 350), where success rates are lower for everyone; B was given mostly to easy cases. Each overall rate is a mediant, weighted by how the patients were split, and the two treatments were weighted differently. This reversal is Simpson's paradox.
The arithmetic fact behind it: from and it does not follow that . Mediants don't preserve comparisons when the denominators differ. Which comparison to trust is not an arithmetic question but a question about the situation: here, stone size affected both the choice of treatment and the outcome, so the comparison within each size is the fair one. In other data the combined figure is the right one. The lab shows how often random tables reverse.
Lab: ratios and rates in code
Experiment 1: unit rates, sharing and scales, exactly
from fractions import Fraction as F
# Rule of three: 4 kg cost ₹260, so 7 kg cost?
unit = F(260, 4)
print("unit rate:", unit, "rupees per kg; 7 kg cost", unit * 7, "rupees")
# Which pack is cheapest per kg? Compare exactly, as rupees per kg.
packs = {"500 g for ₹46": (46, F(1, 2)), "1 kg for ₹89": (89, F(1)), "5 kg for ₹430": (430, F(5))}
for name, (price, kg) in sorted(packs.items(), key=lambda kv: kv[1][0] / kv[1][1]):
print(f" {name:<14} {price / kg} rupees per kg")
# Share ₹9,000 in the ratio 2 : 3 : 4.
ratio = {"Asha": 2, "Bilal": 3, "Chitra": 4}
part = F(9000, sum(ratio.values()))
print("one part:", part, "| shares:", ", ".join(f"{k} {part * v}" for k, v in ratio.items()))
# A map at 1 : 50,000: 3.4 cm on the map is how far on the ground?
cm = F("3.4") * 50_000
print("3.4 cm on the map =", cm, "cm =", float(cm / 100_000), "km")
unit rate: 65 rupees per kg; 7 kg cost 455 rupees
5 kg for ₹430 86 rupees per kg
1 kg for ₹89 89 rupees per kg
500 g for ₹46 92 rupees per kg
one part: 1000 | shares: Asha 2000, Bilal 3000, Chitra 4000
3.4 cm on the map = 170000 cm = 1.7 km
Fractions keep every rate exact: ₹65 per kg, and the three packs at ₹86, ₹89 and ₹92 per kg, sorted without any rounding. Sharing ₹9,000 in 2 : 3 : 4 is one division (one part, ₹1,000) and three multiplications. The map scale converts 3.4 cm to 170,000 cm, which is 1.7 km once the units are changed; scales are pure numbers, so the unit change is a separate, deliberate step.
Experiment 2: average speed
from fractions import Fraction as F
# There at 60 km/h, back at 40 km/h, over the same 120 km each way.
d, v1, v2 = 120, 60, 40
t = F(d, v1) + F(d, v2)
print("time:", t, "h | average speed:", 2 * d / t, "km/h | average of the two speeds:", F(v1 + v2, 2))
# One hour at each speed instead:
print("one hour at each: average speed", F(v1 + v2, 2), "km/h")
print("harmonic mean 2 / (1/60 + 1/40) =", 2 / (F(1, v1) + F(1, v2)))
time: 5 h | average speed: 48 km/h | average of the two speeds: 50
one hour at each: average speed 50 km/h
harmonic mean 2 / (1/60 + 1/40) = 48
The same two speeds give two different averages depending on what's held equal. Equal distances (there and back) give 48 km/h, the harmonic mean; equal times (an hour at each speed) give 50 km/h, the ordinary mean. "The average speed" isn't defined until you say what's being averaged over.
Experiment 3: Simpson's paradox, and how common it is
from fractions import Fraction as F
import random
# Kidney-stone treatments, from a 1986 study: (successes, patients) for small and large stones
data = {"Treatment A": {"small": (81, 87), "large": (192, 263)},
"Treatment B": {"small": (234, 270), "large": (55, 80)}}
for name, groups in data.items():
row = {g: F(*v) for g, v in groups.items()}
rec = sum(v[0] for v in groups.values()); tot = sum(v[1] for v in groups.values())
print(f"{name}: small {float(row['small']):.1%} large {float(row['large']):.1%} all {float(F(rec, tot)):.1%} ({rec}/{tot})")
# How often does a random table reverse like this?
random.seed(8)
trials, flips = 100_000, 0
for _ in range(trials):
n = [random.randint(1, 100) for _ in range(4)]
k = [random.randint(0, m) for m in n]
a1, a2, b1, b2 = (F(k[i], n[i]) for i in range(4))
a, b = F(k[0] + k[1], n[0] + n[1]), F(k[2] + k[3], n[2] + n[3])
if (a1 > b1 and a2 > b2 and a < b) or (a1 < b1 and a2 < b2 and a > b):
flips += 1
print(f"reversals in {trials:,} random tables: {flips:,} ({flips / trials:.1%})")
Treatment A: small 93.1% large 73.0% all 78.0% (273/350)
Treatment B: small 86.7% large 68.8% all 82.6% (289/350)
reversals in 100,000 random tables: 2,025 (2.0%)
The kidney-stone figures reverse exactly as the table showed: A wins in each group, B wins overall. Then 100,000 random two-group tables with random sizes: about 2 % show a full reversal. Rare in random numbers, but real data isn't random: whenever the groups are split unevenly and the groups themselves differ, reversals become likely, which is why the question "should these groups be combined?" must be asked every time.
Experiment 4: testing for proportion
from fractions import Fraction as F
tables = {
"price of rice (kg, ₹)": [(1, 65), (2, 130), (5, 325), (10, 650)],
"taxi fare (km, ₹)": [(1, 75), (2, 100), (5, 175), (10, 300)],
"time to finish (workers, days)": [(1, 60), (2, 30), (3, 20), (5, 12)],
}
for name, rows in tables.items():
ratios = {F(y, x) for x, y in rows}
products = {x * y for x, y in rows}
kind = ("direct: y/x is always " + str(ratios.pop())) if len(ratios) == 1 else \
("inverse: x*y is always " + str(products.pop())) if len(products) == 1 else "neither"
print(f"{name:<32} {kind}")
price of rice (kg, ₹) direct: y/x is always 65
taxi fare (km, ₹) neither
time to finish (workers, days) inverse: x*y is always 60
Rice at a fixed price per kg has a constant ratio: direct proportion, . Workers and days have a constant product: inverse proportion, 60 worker-days. The taxi has neither: its fare grows steadily with distance (₹25 a km) but starts at ₹50, so doubling the distance doesn't double the fare. That's a linear relationship that isn't proportional, and mistaking one for the other is the commonest error with rates.
Worked examples
Sharing and simplifying
Direct or inverse?
Rates that combine
Exercises
Practice
- Simplify: (a) ; (b) ; (c) ; (d) 75 paise : ₹2.
- Share ₹14,400 in the ratio 3 : 5 : 4.
- In a class the ratio of girls to boys is 4 : 5, and there are 36 pupils. How many girls? What fraction of the class are boys?
- If 5 notebooks cost ₹185, what do 12 cost? Solve by the unit method and by the rule of three.
- A map has scale 1 : 25,000. (a) How far on the ground is 6.2 cm on the map? (b) How long on the map is a 3 km road?
- Which is cheaper per litre: 750 ml for ₹120, 1.5 l for ₹230, or 5 l for ₹790?
- 12 workers build a wall in 15 days. How long would 9 workers take, assuming the work divides evenly?
Answers
- (a) ; (b) ; (c) multiply by 12: ; (d) .
- 12 parts of ₹1,200: ₹3,600, ₹6,000, ₹4,800.
- 9 parts of 4: 16 girls, 20 boys; boys are of the class.
- ₹37 each, so ₹444. Rule of three: .
- (a) cm = 1.55 km; (b) 3 km = 300,000 cm, cm.
- ₹160, ₹153.33 and ₹158 per litre: the 1.5 l bottle.
- worker-days, days.
Harder
- Show that if , then . What does this say about the fraction of a whole that the first part makes up?
- A train travels from A to B at 90 km/h and returns at 60 km/h. Find the average speed for the round trip without knowing the distance.
- A mixture of juice and water is 3 : 5. How much juice must be added to 4 litres of the mixture to make it 1 : 1?
- In a test, school X's boys and girls each score a higher pass rate than school Y's boys and girls, yet school Y has the higher pass rate overall. Invent numbers that make this happen, and explain what must be true of the two schools.
- A recipe uses 250 g of flour for 12 biscuits. Explain why scaling to 30 biscuits multiplies every ingredient by 2.5, but doesn't multiply the baking time by 2.5.
Answers
- ; add 1 to both sides: . Turning both upside down, : the second part makes up the same fraction of the whole in both ratios, so the first part does too.
- Call the distance . Time: . Average speed: km/h, whatever is.
- 4 litres at 3 : 5 has 1.5 l juice and 2.5 l water. For 1 : 1 the juice must equal the water, 2.5 l: add 1 litre of juice.
- For example X: boys 18/20 (90 %), girls 40/80 (50 %), overall 58/100 (58 %); Y: boys 68/80 (85 %), girls 8/20 (40 %), overall 76/100 (76 %). X is better in each group but worse overall, because X's pupils are mostly girls, and girls score lower in both schools. The schools must differ in their mix of the two groups, and the groups must differ in pass rate.
- The amounts of ingredients are in direct proportion to the number of biscuits (each biscuit needs the same share), so they scale by . Baking time depends on each biscuit's size and the oven, not on how many there are (if they fit): it isn't proportional to the number at all. Before scaling, ask whether the quantity really is proportional.
Challenge
- Prove that if and (all positive), and the two pairs have the same denominators in proportion, , then . Conclude that Simpson's paradox needs the groups to be split differently.
Discussion
Let and for some positive (that's what means, with ). Then and . So , and . Dividing, . When both treatments (or schools) split their cases between the groups in the same proportion, the combined comparison agrees with the group comparisons; the paradox requires the splits to differ, as they did in the kidney-stone study (87 : 263 against 270 : 80).
In real life
Misconceptions and limits
The model to keep
Common misconceptions
| Misconception | What's actually true | Where it's shown |
|---|---|---|
| "The ratio 2 : 3 means the first part is of the whole." | It's of the whole; is the first part compared with the second. | What a ratio says |
| "Sharing in 2 : 3 : 4 means dividing by 2, 3 and 4." | Count the parts (9), find one part, multiply. | Sharing in a ratio |
| "Everything that grows together is proportional." | Only if the ratio is constant; a fixed starting amount (a taxi's flag fare) breaks it. | Is it proportional? Test it |
| "More workers, more days." | Workers and days for a fixed job are inversely proportional: more workers, fewer days. | Direct and inverse proportion |
| "The average speed is the average of the speeds." | It's total distance ÷ total time; for equal distances, the harmonic mean. | Average speed |
| "A bigger pack is always cheaper per unit." | Usually, not always; compute the unit price. | Unit prices |
| "If A beats B in every group, A beats B overall." | Not when the groups are split differently: Simpson's paradox. | Simpson's paradox |
| "Doubling a map's scale doubles the area shown." | Areas scale by the square of the factor. | Scaling: recipes and maps |
Limits and trade-offs
- Proportion is a model. Real costs have fixed parts and discounts, real work has coordination overhead, real recipes don't scale baking times. Test with data before trusting .
- Ratios hide sizes. 3 : 1 could be 3 to 1 or 3 million to 1 million; for decisions, look at the counts behind a ratio or rate, especially small ones.
- Which comparison is right is not arithmetic. Simpson's paradox shows that grouped and combined comparisons can disagree; deciding which answers your question needs knowledge of how the groups arose (a question for statistics and causal reasoning, beyond this book).
- Units come first. Ratios of the same kind need the same unit; rates carry their units, and mixing them (km/h with metres per second) gives nonsense. Chapter 11 handles units properly.
Revision sheet
Key ideas
- Ratio : "for every , "; part to part. Part to whole: .
- Equivalent ratios: multiply or divide all parts by the same number; simplest form: divide by the gcd.
- Sharing in a ratio: total parts → one part → multiply. Check the shares add up.
- Proportion: ; rule of three; unit method via the unit rate.
- Scale 1 : : lengths × ; areas × .
- Direct: , constant ratio, straight line through the origin. Inverse: , constant product.
- Rate: a ratio of different kinds (₹/kg, km/h); units divide and multiply like numbers.
- Unit price: the same unit for every option; or cross-multiply.
- Average speed = total distance ÷ total time; equal distances → harmonic mean.
- Combine rates by totals (the mediant), not by averaging; Simpson's paradox: group comparisons can reverse when combined.
Glossary
- Ratio: a comparison of quantities by how many times, written ("for every , ").
- Simplest form: a ratio whose parts are whole numbers with no common factor above 1.
- Proportion: a statement that two ratios are equal.
- Rule of three: finding the fourth number of a proportion from the other three (multiply the diagonal pair, divide by the third).
- Unit rate: the amount of one quantity for one unit of another (₹65 per kg).
- Scale factor: the number every length is multiplied by in a scaled copy.
- Direct proportion: two quantities whose ratio is constant, .
- Inverse proportion: two quantities whose product is constant, .
- Constant of proportionality: the fixed in direct or inverse proportion.
- Rate: a ratio between quantities of different kinds, such as km per hour.
- Unit price: price per unit of quantity, used to compare pack sizes.
- Harmonic mean: the average of rates over equal amounts, .
- Simpson's paradox: a comparison that holds in every group but reverses when the groups are combined.