Lorenz Curve and Gini Index
A Lorenz curve L(x) gives the share of total income earned by the poorest fraction x of households. The Gini index measures income inequality as twice the area between the line of equality y = x and the Lorenz curve: G = 2\int_0^1 [x - L(x)]\,dx. It runs from 0 (equal) to 1 (unequal).
Before this lesson: Definite Integrals, Area Between Curves and Consumer and Producer Surplus
What a Lorenz curve shows
Line up every household from the lowest income to the highest. Then ask: what share of all income goes to the bottom 20%? To the bottom 50%? The Lorenz curve plots these answers. The input x is a fraction of the households, and the output L(x) is their fraction of the total income.
If every household earned the same amount, the bottom 20% would earn exactly 20% of the income. The curve would then be the line of equality y = x. Real incomes are unequal, so the poorest households earn less than an equal share and the curve sags below that line. The bigger the sag, the more unequal the incomes.
Properties of a Lorenz curve
- L(0) = 0: zero households earn zero income.
- L(1) = 1: all households together earn all of the income.
- L(x) \le x for 0 \le x \le 1: the poorest households never earn more than an equal share.
- L(x) is increasing and concave up, because each added household earns at least as much as the ones before it.
The Gini index formula
The area between the line of equality and the Lorenz curve measures inequality. The largest this area can be is the whole triangle under y = x, which has area \frac{1}{2}. The Gini index divides the area by \frac{1}{2}, which is the same as doubling it.
G = \frac{\text{area between } y = x \text{ and } L(x)}{1/2} = 2\int_0^1 \left[x - L(x)\right]\,dxSince \int_0^1 x\,dx = \frac{1}{2}, a shortcut form is G = 1 - 2\int_0^1 L(x)\,dx. A Gini index of 0 means perfect equality. A value near 1 means a few households earn almost everything.
How to find the Gini index
- Check that L(0) = 0 and L(1) = 1.
- Write the gap x - L(x) and simplify it.
- Integrate the gap from 0 to 1.
- Multiply by 2.
- Interpret the answer: closer to 0 is more equal, and closer to 1 is less equal.
Lorenz curve and Gini index examples
Example 1: The Gini index of L(x) = x²
Find the Gini index for the Lorenz curve L(x) = x^2.
L(0) = 0^2 = 0,\quad L(1) = 1^2 = 1
Check the endpoints.
G = 2\int_0^1 (x - x^2)\,dx
Set up twice the area between the curves.
= 2\left[\frac{x^2}{2} - \frac{x^3}{3}\right]_0^1Integrate each term with the power rule (see antiderivatives).
= 2\left(\frac{1}{2} - \frac{1}{3}\right) - 2(0 - 0)Evaluate at 1 and at 0 (see the Fundamental Theorem of Calculus).
= 2 \cdot \frac{1}{6}Subtract the fractions: \frac{3}{6} - \frac{2}{6} = \frac{1}{6}.
= \frac{1}{3} \approx 0.333Multiply.
Answer: G = \frac{1}{3} \approx 0.33. This is the curve shaded in the graph above.
Example 2: Reading income shares from a Lorenz curve
For L(x) = x^3, find the share of income earned by the poorest 50% and by the richest 20%. Then find the Gini index.
L(0.5) = 0.5^3
The poorest 50% means x = 0.5.
= 0.125
Cube 0.5.
L(0.8) = 0.8^3
The richest 20% are everyone above the poorest 80%.
= 0.512
Cube 0.8.
1 - L(0.8) = 1 - 0.512
Subtract the bottom 80%’s share from the total, 1.
= 0.488
Subtract.
G = 2\int_0^1 (x - x^3)\,dx
Set up the Gini index.
= 2\left[\frac{x^2}{2} - \frac{x^4}{4}\right]_0^1Integrate each term.
= 2\left(\frac{1}{2} - \frac{1}{4}\right)Evaluate. The value at 0 is 0.
= 2 \cdot \frac{1}{4}Subtract the fractions.
= \frac{1}{2}Multiply.
Answer: The poorest 50% earn 12.5% of the income, the richest 20% earn 48.8%, and G = 0.5. The curve x^3 sags lower than x^2, so its Gini index is larger than the one in Example 1.
Example 3: A Lorenz curve with two terms
Find the Gini index for L(x) = 0.4x + 0.6x^2.
L(1) = 0.4 + 0.6 = 1
Check the right endpoint. L(0) = 0, since both terms are 0.
x - L(x) = x - 0.4x - 0.6x^2
Write the gap.
= 0.6x - 0.6x^2
Combine like terms.
G = 2\int_0^1 (0.6x - 0.6x^2)\,dx
Set up the Gini index.
= 2\left[0.3x^2 - 0.2x^3\right]_0^1
Integrate: 0.6 \cdot \frac{x^2}{2} = 0.3x^2 and 0.6 \cdot \frac{x^3}{3} = 0.2x^3.
= 2(0.3 - 0.2)
Evaluate. The value at 0 is 0.
= 2(0.1)
Subtract.
= 0.2
Multiply.
Answer: G = 0.2, a fairly equal income distribution.
Example 4: Comparing two countries
An economist models income in Country A with L_A(x) = x^{2.5} and in Country B with L_B(x) = 0.3x + 0.7x^3. What share of income does the poorest 40% earn in each country? Which country has more income inequality?
L_A(0.4) = 0.4^{2.5}Substitute x = 0.4 into Country A’s curve.
\approx 0.101
Evaluate the power with a calculator.
L_B(0.4) = 0.3(0.4) + 0.7(0.4)^3
Substitute x = 0.4 into Country B’s curve.
= 0.12 + 0.7(0.4)^3
Multiply 0.3(0.4).
= 0.12 + 0.7(0.064)
Cube 0.4.
= 0.12 + 0.0448
Multiply.
= 0.1648
Add.
\int_0^1 x^{2.5}\,dx = \left[\frac{x^{3.5}}{3.5}\right]_0^1Integrate Country A’s curve with the power rule.
= \frac{1}{3.5}Evaluate. The value at 0 is 0.
= \frac{2}{7}Multiply the top and bottom by 2.
G_A = 1 - 2 \cdot \frac{2}{7}Use the shortcut G = 1 - 2\int_0^1 L(x)\,dx.
= 1 - \frac{4}{7}Multiply.
= \frac{3}{7} \approx 0.429Subtract.
\int_0^1 (0.3x + 0.7x^3)\,dx = \left[0.15x^2 + 0.175x^4\right]_0^1
Integrate Country B’s curve.
= 0.15 + 0.175
Evaluate. The value at 0 is 0.
= 0.325
Add.
G_B = 1 - 2(0.325)
Use the shortcut.
= 1 - 0.65
Multiply.
= 0.35
Subtract.
Answer: The poorest 40% earn about 10.1% of the income in Country A and about 16.5% in Country B. Country A has more inequality, since G_A \approx 0.43 is larger than G_B = 0.35.
Example 5: The Gini index from income data
Real income data usually comes in quintiles (fifths). Suppose the poorest fifth of households earns 4% of the income, the next three fifths earn 9%, 15% and 22%, and the richest fifth earns 50%. Estimate the Gini index.
L(0.2) = 0.04
The poorest fifth earns 4%.
L(0.4) = 0.04 + 0.09 = 0.13
Add the second fifth’s share.
L(0.6) = 0.13 + 0.15 = 0.28
Add the third fifth’s share.
L(0.8) = 0.28 + 0.22 = 0.50
Add the fourth fifth’s share.
L(1) = 0.50 + 0.50 = 1
Add the richest fifth’s share.
\int_0^1 L(x)\,dx \approx \frac{0.2}{2}\left[L(0) + 2L(0.2) + 2L(0.4) + 2L(0.6) + 2L(0.8) + L(1)\right]Use the trapezoidal rule with width \Delta x = 0.2.
= 0.1\left[0 + 2(0.04) + 2(0.13) + 2(0.28) + 2(0.50) + 1\right]
Substitute the cumulative shares.
= 0.1\left[0 + 0.08 + 0.26 + 0.56 + 1.00 + 1\right]
Double the middle values.
= 0.1(2.90)
Add.
= 0.29
Multiply.
G \approx 1 - 2(0.29)
Use the shortcut.
= 1 - 0.58
Multiply.
= 0.42
Subtract.
Answer: G \approx 0.42. The true curve is concave up, so the trapezoids sit slightly above it. That makes the integral estimate a little high and this Gini estimate a little low.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Forgetting the factor of 2 | Reporting \int_0^1 (x - x^2)\,dx = \frac{1}{6} as the Gini index | The area is at most \frac{1}{2}, so double it: G = \frac{1}{3}. |
| Integrating only the Lorenz curve | Saying G = \int_0^1 x^3\,dx = \frac{1}{4} | Integrate the gap x - L(x), or use 1 - 2\int_0^1 L(x)\,dx. Both give G = \frac{1}{2}. |
| Subtracting in the wrong order | Integrating x^2 - x and getting G = -\frac{1}{3} | The line y = x is on top, so the gap is x - L(x). A Gini index is never negative. |
| Mixing up the bottom and top shares | Saying the richest 20% earn L(0.2) | L(x) is the share of the poorest fraction x. The richest 20% earn 1 - L(0.8). |
| Accepting a curve that is not a Lorenz curve | Using L(x) = \sqrt{x}, which lies above y = x | Check L(0) = 0, L(1) = 1 and L(x) \le x. |
| Reading the Gini index backward | Thinking 0.6 is more equal than 0.3 | A larger G means more inequality. |
Related ideas
The family L(x) = x^k. For k \ge 1, the same steps as Example 1 give G = \frac{k - 1}{k + 1}. Larger powers sag more: k = 2 gives \frac{1}{3}, k = 3 gives \frac{1}{2} and k = 4 gives \frac{3}{5}.
A gap between two curves. The Gini integral is an area between curves with y = x on top. Like consumer and producer surplus, it turns the gap between two curves into one number.
Gini index as a percent. News reports often multiply G by 100, so G = 0.42 is reported as a Gini index of 42.
Practice problems
- Find the Gini index for L(x) = x^4.
- For L(x) = x^2, what share of income does the poorest 30% earn?
- Find the Gini index for L(x) = 0.5x + 0.5x^2.
- Find the Gini index for L(x) = x^{1.5}.
- Find the Gini index for L(x) = \frac{e^x - 1}{e - 1}.
- For L(x) = x^3, what share of income does the richest 10% earn?
- Explain why L(x) = \sqrt{x} cannot be a Lorenz curve.
- Region 1 has L_1(x) = x^2 and Region 2 has L_2(x) = 0.2x + 0.8x^3. Which region has more inequality?
- A survey finds that the five fifths of households, poorest first, earn 6%, 12%, 18%, 24% and 40% of the income. Estimate the Gini index with the trapezoidal rule.
- For what power k does L(x) = x^k have a Gini index of 0.5?
Show answers
1.
G = 2\int_0^1 (x - x^4)\,dx
Set up the Gini index.
= 2\left[\frac{x^2}{2} - \frac{x^5}{5}\right]_0^1Integrate each term.
= 2\left(\frac{1}{2} - \frac{1}{5}\right)Evaluate. The value at 0 is 0.
= 2 \cdot \frac{3}{10}Subtract: \frac{5}{10} - \frac{2}{10} = \frac{3}{10}.
= \frac{3}{5} = 0.6Multiply.
Answer: G = 0.6
2.
L(0.3) = 0.3^2
Substitute x = 0.3.
= 0.09
Square 0.3.
Answer: the poorest 30% earn 9% of the income.
3.
x - L(x) = x - 0.5x - 0.5x^2
Write the gap.
= 0.5x - 0.5x^2
Combine like terms.
G = 2\int_0^1 (0.5x - 0.5x^2)\,dx
Set up the Gini index.
= 2\left[0.25x^2 - \frac{x^3}{6}\right]_0^1Integrate each term.
= 2\left(\frac{1}{4} - \frac{1}{6}\right)Evaluate. The value at 0 is 0.
= 2 \cdot \frac{1}{12}Subtract: \frac{3}{12} - \frac{2}{12} = \frac{1}{12}.
= \frac{1}{6} \approx 0.167Multiply.
Answer: G = \frac{1}{6} \approx 0.167
4.
\int_0^1 x^{1.5}\,dx = \left[\frac{x^{2.5}}{2.5}\right]_0^1Integrate with the power rule.
= \frac{1}{2.5} = 0.4Evaluate. The value at 0 is 0.
G = 1 - 2(0.4)
Use the shortcut.
= 1 - 0.8
Multiply.
= 0.2
Subtract.
Answer: G = 0.2
5.
L(0) = \frac{1 - 1}{e - 1} = 0,\quad L(1) = \frac{e - 1}{e - 1} = 1Check the endpoints.
\int_0^1 L(x)\,dx = \frac{1}{e - 1}\int_0^1 (e^x - 1)\,dxPull out the constant \frac{1}{e - 1}.
= \frac{1}{e - 1}\left[e^x - x\right]_0^1Integrate. An antiderivative of e^x is e^x.
= \frac{1}{e - 1}\left[(e - 1) - (1 - 0)\right]Evaluate at 1 and at 0.
= \frac{e - 2}{e - 1}Simplify the bracket.
G = 1 - \frac{2(e - 2)}{e - 1}Use the shortcut.
= \frac{(e - 1) - (2e - 4)}{e - 1}Write over the common denominator e - 1.
= \frac{3 - e}{e - 1}Simplify the top.
\approx \frac{0.28172}{1.71828}Use e \approx 2.71828.
\approx 0.164
Divide.
Answer: G = \frac{3 - e}{e - 1} \approx 0.164
6.
L(0.9) = 0.9^3
The richest 10% are everyone above the poorest 90%.
= 0.729
Cube 0.9.
1 - 0.729 = 0.271
Subtract from the total, 1.
Answer: the richest 10% earn 27.1% of the income.
7.
L(0.25) = \sqrt{0.25} = 0.5Test a point.
0.5 \gt 0.25
Compare with the line of equality.
Answer: it says the poorest 25% earn 50% of the income, more than an equal share. A Lorenz curve must have L(x) \le x. The curve is also concave down, not concave up.
8.
G_1 = \frac{1}{3} \approx 0.333This is Example 1.
\int_0^1 (0.2x + 0.8x^3)\,dx = \left[0.1x^2 + 0.2x^4\right]_0^1
Integrate each term.
= 0.1 + 0.2
Evaluate. The value at 0 is 0.
= 0.3
Add.
G_2 = 1 - 2(0.3)
Use the shortcut.
= 1 - 0.6
Multiply.
= 0.4
Subtract.
Answer: Region 2 has more inequality, since 0.4 is larger than 0.333.
9.
L(0.2) = 0.06,\quad L(0.4) = 0.06 + 0.12 = 0.18
Add the shares to get cumulative points.
L(0.6) = 0.18 + 0.18 = 0.36
Add the third fifth’s share.
L(0.8) = 0.36 + 0.24 = 0.60
Add the fourth fifth’s share.
L(1) = 0.60 + 0.40 = 1
Add the richest fifth’s share.
\int_0^1 L(x)\,dx \approx 0.1\left[0 + 2(0.06) + 2(0.18) + 2(0.36) + 2(0.60) + 1\right]
Use the trapezoidal rule: \frac{\Delta x}{2} = \frac{0.2}{2} = 0.1.
= 0.1\left[0 + 0.12 + 0.36 + 0.72 + 1.20 + 1\right]
Double the middle values.
= 0.1(3.40)
Add.
= 0.34
Multiply.
G \approx 1 - 2(0.34)
Use the shortcut.
= 1 - 0.68
Multiply.
= 0.32
Subtract.
Answer: G \approx 0.32
10.
\frac{k - 1}{k + 1} = 0.5Use G = \frac{k - 1}{k + 1} from Related ideas.
k - 1 = 0.5(k + 1)
Multiply both sides by k + 1.
k - 1 = 0.5k + 0.5
Distribute.
0.5k - 1 = 0.5
Subtract 0.5k from both sides.
0.5k = 1.5
Add 1 to both sides.
k = 3
Divide both sides by 0.5.
Answer: k = 3, the curve in Example 2.
FAQ
What is the formula for the Gini index?
G = 2\int_0^1 [x - L(x)]\,dx, where L(x) is the Lorenz curve. An equivalent form is G = 1 - 2\int_0^1 L(x)\,dx.
What does a Lorenz curve tell you?
It tells you what share of total income goes to the poorest fraction of households. For example, L(0.5) = 0.2 means the bottom half of households earns 20% of all income.
What is a high Gini index?
The Gini index runs from 0 to 1, and higher means more unequal. Country values usually fall between about 0.25 and 0.65, so a value above 0.5 is high.
Why is the Lorenz curve below the line y = x?
The poorest households can’t earn more than an equal share, so L(x) \le x. The curve touches the line all the way across only when every household earns the same amount.
Summary
- A Lorenz curve L(x) gives the share of income earned by the poorest fraction x of households.
- It has L(0) = 0, L(1) = 1 and L(x) \le x.
- The Gini index is G = 2\int_0^1 [x - L(x)]\,dx = 1 - 2\int_0^1 L(x)\,dx.
- G runs from 0 (perfect equality) to 1 (total inequality).
- With quintile data, estimate the integral with the trapezoidal rule.
Previous lesson: Continuous Income Streams
Next lesson: Cobb-Douglas Production Function
Back to the Finite Math Index