Notes on how to compute Gini Coefficient
Suppose you are given data like this:
The lowest 10% of earners make 2% of all wages
The next 40% of earners make 18% of all wages
The next 40% of earners make 30% of all wages
The highest 10% of earners make 50% of all wages
The Gini coefficient requires you to construct a Lorenz curve that would look
like this:
Fraction of income
A
Fraction of population
Then you have to determine what fraction of the triangle is made up of area A.
How to Solve it More Simply
You can solve it geometrically, which would involve solving for the areas of
several triangle and trapezoids and adding them up. Here is an alternative
way to solve it.
Step 1: Organize the data into the following table:
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.02 0.10
0.18 0.40
0.30 0.40
0.50 0.10
Step 2: Fill in the “% of Population that is Richer” column by adding all the
“Fraction of Population” terms below that row
How to Solve it More Simply
Implementing Step 2 gives:
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.02 0.10 0.90
0.18 0.40 0.50
0.30 0.40 0.10
0.50 0.10 0
Step 3: Compute “Score”. Score is given by:
Score = Fraction of Income * (Fraction of Population + 2 * % of Population Richer)
How to Solve it More Simply
Implementing Step 3 gives:
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.02 0.10 0.90 0.038
0.18 0.40 0.50 0.252
0.30 0.40 0.10 0.180
0.50 0.10 0 0.050
Step 4: Add up all the terms in the “Score” column. Call that “Total”.
In this example, we get 0.520
Step 5: Gini Coefficient = 1 – Total.
In this example, we get 1 – 0.520 = 0.480
Conclusion: The Gini Coefficient is 0.480
Notes on this Method
It is important to organize the rows going from poorest to richest. When I give
you questions, they will always be given to you that way.
The intuition for the “Score” formula comes from the fact that we are
computing the areas of a bunch of trapezoids. The area of a trapezoid is:
Height * (Base at top + Base at bottom) / 2. The very last step of our calculation
of the Gini is to divide by the area of the triangle which is ½. So: Area of
Trapezoid / (1/2) = 2*Height*(Base at top + Base at bottom). In our calculation,
the fraction of wealth is the height of the trapezoid, and the bases are “fraction
of population that is richer than this group” and “fraction of population that is
richer + this group’s fraction of population”
Extra Practice 1
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.10 0.25
0.15 0.25
0.35 0.25
0.40 0.25
Recall:
Score = Fraction of Income * (Fraction of Population + 2 * % of Population Richer)
Total = Sum of Scores
Gini = 1 – Total
ANSWER ON NEXT SLIDE
Extra Practice 1
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.10 0.25 0.75 0.1750
0.15 0.25 0.50 0.1875
0.35 0.25 0.25 0.2625
0.40 0.25 0 0.1000
Total = 0.7250
Gini = 0.2750
Extra Practice 2
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.01 0.10
0.04 0.10
0.10 0.30
0.30 0.30
0.20 0.10
0.35 0.10
ANSWER ON NEXT SLIDE
Extra Practice 2
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.01 0.10 0.90 0.019
0.04 0.10 0.80 0.068
0.10 0.30 0.50 0.130
0.30 0.30 0.20 0.210
0.20 0.10 0.10 0.060
0.35 0.10 0 0.035
Total = 0.522
Gini = 0.478
Extra Practice 3
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.02 0.10
0.03 0.05
0.10 0.15
0.50 0.50
0.35 0.20
ANSWER ON NEXT SLIDE
Extra Practice 3
Fraction of % of Population
Fraction of Income Score
Population that is Richer
0.02 0.10 0.90 0.0380
0.03 0.05 0.85 0.0525
0.10 0.15 0.70 0.1550
0.50 0.50 0.20 0.4500
0.35 0.20 0 0.0700
Total = 0.7655
Gini = 0.2345