1. Original Definition (Economics)
- The Gini coefficient was first introduced by Corrado Gini (Italian statistician, 1912).
- It measures inequality within a distribution (e.g., income, wealth).
- Defined using the Lorenz curve, which plots the cumulative share of income earned by the cumulative share of the population.
Mathematically:
$Gini = \frac{A}{A+B}$
Where:
- $A$ = area between the line of equality (perfect equality line) and the Lorenz curve
- $B$ = area under the Lorenz curve
So, Gini is literally the normalized area between equality and inequality.
2. In Machine Learning
In binary classification problems, the Gini coefficient is used as a measure of model discriminatory power.
It’s directly related to the Area Under the ROC Curve (AUROC):
$Gini = 2 \times AUROC – 1$
- AUROC = 0.5 (random guessing) → $Gini = 0$
- AUROC = 1.0 (perfect discrimination) → $Gini = 1$
- AUROC < 0.5 (worse than random, inverted predictions) → $Gini < 0$
This means Gini does not add new information beyond AUROC. It’s simply a linear transformation, but it’s widely used in finance and credit risk.
3. Why Financial Industry Uses Gini
- Credit Scoring Models (e.g., predicting loan defaults, churn, fraud) often report Gini instead of AUROC.
- A higher Gini means the model can better separate “goods” (non-defaulters) from “bads” (defaulters).
- Regulators (e.g., Basel II/III frameworks) often require reporting Gini in model validation.
4. Interpretation Example
Suppose we have two models predicting whether a customer defaults on a loan:
- Model A: AUROC = 0.72 → Gini = $2 \times 0.72 – 1 = 0.44$
- Model B: AUROC = 0.85 → Gini = $0.70$
Interpretation:
- Model B is much stronger at ranking defaulters above non-defaulters.
- A Gini of 0.70 is considered excellent in credit risk modeling.
5. Connection to Lorenz Curve in ML
In economics:
- Lorenz curve plots cumulative income share.
In ML:
- Replace “income” with “predicted probability of being positive”
- Replace “population” with “customers sorted by model score”
- The same curve area concept applies → Gini is the normalized area.
6. Typical Ranges
- 0.20–0.30 → weak model (barely better than random)
- 0.40–0.50 → acceptable / useful
- 0.60–0.70 → strong model
- 0.80+ → very rare in practice, usually overfitting or data leakage
Summary:
The Gini coefficient in ML is a rescaled AUROC (2×AUROC−1), widely used in finance because it expresses the model’s ability to discriminate between positive and negative outcomes, just like it expresses inequality in economics.
