🏘️ Community Growth and Wealth Inequality Lab: Logistic Population and Yard-Sale Exchange

The science

Population. Logistic law dN/dt = r N (1 - N/K), integrated with RK4 (monthly step). With constant K the exact solution is N(t) = K / (1 + (K/N0 - 1) e^(-r t)), drawn as a white dashed line when technology growth is 0. If K itself grows as K0 e^(g t), N follows it with a lag.

Wealth exchange. Yard-sale model: a random pair stakes f · min(w_i, w_j); the poorer side wins with probability 1/2 + bias. Total wealth is conserved exactly. With a fair coin the poorer-richer symmetry still drives wealth condensation: a few households end up with almost everything (Gini tends to 1). This is a known result for this model class.

Tax. Each month every household pays tax/12 of its wealth; the pool is shared equally, so the total is conserved and the Gini settles at a lower steady value.

Gini. G = 2 Σ i w_(i) / (n Σ w) - (n+1)/n over sorted wealth, equal to ΣΣ |w_i - w_j| / (2 n^2 mean). The Lorenz curve is the cumulative wealth share of the poorest x of households.

Honest simplifications. The two parts are not coupled: the 300 households are a fixed sample, not the N people; r, K and the stakes are illustrative numbers, not data for a real society. Real inequality also depends on wages, inheritance, institutions and much more. The sim shows mechanisms, it predicts nothing about a country.

Checks on this page. RK4 against the closed-form logistic; two independent Gini formulas; wealth conservation under trade and tax; and the sample Gini of a lognormal population against the exact value erf(σ/2).

What you are looking at

Two linked toy models of a community. The population N grows logistically towards the capacity K the land can feed. Separately, 300 sample households repeatedly trade: a random pair bets a fraction of the poorer one's wealth on a coin flip. Watch the Gini coefficient climb, then try a wealth tax or a safety net.

Presets

Parameters

x1

Live readouts

Independent numerical checks