fair&

Hamed Seyed-Allaei

Physicist. I build models you can play with.

Hi, I'm Hamed, a physicist. I love little simple things that have huge, unexpected impacts, and I love to share them with the world, like this simple little fair game and its surprising results.

How Fair and Square was made →
The code on GitHub →

If you think “fair and square” makes our world a slightly better place to live, a small gift warms my heart, and big ones warm my home. Both encourage me to do more.

Amazon Associate: I earn from qualifying purchases.

I build models you can play with. Would you like me to play with yours?

Behind these squares: physics, neuroscience, years of teaching, data science, machine learning and AI.

Ai / ∑Aj = si

Wealth as area. The squares keep trading, packed together. Each square's area is proportional to its wealth: its fraction of the total coloured area is its share of the money. Gaps between squares are not money.

G equals the integral from 0 to 1 of p minus L of p, over the integral from 0 to 1 of p

The Gini. The squares line up, poorest first, and pull out into stairs; the curve through their corners is L. The area between the straight line and the curve, over the area under the line.

N eff equals 1 over the sum of s i squared

The effective number. Each square's side is its share, si. The box holds about three copies of the pile: as concentrated as three equal squares.

N of w equals the number of i with w i at least w

Who has at least. Everyone becomes a bar, longer on a log scale the more they have. Slide the line: N(w) counts the bars that reach it.