Wealth Distribution Benchmark
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
VERSION
$Id: Wealth Distribution Benchmark.nlogo 37529 2008-01-03 20:38:02Z craig $
WHAT IS IT?
This model simulates the distribution of wealth. "The rich get richer and the poor get poorer" is a familiar saying that expresses inequity in the distribution of wealth. In this simulation, we see Pareto's law, in which there are a large number of "poor" or red people, fewer "middle class" or green people, and many fewer "rich" or blue people.
HOW IT WORKS
This model is adapted from Epstein & Axtell's "Sugarscape" model. It uses grain instead of sugar. Each patch has an amount of grain and a grain capacity (the amount of grain it can grow). People collect grain from the patches, and eat the grain to survive. How much grain each person accumulates is his or her wealth.
The model begins with a roughly equal wealth distribution. The people then wander around the landscape gathering as much grain as they can. Each person attempts to move in the direction where the most grain lies. Each time tick, each person eats a certain amount of grain. This amount is called their metabolism. People also have a life expectancy. When their lifespan runs out, or they run out of grain, they die and produce a single offspring. The offspring has a random metabolism and a random amount of grain, ranging from the poorest person's amount of grain to the richest person's amount of grain. (There is no inheritance of wealth.)
To observe the equity (or the inequity) of the distribution of wealth, a graphical tool called the Lorenz curve is utilized. We rank the population by their wealth and then plot the percentage of the population that owns each percentage of the wealth (e.g. 30% of the wealth is owned by 50% of the population). Hence the ranges on both axes are from 0% to 100%.
Another way to understand the Lorenz curve is to imagine that there are 100 dollars of wealth available in a society of 100 people. Each individual is 1% of the population and each dollar is 1% of the wealth. Rank the individuals in order of their wealth from greatest to least: the poorest individual would have the lowest ranking of 1 and so forth. Then plot the proportion of the rank of an individual on the y-axis and the portion of wealth owned by this particular individual and all the individuals with lower rankings on the x-axis. For example, individual Y with a ranking of 20 (20th poorest in society) would have a percentage ranking of 20% in a society of 100 people (or 100 rankings) -- this is the point on the y-axis. The corresponding plot on the x-axis is the proportion of the wealth that this individual with ranking 20 owns along with the wealth owned by the all the individuals with lower rankings (from rankings 1 to 19). A straight line with a 45 degree incline at the origin (or slope of 1) is a Lorenz curve that represents perfect equality -- everyone holds an equal part of the available wealth. On the other hand, should only one family or one individual hold all of the wealth in the population (i.e. perfect inequity), then the Lorenz curve will be a backwards "L" where 100% of the wealth is owned by the last percentage proportion of the population. In practice, the Lorenz curve actually falls somewhere between the straight 45 degree line and the backwards "L".
For a numerical measurement of the inequity in the distribution of wealth, the Gini index (or Gini coefficient) is derived from the Lorenz curve. To calculate the Gini index, find the area between the 45 degree line of perfect equality and the Lorenz curve. Divide this quantity by the total area under the 45 degree line of perfect equality (this number is always 0.5 -- the area of 45-45-90 triangle with sides of length 1). If the Lorenz curve is the 45 degree line then the Gini index would be 0; there is no area between the Lorenz curve and the 45 degree line. If, however, the Lorenz curve is a backwards "L", then the Gini-Index would be 1 -- the area between the Lorenz curve and the 45 degree line is 0.5; this quantity divided by 0.5 is 1. Hence, equality in the distribution of wealth is measured on a scale of 0 to 1 -- more inequity as one travels up the scale.
HOW TO USE IT
The PERCENT-BEST-LAND slider determines the initial density of patches that are seeded with the maximum amount of grain. This maximum is adjustable via the MAX-GRAIN variable in the SETUP procedure in the procedures window. The GRAIN-GROWTH-INTERVAL slider determines how often grain grows. The NUM-GRAIN-GROWN slider sets how much grain is grown each time GRAIN-GROWTH-INTERVAL allows grain to be grown.
The NUM-PEOPLE slider determines the initial number of people. LIFE-EXPECTANCY-MIN is the shortest number of ticks that a person can possibly live. LIFE-EXPECTANCY-MAX is the longest number of ticks that a person can possibly live. The METABOLISM-MAX slider sets the highest possible amount of grain that a person could eat per clock tick. The MAX-VISION slider is the furthest possible distance that any person could see.
GO starts the simulation. The TIME ELAPSED monitor shows the total number of clock ticks since the last setup. The CLASS PLOT shows a line plot of the number of people in each class over time. The CLASS HISTOGRAM shows the same information in the form of a histogram. The LORENZ CURVE plot shows the Lorenz curve of the population at a particular time as well as the 45 degree line of equality. The GINI-INDEX V. TIME plot shows the Gini index at the time that the Lorenz curve is drawn. The LORENZ CURVE and the GINI-INDEX V. TIME plots are updated every 5 passes through the GO procedure.
THINGS TO NOTICE
Notice the distribution of wealth. Are the classes equal?
This model usually demonstrates Pareto's Law, in which most of the people are poor, fewer are middle class, and very few are rich. Why does this happen?
Do poor families seem to stay poor? What about the rich and the middle class people?
Watch the CLASS PLOT to see how long it takes for the classes to reach stable values.
As time passes, does the distribution get more equalized or more skewed? (Hint: observe the Gini index plot.)
Try to find resources from the U.S. Government Census Bureau for the U.S.' Gini coefficient. Are the Gini coefficients that you calculate from the model comparable to those of the Census Bureau? Why or why not?
Is there a trend in the plotting of the Gini index with respect to time? Does the plot oscillate? Or does it stabilize to a certain number?
THINGS TO TRY
Are there any settings that do not result in a demonstration of Pareto's Law?
Play with the NUM-GRAIN-GROWN slider, and see how this affects the distribution of wealth.
How much does the LIFE-EXPECTANCY-MAX matter?
Change the value of the MAX-GRAIN variable (in the SETUP procedure in the procedures tab). Do outcomes differ?
Experiment with the PERCENT-BEST-LAND and NUM-PEOPLE sliders. How do these affect the outcome of the distribution of wealth?
Try having all the people start in one location. See what happens.
Try setting everyone's initial wealth as being equal. Does the initial endowment of an individual still arrive at an unequal distribution in wealth? Is it less so when setting random initial wealth for each individual?
Try setting all the individual's wealth and vision to being equal. Do you still arrive at an unequal distribution of wealth? Is it more equal in the measure of the Gini index than with random endowments of vision?
EXTENDING THE MODEL
Have each newborn inherit a percentage of the wealth of its parent.
Add a switch or slider which has the patches grow back all or a percentage of their grain capacity, rather than just one unit of grain.
Allow the grain to give an advantage or disadvantage to its carrier, such as every time some grain is eaten or harvested, pollution is created.
Would this model be the same if the wealth were randomly distributed (as opposed to a gradient)? Try different landscapes, making SETUP buttons for each new landscape.
Try allowing metabolism or vision or another characteristic to be inherited. Will we see any sort of evolution? Will the "fittest" survive?
Try adding in seasons into the model. That is to say have the grain grow better in a section of the landscape during certain times and worse at others.
How could you change the model to achieve wealth equality?
The way the procedures are set up now, one person will sometimes follow another. You can see this by setting the number of people relatively low, such as 50 or 100, and having a long life expectancy. Why does this phenomenon happen? Try adding code to prevent this from occurring. (HINT: When and how do people check to see which direction they should move in?)
NETLOGO FEATURES
Examine how the landscape of color is created -- note the use of the "scale-color" reporter. Each patch is given a value, and "scale-color" reports a color for each patch that is scaled according to its value.
Note the use of lists in drawing the Lorenz Curve and computing the Gini index.
CREDITS AND REFERENCES
For an explanation of Pareto's Law, see http://www.xrefer.com/entry/445978.
This model is based on a model described in Epstein, J. & Axtell R. (1996). Growing Artificial Societies: Social Science from the Bottom Up. Washington, DC: Brookings Institution Press.
Comments and Questions
globals [ max-grain ; maximum amount any patch can hold result ] patches-own [ grain-here ; the current amount of grain on this patch max-grain-here ; the maximum amount of grain this patch can hold ] turtles-own [ age ; how old a turtle is wealth ; the amount of grain a turtle has life-expectancy ; maximum age that a turtle can reach metabolism ; how much grain a turtle eats each time vision ; how many patches ahead a turtle can see ] to benchmark random-seed 48281 reset-timer setup repeat 400 [ go ] set result timer end ;;; ;;; SETUP AND HELPERS ;;; to setup ca ;; set global variables to appropriate values set max-grain 50 ;; call other procedures to set up various parts of the world setup-patches setup-turtles setup-plots ;; plot the initial state of the world update-plots end ;; set up the initial amounts of grain each patch has to setup-patches ;; give some patches the highest amount of grain possible -- ;; these patches are the "best land" ask patches [ set max-grain-here 0 if (random-float 100.0) <= percent-best-land [ set max-grain-here max-grain set grain-here max-grain-here ] ] ;; spread that grain around the window a little and put a little back ;; into the patches that are the "best land" found above repeat 5 [ ask patches with [max-grain-here != 0] [ set grain-here max-grain-here ] diffuse grain-here 0.25 ] repeat 10 [ diffuse grain-here 0.25 ] ;; spread the grain around some more ask patches [ set grain-here floor grain-here ;; round grain levels to whole numbers set max-grain-here grain-here ;; initial grain level is also maximum recolor-patch ] end to recolor-patch ;; patch procedure -- use color to indicate grain level set pcolor scale-color yellow grain-here 0 max-grain end ;; set up the initial values for the turtle variables to setup-turtles set-default-shape turtles "person" cro num-people [ setxy random-pxcor random-pycor ;; put turtles on patch centers set size 1.5 ;; easier to see set-initial-turtle-vars set age random life-expectancy ] recolor-turtles end to set-initial-turtle-vars set age 0 set heading 90 * random 4 set life-expectancy life-expectancy-min + random (life-expectancy-max - life-expectancy-min + 1) set metabolism 1 + random metabolism-max set wealth metabolism + random 50 set vision 1 + random max-vision end ;; Set the class of the turtles -- if a turtle has less than a third ;; the wealth of the richest turtle, color it red. If between one ;; and two thirds, color it green. If over two thirds, color it blue. to recolor-turtles let max-wealth max [wealth] of turtles ask turtles [ ifelse (wealth <= max-wealth / 3) [ set color red ] [ ifelse (wealth <= (max-wealth * 2 / 3)) [ set color green ] [ set color blue ] ] ] end ;;; ;;; GO AND HELPERS ;;; to go tick ;; unorthodox to put this first, but that's how this model has always done it - ST 2/1/07 ask turtles [ turn-towards-grain ] ;; choose direction holding most grain within the turtle's vision ;; grow grain every grain-growth-interval clock ticks if ticks mod grain-growth-interval = 0 [ ask patches [ grow-grain ] ] harvest ask turtles [ move-eat-age-die ] recolor-turtles update-plots end ;; determine the direction which is most profitable for each turtle in ;; the surrounding patches within the turtles' vision to turn-towards-grain ;; turtle procedure set heading 0 let best-direction 0 let best-amount grain-ahead set heading 90 if (grain-ahead > best-amount) [ set best-direction 90 set best-amount grain-ahead ] set heading 180 if (grain-ahead > best-amount) [ set best-direction 180 set best-amount grain-ahead ] set heading 270 if (grain-ahead > best-amount) [ set best-direction 270 set best-amount grain-ahead ] set heading best-direction end to-report grain-ahead ;; turtle procedure let total 0 let how-far 1 repeat vision [ set total total + [grain-here] of patch-ahead how-far set how-far how-far + 1 ] report total end to grow-grain ;; patch procedure ;; if a patch does not have it's maximum amount of grain, add ;; num-grain-grown to its grain amount if (grain-here < max-grain-here) [ set grain-here grain-here + num-grain-grown ;; if the new amount of grain on a patch is over its maximum ;; capacity, set it to its maximum if (grain-here > max-grain-here) [ set grain-here max-grain-here ] recolor-patch ] end ;; each turtle harvests the grain on its patch. if there are multiple ;; turtles on a patch, divide the grain evenly among the turtles to harvest ; have turtles harvest before any turtle sets the patch to 0 ask turtles [ set wealth floor (wealth + (grain-here / (count turtles-here))) ] ;; now that the grain has been harvested, have the turtles make the ;; patches which they are on have no grain ask turtles [ set grain-here 0 recolor-patch ] end to move-eat-age-die ;; turtle procedure fd 1 ;; consume some grain according to metabolism set wealth (wealth - metabolism) ;; grow older set age (age + 1) ;; check for death conditions: if you have no grain or ;; you're older than the life expectancy or if some random factor ;; holds, then you "die" and are "reborn" (in fact, your variables ;; are just reset to new random values) if (wealth < 0) or (age >= life-expectancy) [ set-initial-turtle-vars ] end ;;; ;;; PLOTTING ;;; to setup-plots set-current-plot "Class Plot" set-plot-y-range 0 num-people set-current-plot "Class Histogram" set-plot-y-range 0 num-people end to update-plots update-class-plot update-class-histogram update-lorenz-and-gini-plots end ;; this does a line plot of the number of people of each class to update-class-plot set-current-plot "Class Plot" set-current-plot-pen "low" plot count turtles with [color = red] set-current-plot-pen "mid" plot count turtles with [color = green] set-current-plot-pen "up" plot count turtles with [color = blue] end ;; this does a histogram of the number of people of each class to update-class-histogram set-current-plot "Class Histogram" plot-pen-reset set-plot-pen-color red plot count turtles with [color = red] set-plot-pen-color green plot count turtles with [color = green] set-plot-pen-color blue plot count turtles with [color = blue] end to update-lorenz-and-gini-plots set-current-plot "Lorenz Curve" clear-plot ;; draw a straight line from lower left to upper right set-current-plot-pen "equal" plot 0 plot 100 set-current-plot-pen "lorenz" set-plot-pen-interval 100 / num-people plot 0 let sorted-wealths sort [wealth] of turtles let total-wealth sum sorted-wealths let wealth-sum-so-far 0 let index 0 let gini-index-reserve 0 ;; now actually plot the Lorenz curve -- along the way, we also ;; calculate the Gini index repeat num-people [ set wealth-sum-so-far (wealth-sum-so-far + item index sorted-wealths) plot (wealth-sum-so-far / total-wealth) * 100 set index (index + 1) set gini-index-reserve gini-index-reserve + (index / num-people) - (wealth-sum-so-far / total-wealth) ] ;; plot Gini Index set-current-plot "Gini-Index v. Time" plot (gini-index-reserve / num-people) / area-of-equality-triangle end to-report area-of-equality-triangle ;; not really necessary to compute this when num-people is large; ;; if num-people is large, could just use estimate of 0.5 report (num-people * (num-people - 1) / 2) / (num-people ^ 2) end
There are 2 versions of this model.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.