a) each family has to spend a minimum of C per capita to survive or, to complicate it a bit more, x% of income, Y, with x a decreasing function of Y. (the rich can spend enough to consume it all, the poor consume 100% of income or more)

b) each family has different numbers of children (from say 1 to 12). And let’s let fertility norms be somewhat persistent across generations–say .6 correlation or some such. (Africans still have 5 kids, Europeans and Japanese are several generations into small families.

c) Wealth accumulation is Y-C+R

d) Returns on assets, R, are generally positive–say 2% per year times wealth to be conservative and long run (to account for boom and bust cycles).

Now run that and you will find that wealth will all go to a few (the rich get richer and the poor have children). And, if we need a circular flow of income to keep consumption high enough to give returns on assets that produce consumption goods (ie most assets), then the economy will collapse when wealth distribution gets too skewed. This is the basic Keynesian insight, except that Keynes proposed only a short run solution–goose demand by deficit government spending. The long run solution is progressive taxes to maintain a stable income distribution over the long run. ]]>

# You can try this, for example, by using QQplot,

NUMPLAYERS = 1000

ROUNDS = 5000

INITWEALTH = 100

# After the trials, then

qqnorm(bank[1000,])

abline(100, 32)

# would be almost normal. However, more trial will increase the bankrupt people, like

qqnorm(bank[5000,])

abline(94, 75)

# the lower bend will make the graph āJā shaped.

Also if you increase the rounds and keep going you start to see a more step-wise pattern on the graphs.

]]>The geometry of the room and the time between ticks are not accounted for in the simulations.

– If one can only travel a small distance between ticks there is bound to be some influence on the distribution. Those near the center might receive more than those near the corners.

– The shape of the room will also influence the distribution.

– If everybody is seated and not allowed to move we will have another distribution. ]]>

p0 = p0 t(0) + p1 t(0)

p1 = p0 t(1) + p1 t(1) + p2 t(0)

p2 = p0 t(2) + p1 t(2) + p2 t(1) + p3 t(0)

…

to get to the stationary state. Because p0 is in the formula for t(n), it might make sense to think of p0 as the independent variable ranging from 0 to 1, and then deriving the average occupation from the distribution as a function of p0, before inverting it? Also there is probably a case to be made that there’s a good limit for N >> n (i.e. that t(n) becomes negligible at higher n) and so you’ve really only got to figure out t0, t1, t2 or so and then the rest of the distribution is approximately fixed by those.

]]>with the following parameters:

NUM_PEOPLE = 45

INITIAL_BANK = 45 # everyone gets 45 dollars

INTEREST_RATE = 0.1 # 10% per turn that you didn’t pay

ROUNDS = 5000

RENT = 1 # how much to pay each round

everybody’s cash goes to zero on step 1008. From that point on all trades are debt manipulations only

Check out the source and the produced animation here:

https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27

from random import randint

balances = [40 for i in range(40)]

for i in range(5000):

for j in range(40):

if balances[j] > 0:

recipient = randint(0,38)

if recipient >= j: recipient += 1

balances[j] -= 1

balances[recipient] += 1

for balance in sorted(balances): print(“{:4}”.format(balance) + ” ” + “=”*balance)

]]>