Skip to content

Commit f87f54b

Browse files
jstacclaude
andcommitted
Refine mobility lecture: notation, benchmarks, figure axis
Incorporates review edits, plus: * Rename the normalised Bartholomew measure from \tilde\mu_B to \mu_{NB}, in the maths, the code and the summary tables. * Label the simulated paths figure in years (0, 5, ..., 45) rather than in periods, so the horizontal axis is unambiguous. * Explain why the uniform matrix is singled out as perfect mobility. Any matrix with identical rows is origin independent, but quantiles are constructed to hold equal mass at both dates, which forces the mobility matrix to be doubly stochastic. A doubly stochastic matrix with identical rows must be uniform, so within this setting M* is the only origin-independent matrix. * Report the column sums of the PSID matrices, which are close to but not exactly one, and attribute the gap to the published rounding and to panel attrition. This is the same deviation that makes the stationary distribution only approximately uniform in the final exercise, now cross-referenced. * Note that systematic rank reversal, which is what a measure above one indicates, is unusual in ordinary market economies, and that every empirical matrix in the lecture scores well below one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent add7b44 commit f87f54b

1 file changed

Lines changed: 82 additions & 34 deletions

File tree

lectures/mobility.md

Lines changed: 82 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,32 +31,35 @@ In {doc}`inequality` we measured how unequally income and wealth are distributed
3131

3232
Such measures are snapshots.
3333

34-
They tell us how far apart the rich and the poor are, but nothing about whether the same families stay rich and poor.
34+
While they do provide information on how far apart the rich and the poor are,
35+
they tell us nothing about whether the same families stay rich and poor.
3536

36-
Two economies can have identical Lorenz curves and identical Gini coefficients while offering their citizens completely different life prospects.
37+
This is important because two economies can have identical Lorenz curves and
38+
identical Gini coefficients while offering their citizens completely different
39+
life prospects.
3740

38-
In one, position is fixed at birth and never changes.
41+
For example, suppose we are comparing economies with identical wealth distributions.
3942

40-
In the other, families rise and fall constantly, and today's poor household has a good chance of being tomorrow's rich one.
43+
Suppose further that they fall into one of two cases.
44+
45+
1. Position is fixed at birth and never changes.
46+
2. Families rise and fall constantly, and today's poor household has a good chance of being tomorrow's rich one.
4147

4248
The difference between these two economies is **mobility**: the rate at which households change position within the distribution.
4349

4450
Mobility matters for policy.
4551

46-
Attitudes to redistribution, the case for taxing wealth rather than capital income, and our sense of how much opportunity an economy offers all depend on it.
52+
Attitudes to redistribution, taxation, and our sense of how much opportunity an economy offers all depend on it.
4753

48-
In this lecture we study how to measure mobility when the data take the form of a transition matrix over wealth quantiles.
54+
In this lecture we study how to *measure* mobility when the data take the form of a transition matrix over wealth quantiles.
4955

5056
This is a natural application of the Markov chain theory developed in {doc}`markov_chains_I` and {doc}`markov_chains_II`, and it gives us a second use for the {doc}`Perron-Frobenius theorem <eigen_II>`.
5157

5258
```{note}
53-
This lecture draws heavily on Sections 2 and 3 of the working paper "Mobility" by Daniel Carroll, Nicholas Hoffman and Eric R. Young {cite}`carroll2026mobility`.
59+
This lecture draws heavily on Sections 2 and 3 of the paper "Mobility" by Daniel Carroll, Nicholas Hoffman and Eric R. Young {cite}`carroll2026mobility`.
5460
5561
That paper collects the standard mobility measures in one place, applies them to US wealth data, and then asks whether workhorse macroeconomic models can reproduce what it finds.
5662
57-
We use their measures and their estimated transition matrices, with thanks.
58-
59-
The broader literature on measuring mobility is surveyed in {cite}`fields1999measurement`.
6063
```
6164

6265
Let's start with some imports.
@@ -78,16 +81,16 @@ Suppose we observe the wealth of a large number of households at two dates, $s$
7881

7982
We sort households by wealth at each date and divide them into $N$ equally sized groups, or **quantiles**.
8083

81-
With $N = 5$ these are quintiles, each containing 20% of households.
84+
(When looking at data we often consider the case $N = 5$, in which case these quantiles are **quintiles**, each containing 20% of households.)
8285

8386
Now we ask, for each household, which quantile it started in and which quantile it ended in.
8487

8588
Averaging over households gives us a matrix $M$ with typical element
8689

8790
$$
8891
m_{ij}
89-
= \mathbb P \{ \text{household is in quantile } j \text{ at } s+t
90-
\mid \text{it was in quantile } i \text{ at } s \}
92+
= \mathbb P \{ \text{household $h$ is in quantile } j \text{ at } s+t
93+
\mid \text{$h$ was in quantile } i \text{ at } s \}
9194
$$
9295

9396
Each row of $M$ is a probability mass function, so $M$ is a stochastic matrix in the sense of {doc}`markov_chains_I`.
@@ -102,11 +105,11 @@ An economy in which everyone's wealth doubles has no mobility at all by this def
102105

103106
Second, the time unit of the chain is the horizon $t$, which might be five years or twenty.
104107

105-
Everything below depends on that choice, and we return to it when we look at data.
108+
Much depends on that choice, and we return to it when we look at data.
106109

107110
### An example
108111

109-
Here is a mobility matrix estimated from US data over the five years from 1984 to 1989, which we discuss properly in {ref}`a later section <mobility_data>`.
112+
Here is a mobility matrix estimated from US data over the five years from 1984 to 1989, which we discuss more fully in {ref}`a later section <mobility_data>`.
110113

111114
```{code-cell} ipython3
112115
M_ex = [[0.70, 0.23, 0.05, 0.02, 0.00],
@@ -128,7 +131,7 @@ def normalize_rows(M):
128131
M_ex = normalize_rows(M_ex)
129132
```
130133

131-
Row 1 says that a household in the poorest quintile in 1984 had a 70% chance of still being there in 1989, a 23% chance of moving up one quintile, and essentially no chance of reaching the top.
134+
Row 1 says that a household in the poorest quintile in 1984 had a 70% chance of still being there in 1989, a 23% chance of moving up one quintile, and no chance of reaching the top.
132135

133136
The mass concentrates near the diagonal, and the two extreme quintiles are the stickiest.
134137

@@ -144,15 +147,17 @@ tags: [hide-input]
144147
---
145148
mc = qe.MarkovChain(M_ex)
146149
periods = 10
150+
years = np.arange(periods) * 5 # each period of M_ex spans five years
147151
styles = ('-', '--', '-.', ':')
148152
149153
fig, ax = plt.subplots()
150154
for i, ls in enumerate(styles):
151155
X = mc.simulate(periods, init=i, random_state=10 + i)
152-
ax.step(range(periods), X + 1, where='post', lw=2, ls=ls,
156+
ax.step(years, X + 1, where='post', lw=2, ls=ls,
153157
label=f'household {i + 1}')
154-
ax.set_xlabel('period (five years)')
158+
ax.set_xlabel('years')
155159
ax.set_ylabel('wealth quintile')
160+
ax.set_xticks(years)
156161
ax.set_yticks(range(1, 6))
157162
ax.set_ylim(0.5, 6.6)
158163
ax.legend(frameon=False, ncol=2, loc='upper center')
@@ -184,6 +189,29 @@ Here the ending quantile is independent of the starting quantile, so knowing whe
184189

185190
This property is called **origin independence**, and it is the natural upper reference point for mobility: the distribution is reshuffled completely at every step.
186191

192+
You might object that $M^*$ is not the only matrix with this property.
193+
194+
Indeed, the ending quantile is independent of the starting quantile whenever every row of $M$ is the same, so that $M = \mathbb 1 \psi^\top$ for some probability mass function $\psi$.
195+
196+
Why then single out the uniform case and call it perfect mobility?
197+
198+
The reason is that our quantiles are constructed to hold equal numbers of households at *both* dates.
199+
200+
The fraction of households ending in quantile $j$ is $\sum_i (1/N) m_{ij}$, and this must equal $1/N$, so
201+
202+
$$
203+
\sum_{i=1}^N m_{ij} = 1
204+
\qquad \text{for every } j
205+
$$
206+
207+
In other words, a mobility matrix over equally sized quantiles has columns summing to one as well as rows --- it is **doubly stochastic**.
208+
209+
Now suppose such a matrix also has identical rows, so $M = \mathbb 1 \psi^\top$.
210+
211+
Its $j$-th column sums to $N \psi(j)$, and setting this to one gives $\psi(j) = 1/N$.
212+
213+
So $M^*$ is not one origin-independent matrix among many --- within this setting it is the only one.
214+
187215
```{code-cell} ipython3
188216
N = 5
189217
M_immobile = np.identity(N)
@@ -200,6 +228,10 @@ Values above 1 are possible and meaningful.
200228
They arise when a chain reverses ranks *systematically* --- for example a matrix that sends the poorest quintile to the richest with probability one moves households around more than pure chance does.
201229
202230
So 1 marks origin independence, not a maximum.
231+
232+
Such systematic reversal is unusual in ordinary market economies, where wealth is persistent and estimated mobility matrices put most of their mass on or near the diagonal.
233+
234+
All of the empirical matrices we study below score well below 1.
203235
```
204236

205237
## Four measures of mobility
@@ -291,7 +323,7 @@ So to put Bartholomew's measure on the same footing as the others we rescale,
291323
```{math}
292324
:label: bartholomew_norm
293325
294-
\tilde \mu_B(M) = \frac{3}{N+1} \, \mu_B(M)
326+
\mu_{NB}(M) = \frac{3}{N+1} \, \mu_B(M)
295327
```
296328

297329
which is the expected number of quantiles crossed, relative to the number crossed under origin independence.
@@ -304,7 +336,7 @@ def bartholomew_normalized(M):
304336
bartholomew_normalized(M_immobile), bartholomew_normalized(M_perfect)
305337
```
306338

307-
We report $\mu_B$ when we want the interpretation "quantiles crossed per period" and $\tilde \mu_B$ when comparing across measures.
339+
We report $\mu_B$ when we want the interpretation "quantiles crossed per period" and $\mu_{NB}$ when comparing across measures.
308340

309341
(mobility_eigenvalue)=
310342
### The second eigenvalue
@@ -440,7 +472,7 @@ def mobility_measures(M):
440472
"Return the four mobility measures for stochastic matrix M."
441473
return pd.Series({'μ_S': shorrocks(M),
442474
'μ_B': bartholomew(M),
443-
'~μ_B': bartholomew_normalized(M),
475+
'μ_NB': bartholomew_normalized(M),
444476
'μ_2E': second_eigenvalue(M),
445477
'μ_MFP': mfp_measure(M)})
446478
@@ -561,6 +593,23 @@ np.array(psid['1984-2003']).sum(axis=1)
561593
psid = {k: normalize_rows(M) for k, M in psid.items()}
562594
```
563595

596+
We argued above that a mobility matrix over equally sized quantiles should be doubly stochastic.
597+
598+
Let's see how well the estimated matrices satisfy this.
599+
600+
```{code-cell} ipython3
601+
for label, M in psid.items():
602+
print(f'{label}: {M.sum(axis=0).round(3)}')
603+
```
604+
605+
The columns sum to roughly but not exactly one.
606+
607+
Two things push them off.
608+
609+
The published figures are rounded to two decimal places, and the panel is not perfectly balanced --- families leave the sample between the starting and ending years, so the households sorted into quintiles at the two dates are not quite the same set.
610+
611+
We will see the same deviation resurface in {ref}`the final exercise <mob_ex6>`, where the stationary distribution of these matrices turns out to be close to uniform without being exactly uniform.
612+
564613
Here is what the three matrices look like.
565614

566615
```{code-cell} ipython3
@@ -606,7 +655,7 @@ mystnb:
606655
name: fig:mobility-horizon
607656
tags: [hide-input]
608657
---
609-
cols = ['μ_S', '~μ_B', 'μ_2E', 'μ_MFP']
658+
cols = ['μ_S', 'μ_NB', 'μ_2E', 'μ_MFP']
610659
fig, ax = plt.subplots()
611660
horizon_table[cols].plot.bar(ax=ax, rot=0, width=0.75)
612661
ax.set_ylabel('mobility')
@@ -674,11 +723,10 @@ decline_table.round(3)
674723

675724
All four measures fall as we move the twenty-year window forward, suggesting that US wealth mobility has declined since the mid-1980s.
676725

677-
The decline is modest --- $\mu_S$ falls from 0.74 to 0.70 --- and we should be cautious about it.
726+
The decline is modest --- $\mu_S$ falls from 0.74 to 0.70.
678727

679-
{cite}`carroll2026mobility` bootstrap the PSID sample to place confidence intervals around these numbers, and conclude that the decline is statistically significant at the medium horizon but *not* at the long horizon shown here.
728+
{cite}`carroll2026mobility` bootstrap the PSID sample to place confidence intervals around these numbers, and conclude that the decline is statistically significant at the medium horizon but not at the long horizon shown here.
680729

681-
A drop of this size is well within the sampling error of a panel of a few thousand families.
682730

683731
### Is the quintile chain Markov?
684732

@@ -708,15 +756,13 @@ At twenty years the gap is large: $\mu_S$ is 0.87 under the Markov prediction ag
708756

709757
Households are therefore more persistent over long horizons than their five-year behavior implies, which means that current quintile alone is not a sufficient statistic for a household's future position.
710758

711-
Something else, unobserved and persistent, is at work.
712-
713-
{cite}`carroll2026mobility` find direct evidence for this: a family that makes one large jump through the wealth distribution is significantly more likely to make another, and families holding stocks or private businesses move much more than others.
759+
Also, unobserved features are at work.
714760

715-
In the language of the older sociological literature, the population contains both movers and stayers.
761+
For example, {cite}`carroll2026mobility` find that a family that makes one large jump through the wealth distribution is significantly more likely to make another, and families holding stocks or private businesses move much more than others.
716762

717763
This matters for modelling.
718764

719-
It means that a calibration matching mobility at one horizon will generally miss it at another, and that the state of a realistic model must include something beyond position in the wealth distribution.
765+
It means that the state of a realistic model must include something beyond position in the wealth distribution.
720766

721767
## Exercises
722768

@@ -784,7 +830,7 @@ $$
784830
785831
with $\alpha, \beta \in (0,1)$ and $\alpha + \beta \leq 1$.
786832
787-
1. Show that $\mu_S(M) = \tilde\mu_B(M) = \mu_{2E}(M) = \alpha + \beta$.
833+
1. Show that $\mu_S(M) = \mu_{NB}(M) = \mu_{2E}(M) = \alpha + \beta$.
788834
789835
2. Let $\{X_t\}$ be a stationary chain with this transition matrix, viewed as taking values in $\{0, 1\}$.
790836
@@ -836,7 +882,7 @@ M2 = np.array([[1 - α, α],
836882
[β, 1 - β]])
837883
838884
print(f'μ_S = {shorrocks(M2):.4f}')
839-
print(f'~μ_B = {bartholomew_normalized(M2):.4f}')
885+
print(f'μ_NB = {bartholomew_normalized(M2):.4f}')
840886
print(f'μ_2E = {second_eigenvalue(M2):.4f}')
841887
print(f'α+β = {α + β:.4f}')
842888
```
@@ -956,7 +1002,7 @@ Mobility matrices cannot be completely ordered, and the toy examples above showe
9561002
9571003
Search for others.
9581004
959-
Generate a large number of random $5 \times 5$ stochastic matrices, compute $\tilde\mu_B$ and $\mu_{MFP}$ for each, and find a pair that the two measures rank in opposite directions.
1005+
Generate a large number of random $5 \times 5$ stochastic matrices, compute $\mu_{NB}$ and $\mu_{MFP}$ for each, and find a pair that the two measures rank in opposite directions.
9601006
9611007
Report the pair and explain the disagreement.
9621008
```
@@ -1117,7 +1163,9 @@ The two agree to machine precision.
11171163

11181164
It is worth noticing that the stationary distribution is not exactly uniform, even though quintiles contain equal numbers of households by construction.
11191165

1120-
In a stationary environment it would be, so the deviation reflects sampling error together with the fact that the wealth distribution itself changed between 1984 and 1989.
1166+
The uniform distribution is stationary for $M$ precisely when $M$ is doubly stochastic, since $\psi^* M = \psi^*$ with $\psi^* = \mathbb 1^\top / N$ says exactly that every column of $M$ sums to one.
1167+
1168+
So this deviation is the same one we saw in the column sums earlier, and it has the same two sources: the published rounding, and attrition from the panel between 1984 and 1989.
11211169

11221170
```{solution-end}
11231171
```

0 commit comments

Comments
 (0)