The few that are huge
Tonight's idea
Heights bunch around an average: nobody is ten times taller than anyone else. City populations do not behave like that. A few are huge and most are small. Data like this often follows a power law,
\(y = Cx^{-a}\), with \(C\) and \(a\) positive constants.
Take logs (base 10) of both sides: \(\log y = \log C - a\log x\). Plot \(\log y\) against \(\log x\) and you get a straight line of slope \(-a\). So put the data on log-log axes (both axes logarithmic) and look for a line.
The best-known case is Zipf's law. Rank the items from largest to smallest. The size of the item of rank \(r\) is roughly proportional to \(1/r\), a power law with \(a = 1\): the second is about half the first, the tenth about a tenth. Word counts in a long text fit this roughly, as do city sizes in many countries.
In such data the few giants carry much of the total, so the mean sits far above what most items look like.
Watch one: reading the slope
Town sizes in an invented country (invented numbers):
| Rank \(r\) | 1 | 10 | 100 | 1000 |
|---|---|---|---|---|
| Size | 2,000,000 | 316,000 | 50,000 | 8,000 |
| \(\log r\) | 0 | 1 | 2 | 3 |
| \(\log(\text{size})\) | 6.30 | 5.50 | 4.70 | 3.90 |
Each step of 1 in \(\log r\) lowers \(\log(\text{size})\) by 0.80. The slope is \(\dfrac{3.90 - 6.30}{3 - 0} = -0.80\) and the line starts at \(\log C = 6.30\). So size \(\approx 2{,}000{,}000\, r^{-0.8}\).
Switch the axes between ordinary and logarithmic: mathdetours.com/demos/logaxes.html.
Your turn
- Take logs of \(y = 50x^{-2}\). Give the slope of the line on log-log axes, and the value of \(\log y\) where \(\log x = 0\).
- A straight line on log-log axes passes through \(x = 1, y = 8000\) and \(x = 100, y = 8\). Find the power law.
- In an invented book that follows Zipf's law, the most common word appears 60,000 times. Predict the counts for the words of rank 2, 10 and 100. What rank appears about 50 times?
- An invented country has 1000 towns, and the town of rank \(r\) has \(1{,}000{,}000/r\) people. The total is about 7,485,000, of which the top ten towns hold 2,929,000. Find the fraction of people in the top ten, and the mean town size. What rank has the mean size? How many towns are smaller than the mean?
Stretch: no built-in scale
For \(y = Cx^{-a}\), show that doubling \(x\) multiplies \(y\) by the same factor wherever you start. Find that factor when \(a = 0.8\). Then show \(y = 2^{-x}\) fails the test: compare \(x\) going from 1 to 2 with \(x\) going from 10 to 20.
Answers
- \(\log y = \log 50 - 2\log x\). Slope \(-2\). When \(\log x = 0\), \(\log y = \log 50 \approx 1.70\).
- \(\log x\) goes from 0 to 2 while \(\log y\) goes from \(\log 8000 = 3.90\) to \(\log 8 = 0.90\). Slope \(= -3/2\), and \(C = 8000\) (the value at \(x = 1\)). So \(y = 8000x^{-1.5}\). Check: \(100^{1.5} = 1000\) and \(8000/1000 = 8\).
- \(60{,}000/r\): 30,000, then 6,000, then 600. A count of 50 needs \(r = 60{,}000/50 = 1200\).
- Top ten: \(2{,}929{,}000/7{,}485{,}000 \approx 39\%\) of the people live in 1% of the towns. Mean \(= 7{,}485{,}000/1000 = 7485\). The mean size has rank \(1{,}000{,}000/7485 \approx 134\), so ranks 134 to 1000 are below the mean: 867 of the 1000 towns. The mean is set by the giants. The middle town (rank 500) has only 2000 people.
Stretch. \(\dfrac{C(2x)^{-a}}{Cx^{-a}} = 2^{-a}\), with no \(x\) left in it. For \(a = 0.8\) the factor is \(2^{-0.8} \approx 0.57\). For \(y = 2^{-x}\): from 1 to 2 the factor is \(\tfrac12\), but from 10 to 20 it is \(2^{-10} = \tfrac{1}{1024}\). An exponential has a built-in scale; a power law looks the same at every size.