Skip to content

Add Measuring Mobility lecture - #839

Merged
jstac merged 5 commits into
mainfrom
add-mobility-lecture
Aug 19, 2026
Merged

Add Measuring Mobility lecture#839
jstac merged 5 commits into
mainfrom
add-mobility-lecture

Conversation

@jstac

@jstac jstac commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Adds a new lecture, lectures/mobility.md ("Measuring Mobility"), placed after networks for now — the TOC is due for a rejig.

Built on Sections 2 and 3 of the working paper "Mobility" by Daniel Carroll (FRB Cleveland), Nicholas Hoffman (CMU) and Eric R. Young (UVa), which is credited at the top of the lecture and returned to at the end for the model side. The draft still needs to go to the authors for permission and comments before this is merged.

Content

Motivated as the complement to {doc}inequality: two economies can share a Lorenz curve and a Gini coefficient while offering completely different life prospects.

  • mobility matrices over wealth quantiles, and the two benchmarks — the identity and $\mathbb 1 \mathbb 1^\top / N$
  • four measures, one subsection each: the Shorrocks trace index, Bartholomew's measure, $1 - |\lambda_2|$, and normalised mean first passage time
  • what each measure misses, via three toy chains that produce a genuine three-way ranking disagreement
  • PSID wealth transition matrices at matched horizons, the apparent decline in mobility, and a check of whether the quintile chain is Markov
  • six exercises and a further-reading section (Shorrocks' axioms, Dardanoni's partial orders, the Great Gatsby curve, Chetty et al.)

Uses markov_chains_I, markov_chains_II and eigen_II; the second-eigenvalue measure is a second application of Perron-Frobenius.

Note on normalisation

All four measures are presented as ratios to the perfect-mobility (origin independence) benchmark, so 0 is complete immobility and 1 is origin independence throughout, and values above 1 mean systematic rank reversal.

This required rescaling Bartholomew's measure: $\mu_B(M^*) = (N+1)/3$, not 1, so the lecture also reports $\tilde\mu_B = 3\mu_B/(N+1)$. Three points worth raising with the authors are noted in the review thread.

Also

  • 15 new entries in quant-econ.bib
  • Two exercises cover hand-rolled NumPy against library routines: mean first passage time by simulation vs. the linear solve, and the stationary distribution by hand vs. quantecon

Validation

Notebook executes end to end, 46 code cells, 0 errors. Single-page jb build produces the page and all figures, with only the usual single-page artefacts (unknown sibling documents and the spurious bibtex-key warnings). The full jb build -n -W is left to CI.

🤖 Generated with Claude Code

New lecture `lectures/mobility.md`, built on Sections 2 and 3 of the working
paper "Mobility" by Daniel Carroll, Nicholas Hoffman and Eric R. Young.

Covers mobility as the complement to the inequality snapshot, mobility
matrices over wealth quantiles, and four measures applied to toy chains and
to PSID wealth transition matrices:

* the Shorrocks trace index
* Bartholomew's measure
* one minus the modulus of the second eigenvalue
* normalised mean first passage time

All four are presented as ratios to the perfect-mobility (origin
independence) benchmark, so that 0 is complete immobility and 1 is origin
independence for every measure. This required rescaling Bartholomew's
measure by 3/(N+1), since mu_B(M*) = (N+1)/3 rather than 1.

Uses markov_chains_I, markov_chains_II and eigen_II, and cross-links to
inequality. Placed after `networks` for now.

Six exercises, including mean first passage time by simulation checked
against the linear solve, and the stationary distribution computed by hand
against quantecon.

Adds 15 bibtex entries to quant-econ.bib.

Supersedes QuantEcon/lecture-python.myst#1031

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 186c03a
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a85fe8aeb6faf0008e2675e
😎 Deploy Preview https://deploy-preview-839--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

The `@techreport` entry for carroll2026mobility had no `institution` field,
which pybtex flags as "missing institution" — and the CI build runs with `-W`,
so the single warning failed the build.

The paper has no issuing series or working paper number, so naming an
institution would be inventing one. `@unpublished` with a `note` is the
accurate entry type and matches how Greenfield_Sargent_1993 is recorded.

Verified with pybtex across the alpha, unsrt and plain styles: no warnings for
this entry or the other 14 added in the previous commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 19, 2026 05:03 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request August 19, 2026 05:04 Inactive
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>
@github-actions
github-actions Bot temporarily deployed to pull request August 19, 2026 06:59 Inactive
The derivation of the mean first passage recursion was too compressed, and it
also pointed at markov_chains_I for expected unemployment durations, which
that lecture poses as a question but never actually derives.

The rewrite makes three hidden steps explicit:

* the first step costs one period regardless of where it lands, which is
  where the leading 1 comes from
* the k = j term is present but contributes m_ij * 0, so the sum over k != j
  omits it because it is zero, not because the case is impossible
* writing T_kj for the remaining journey uses the Markov property, since the
  time from k must not depend on having arrived via i

Adds an underbraced display separating the three contributions, a two-state
sanity check where the recursion collapses to the geometric waiting time
1/alpha, and the matrix form (I - M_-j) t = 1 that the code actually solves.

The diagonal convention now carries its justification: by ergodicity the chain
spends a fraction psi*(j) of its time in j, so returns occur once every
1/psi*(j) periods.

Verified numerically: T[0,1] = 1/alpha exactly for the two-state chain,
diag(T) = 1/psi*, and the recursion residual is zero.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions
github-actions Bot temporarily deployed to pull request August 19, 2026 07:12 Inactive
The lecture said it draws on Sections 2 and 3 of the paper. The authors
suggested the vaguer "the first few sections", which will not go stale if
they renumber before circulating a revision.

Prose only, inside a note directive: no code, math, directives or references
touched. Verified with a local single-page build, which produces no
non-artefact warnings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jstac
jstac merged commit d767089 into main Aug 19, 2026
4 checks passed
@jstac
jstac deleted the add-mobility-lecture branch August 19, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant