Gini Coefficient
- The Gini Coefficient is essentially how much disparity there is between the equal and inequal curves
\begin{document}
\begin{tikzpicture}[scale=6]
% Draw axes
\draw[->] (0,0) -- (1.1,0) node[right] {Cumulative \% of Population};
\draw[->] (0,0) -- (0,1.1) node[above] {Cumulative \% of Wealth};
% Draw grid
\foreach \x in {0,0.2,0.4,0.6,0.8,1.0}
\draw[gray!30, very thin] (\x,0) -- (\x,1);
\foreach \y in {0,0.2,0.4,0.6,0.8,1.0}
\draw[gray!30, very thin] (0,\y) -- (1,\y);
% Axis tick labels
\foreach \x in {0,20,40,60,80,100}
\node[below] at (\x/100,-0.02) {\tiny \x};
\foreach \y in {0,20,40,60,80,100}
\node[left] at (-0.02,\y/100) {\tiny \y};
% Line of Perfect Equality (diagonal)
\draw[blue, thick, dashed] (0,0) -- (1,1) node[above right, pos=0.8] {\small Perfect Equality};
% Lorenz Curve showing inequality
% Using a smooth curve that bows below the diagonal
\draw[red, thick] (0,0)
.. controls (0.2,0.05) and (0.4,0.15) .. (0.5,0.25)
.. controls (0.6,0.35) and (0.7,0.50) .. (0.8,0.65)
.. controls (0.9,0.82) .. (1,1);
% Label for Lorenz Curve
\node[red] at (0.65,0.35) {\small Inequality};
\node[red] at (0.65,0.31) {\small (Lorenz Curve)};
% Shaded area between curves (representing inequality)
\fill[red!10, opacity=0.5] (0,0)
.. controls (0.2,0.05) and (0.4,0.15) .. (0.5,0.25)
.. controls (0.6,0.35) and (0.7,0.50) .. (0.8,0.65)
.. controls (0.9,0.82) .. (1,1)
-- (0,0);
\fill[blue!10, opacity=0.3] (0,0) -- (1,1) -- (1,0) -- cycle;
% Origin label
\node[below left] at (0,0) {0};
% Data points for perfect equality
\foreach \p in {0,10,20,30,40,50,60,70,80,90,100}
\fill[blue] (\p/100,\p/100) circle (0.01);
\end{tikzpicture}
\end{document}
- Here's our Lorenz Curve.
-
- Let be and be
- The area under the line of perfect equality is a triangle:
- is our Lorenz Curve
Discrete
- Example:
\text{Population %} & & \text{Income %} & \
\text{Cumulative} & \text{Margin} & \text{Cumulative} & \text{Margin} \
0 & - & 0 & - \
20 & 20 & 10 & 10 \
50 & 30 & 31 & 21 \
60 & 10 & 40 & 9 \
100 & 400 & 100 & 6
\end