How to Calculate the Gini Coefficient How to Calculate the Gini Coefficient

So week one of this challenge is turning into a “Dave shamefully admits that he doesn’t know things he should definitely know already” party, and today (yesterday) is no different.
(Quick note: Tumblr was down last night, thus this post had to be pushed back to the morning)
For those of you who are unaware, and among readers of my blog that is probably not many of you, the Gini coefficient is a measure of inequality within a given country. It’s expressed as a ratio that falls between 0 (perfect equality) and 1 (perfect inequality).
In general, countries in the Southern Hemisphere (except Australia and New Zealand) have high Gini coefficients, and countries in Western Europe and Scandinavia have the lowest.
So here’s how to calculate it.
Start with two axes. The vertical goes from 0% to 100% and represents the percent of income earned in a country. The horizontal axis goes from 0% to 100% and represents the percentage of the population receiving that income.
Thus, in the perfect equality scenario, we have a 45 degree line representing that for every 1% increase in income, 1% of the population receives it. Thus for any n% of income, n% of the population receives it, thus everyone receives the same => Perfect equality.
The other boundary scenario is where one individual has all of the income. This curve follows the horizontal axis all the way out to the 99.99% mark then jumps to the 100% level at the very end.
The area bounded by these lines is a triangle whose area makes up the denominator of the Gini coefficient.
To find the numerator, the curve representing the country’s income distribution is plotted on this axis and the area between that curve and the “perfect equality” curve is calculated. That area is the numerator.
Thus, the Gini coefficient is the ratio between the cumulative difference between the actual income distribution and perfect equality, and the total area under the perfect equality curve. (See above for graphical illustration from Wikipedia, which admittedly does a better job explaining this than I do).