GINI and AUC relationship

I know there is a relationship between GINI coefficient and AUC. But can anyone tell me how to get this relationship? Most people get it from geometric deviation from ROC curve. But the thing is how do you know the ROC curve and Lorenze curve is the same curve... In other words, what is the relationship between Lorenze curve and ROC curve?

migrated from stackoverflow.comApr 23 '18 at 19:38

This question came from our site for professional and enthusiast programmers.

• This is something that I also wondered about. the ROC and the Lorenz curve have different axes - so how can we geometrically transform one into the other .... – Ric May 25 '18 at 6:23

I had the same thoughts and I stumbled upon a nice presentation.

Let us use the following definitions:

Gini (mostly equal to the accuracy ratio "AR") is the ratio of the area between your curve and the diagonal and the area between the perfect model and the diagonal. This definition on the CAP curve gives the usual Gini. If you use it on the ROC curve then you see the relation to the AUC. The perfect model in the ROC is just a straight line (0% FPR and 100% TPR). I tried to make this clear in the following two plots.

First on the CAP you get Gini by the usual formula:

Then on the ROC you see the perfect model and apply the same formual. We use that the area between the perfect model and the diagonal is $1/2$ in this case: Finally, using that $A = G/2$ we get the relationship: $G = 2 \cdot AUC -1$.