Watch a population of households move between five income quintiles generation after generation, governed by a transition matrix, in a plain Canvas2D view. Adjust how "sticky" income is across generations and see the population converge to a stationary distribution.
A Markov chain model of intergenerational income mobility. Each household's quintile next generation depends only on its current quintile, via a row-stochastic transition matrix. Regardless of starting distribution, repeated application of the matrix converges to a unique stationary distribution โ the long-run equilibrium share of households in each quintile.
The stationary distribution is computed live via power iteration on the current transition matrix. The right-hand histogram panel compares the live population split (colored bars) against the mathematically computed stationary distribution (white tick marks), and the expected number of generations to escape the bottom quintile is derived analytically from the matrix's diagonal persistence term.