Francesco Pastore

Computer Science and Simulation for Economics

Project work on

"Income distribution and samaritan dilemma."


The applet requires Java 1.4.1 or higher. It will not run on Windows 95 or Mac OS 8 or 9. Mac users must have OS X 10.2.6 or higher and use a browser that supports Java 1.4. (Safari works, IE does not. Mac OS X comes with Safari. Open Safari and set it as your default web browser under Safari/Preferences/General.) On other operating systems, you may obtain the latest Java plugin from Sun's Java site.

powered by NetLogo

view/download model file: income_distribution_and_samaritan_dilemma.nlogo


This model simulates possible effects of some decisions of economic policy on the income distribution, in particular on INCOME MOBILITY and INCOME INEQUALITY. It involves also the Games Theory, studying the role of government transfers in the minimisation of the so-called Samaritan Dilemma.


Coloured patches represent the income distribution.
Turtles are distinguished in two breeds: "the individuals" (the people whose income is observed) and "the limits" (the statistical limits which divide the income distribution in quintiles on the basis of individuals movement along the distribution).
Each individual tends to shift towards one of the two extremes of the distribution, gaining money if they go to the right or losing money if they go to the left.
This is explained by the Comparative Advantage Theory. In fact, in this model there are two kind of goods produced by two kind of individuals: one group has got an absolute advantage (in terms of productivity) in both goods, but a relative advantage in the good 1; whilst the other group has got an absolute disadvantage in both goods, but a relative advantage in the good 2. As shown by Ricardo, the two groups will specialize in the good in which they have the comparative advantage, justifying the tendency to the radicalization of this model (to make things easier, the goods have the same price which is equal to 1).
The direction of movement depends on which of the two kinds of produced goods the individuals are specialized in, whilst the size of it depends jointly on the following factors:
1)The tax regime implemented by the government
2)The productivity gains caused by policy decisions
3)The quintile in which the individual is
For the aim of this work, the concept of mobility which is used is that of RELATIVE MOBILITY. This implies that there must be always the 20% of the population of individuals in each quintile at the beginning and at the end of every experiment. So the running model stops when this result is reached.
This is an EMERGING MODEL. It means that the income distribution is determined directly by the individuals with their behaviour. It is for this reason that the limits have been created: they form the quintiles and they move only when they see that the relative quantity of individuals in the previous quintile is different from 20%; then they shift to the left or to the right according to whether the relative quantity is above or under 20%, in order to re-establish that percentage.
With the object of distinguish the parts of the distribution, different shade of blue are used (from the darkest for the first quintile to the lightest for the fifth).
Finally different colours are used for the individuals too, allowing the users observe the shift of each individual relative to the initial quintile.


BUTTONS: -SETUP: It creates the world, drawing the distribution (by colouring patches)
and giving individuals and limits all their own-variables which define their positions in the income distribution (and, consequently, their different reactions to the government policies).
-GO_ONCE: It runs the model only for one tick.
-GO: It runs the model forever. Actually the simulation stops after 180 ticks, unless, as said before, there is the 20% of the individuals in each quintile of the distribution.

SLIDERS: -IMMOBILITY RATE EFFECT ON LONG RUN INEQUALITY: It describes the percentage variation in the long run inequality due to a 1% change in the immobility rate.
-SHORT RUN MLD EFFECT ON LONG RUN INEQUALITY: It describes the percentage variation in the long run inequality due to a 1% change in the short run MLD.
-SHORT RUN MLD EFFECT ON ELECTED UTILITY: It describes the percentage variation in the elected utility due to a 1% change in the short run MLD.
-LONG RUN INEQUALITY EFFECT ON ELECTOR UTILITY: It describes the percentage variation in the elector utility due to a 1% change in the long run inequality.

MONITORS: -MONITORS WHICH DESCRIBE THE MOVEMENT IN THE DISTRIBUTION: They point out the percentage of individuals in each quintile every tick the model runs (monitors "1", "2", "3", "4" and "5"). Moreover they allow the users to discover how many individuals (in relative terms) have reached a certain quintile from that of the beginning of the observation (for instance, the monitor "1to2" measures the percentage of individuals starting in the first quintile who have reached the second quintile).
-MONITORS WHICH MEASURE THE INTERESTING VARIABLES OF THE INCOME DISTRIBUTION: They report the trend of immobility rate, short run MLD and long run inequality.

The first is more careful about equity issues and it tends to redistribute wealth by high tax rates for the richest and low tax rates for the poorest; moreover its policies make the productivity of the poorest higher, whilst decrease that of the richest.
The second, instead, is more careful about productivity. So it decreases tax rates for individuals in the highest quintiles, allowing them to get higher productivity gains. With this kind of government the poorest see their productivity goes down.
When these switches are off it means that the government profile is a sort of mean between the redistribution and the productivity oriented ones.
-IN-CASH TRANSFER and IN-KIND TRANSFER: According to the Games Theory, they are possible solutions for minimizing the Samaritan Dilemma and they are designed only for individuals in the lowest quintiles. In-cash transfer gives the beneficiary an amount of money which TEMPORARILY increases his speed of movement; in-kind transfer allows the beneficiary to get a service which rises his productivity, increasing PERMANENTLY his speed of movement.

PLOTS: There are two plots. One shows how short run MLD, immobility rate and long run inequality change versus time. The other describes the variation in the utility of elector, elected and Samaritan (obtained by a mean of the utility of elector and elected) versus time.


From the point of view of individuals (see the elector utility in the "Samaritan utility plot") and observing the trend in the long run inequality (determined by a linear regression on immobility rate and short run MLD), the redistribution oriented government could obtain better results than the productivity oriented one.
Moreover, watching the percentage of individuals moving from the first and the second quintile to higher quintiles, it is possible to see that the in-kind transfer allows more poor people to shift upward than the in-cash one.
Finally, you can notice that sometimes the model tends to radicalize. That is true especially when one of the government profile is on, together with one of the transfers. Note that with the productivity oriented government the radicalization is faster.


It is very interesting to try all the possible combinations of the switches introduced in the model, observing the way mobility, inequality and preferences of population vary during the experiment. You could also test this together with changing the values on each slider: what happens to the variables listed before?


It could be interesting introduce in the model some exogenous schock on the income distribution as economic crisis, wars or epidemics and study how the system behaves.
Another issue to explore is technology. In this model technology is (implicitly) exogenous: individuals gain productivity on the basis of different choices made by policy-makers and technology seems to be something like "manna from heaven". What if it became endogenous? What if there were any researchers between individuals?


-Buchanan J.M. (1975), "Altruism, Morality and Economic Theory", Russell Sage Fundation, New York.
-Danziger S. and Gottschalk P. (1997), "How much is there and has it changed?", Boston College, Department of Economics.
-Dasgupta P., Sen A. and Starrett D. (1973), "Notes on the measurement of income inequality", Journal of economic theory.
-Gottschalk P. (1997), "Inequality, income growth and mobility: the basic facts", Journal of economic perspectives, vol.11, no.2.
-Levy F. and Temlin P. (2007), "Inequality and institutions in 20th century America", Massachussetts Institute of Technology, Working Paper Series, no. 13106.
-Stock J.H. and Watson M.W. (2003), "Introduction to econometrics", Pearson Education Inc, Addison-Wasley, 1st edition.