Compare credit scoring models
Drop in a file with two or more scores for the same applications and their outcomes. Compare a champion with a challenger in a minute, with ROC and CAP curves, gains and lift, a test of each pair’s Gini difference, and the swap set.
Scored applications
304 applications compared, including 83 bad, with 0 rows left out because a score or outcome could not be read.
The file is read and every test runs in this browser, and nothing is uploaded.
Tick two or more columns, each a score or PD from a different model for the same applications. A PD with higher values meaning more risk is turned round automatically.
A model looks best on the rows it was built on, so compare on the validation or out-of-time sample. The page picks a sample with a name like that automatically.
In the columns pd_3, higher values mean higher risk, as in a PD, so the page turned them round to compare them with the others.
The demo uses 1,000 real credit applications from a bank in a public data set. Three scorecards built from the same 700 or so applications use ten, five and three characteristics, with the last shown as a PD, and are compared on about 300 held-out applications.
Top-ranked model
scorecard_10 has the highest Gini, and its lead over scorecard_5, pd_3 could be chance. On this file, they rank the applications about as well. Compared on the 304 applications of the validation sample, 83 of them bad.
Model results
| Model | AUC | Gini | Gini interval | KS | Lift in riskiest 10% |
|---|---|---|---|---|---|
| scorecard_10 | 0.752 | 0.503 | 0.383 – 0.624 | 0.403 | 2.07× |
| scorecard_5 | 0.746 | 0.492 | 0.372 – 0.611 | 0.372 | 2.34× |
| pd_3 | 0.729 | 0.458 | 0.333 – 0.582 | 0.359 | 2.26× |
ROC curves
Pairwise model tests
The test that every model’s AUC is the same gives a chi-square of 2.11 on 2 degrees of freedom, p-value 0.3486. scorecard_10 has the highest Gini, and its lead over scorecard_5, pd_3 could be chance. On this file, they rank the applications about as well.
| Models | Gini difference | 95% interval | z | p | Adjusted p | Result |
|---|---|---|---|---|---|---|
| scorecard_10 · scorecard_5 | +0.012 | −0.046 – +0.070 | 0.40 | 0.6883 | 0.6883 | Could be chance |
| scorecard_10 · pd_3 | +0.046 | −0.023 – +0.115 | 1.30 | 0.1935 | 0.5806 | Could be chance |
| scorecard_5 · pd_3 | +0.034 | −0.018 – +0.086 | 1.27 | 0.2027 | 0.5806 | Could be chance |
Both models are measured on the same applications, so the test is DeLong’s paired test, which counts how alike the two scores rank them. With more than two models, each p-value is adjusted by Holm’s method so the chance of one false difference among all the pairs stays at the level.
CAP curves
The closer a line runs to the perfect model’s, the more bads the model puts among its riskiest applications. Its accuracy ratio is the Gini.
Lift by tenth
Each bar is a tenth of applications, ordered from riskiest, with its bad rate compared with the average bad rate. Above the dashed line, the tenth is riskier than average.
Gains and lift
The riskiest 20% of applications by scorecard_10 hold 41.0% of the bads, and its riskiest 10% hold bads at 2.07× the average rate.
| Riskiest share | scorecard_10 | scorecard_5 | pd_3 | |||
|---|---|---|---|---|---|---|
| Bads caught | Cumulative lift | Bads caught | Cumulative lift | Bads caught | Cumulative lift | |
| 10% | 20.7% | 2.07× | 23.4% | 2.34× | 22.6% | 2.26× |
| 20% | 41.0% | 2.05× | 40.6% | 2.03× | 39.6% | 1.98× |
| 30% | 58.6% | 1.95× | 53.3% | 1.78× | 54.6% | 1.82× |
| 40% | 65.1% | 1.63× | 65.2% | 1.63× | 62.5% | 1.56× |
| 50% | 75.9% | 1.52× | 75.9% | 1.52× | 73.3% | 1.47× |
| 60% | 84.3% | 1.41× | 84.2% | 1.40× | 80.7% | 1.35× |
| 70% | 91.6% | 1.31× | 91.6% | 1.31× | 89.0% | 1.27× |
| 80% | 96.1% | 1.20× | 97.6% | 1.22× | 93.9% | 1.17× |
| 90% | 97.6% | 1.08× | 98.8% | 1.10× | 99.0% | 1.10× |
| 100% | 100.0% | 1.00× | 100.0% | 1.00× | 100.0% | 1.00× |
Swap set
Each model approves 70% of the applications using its best scores. Against the champion scorecard_10, a challenger is worth more when its swap in has a lower bad rate than its swap out.
| Model | Cut-off | Approved | Bad rate |
|---|---|---|---|
| scorecard_10 · Champion | ≥ 497 | 214 (70.4%) | 16.4% |
| scorecard_5 | ≥ 495 | 215 (70.7%) | 18.6% |
| pd_3 | ≤ 0.424 | 214 (70.4%) | 17.8% |
| Challenger | Both approve | Swap in | Bad rate | Swap out | Bad rate |
|---|---|---|---|---|---|
| scorecard_5 | 202 | 13 | 53.8% | 12 | 16.7% |
| pd_3 | 196 | 18 | 38.9% | 18 | 22.2% |
Source: Statlog (German Credit Data), Hans Hofmann, UCI Machine Learning Repository (CC BY 4.0).
Compare credit scoring models
Credit scoring models rank applications by risk, and Gini describes how well a score separates good and bad outcomes. This tool compares two or more scores on the same applications with known outcomes.
A higher Gini alone does not show whether a challenger is better than the champion. The paired test checks whether the difference could be chance, and the swap set shows which applications would change approval decisions.
Common questions
How do I compare two credit scoring models?
Compare both scores on the same applications with known outcomes. This tool compares their Gini and tests the difference with DeLong’s paired test.
How do I compare two ROC curves?
Plot both models’ ROC curves on the same chart. The diagonal shows a score that ranks no better than chance.
What does a DeLong test compare?
DeLong’s paired test compares the AUCs of two models measured on the same applications. It accounts for how alike the models’ rankings are on those applications.
Is the difference between two AUCs significant?
The paired DeLong test gives a p-value for the difference between the models’ AUCs. With more than two models, Holm’s method adjusts the p-values for the number of pairs compared.
What does a CAP curve show?
A CAP curve shows the share of bads caught as applications are taken from riskiest to least risky. Its accuracy ratio is the Gini.