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.

Score columns

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.

Test settings

A difference counts when its adjusted p-value is below this level.

Each model approves this share of applications using its best scores. The swap set counts applications where the champion and a challenger disagree.

Top-ranked model

scorecard_10
Top Gini0.503
Next Gini0.492
Adjusted p-value0.6883

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

ModelAUCGiniGini intervalKSLift in riskiest 10%
scorecard_100.7520.5030.383 – 0.6240.4032.07×
scorecard_50.7460.4920.372 – 0.6110.3722.34×
pd_30.7290.4580.333 – 0.5820.3592.26×

ROC curves

scorecard_10scorecard_5pd_3

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.

ModelsGini difference95% intervalzpAdjusted pResult
scorecard_10 · scorecard_5+0.012−0.046 – +0.0700.400.68830.6883Could be chance
scorecard_10 · pd_3+0.046−0.023 – +0.1151.300.19350.5806Could be chance
scorecard_5 · pd_3+0.034−0.018 – +0.0861.270.20270.5806Could 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 sharescorecard_10scorecard_5pd_3
Bads caughtCumulative liftBads caughtCumulative liftBads caughtCumulative 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.

ModelCut-offApprovedBad rate
scorecard_10 · Champion≥ 497214 (70.4%)16.4%
scorecard_5≥ 495215 (70.7%)18.6%
pd_3≤ 0.424214 (70.4%)17.8%
ChallengerBoth approveSwap inBad rateSwap outBad rate
scorecard_52021353.8%1216.7%
pd_31961838.9%1822.2%

Work out the swap set’s effect on losses and approvals

In Decisimo, a challenger score runs beside the champion on live applications, with every decision and outcome kept, so this comparison runs on the lender’s own data without anyone building the file. Start your trial

How figures are worked out
Gini = 2 × AUC − 1      KS = max (% Bads − % Goods)
Var(AUC a − AUC b) = (S10aa + S10bb − 2 S10ab) ÷ Goods + (S01aa + S01bb − 2 S01ab) ÷ Bads   (DeLong)
z = (AUC a − AUC b) ÷ √Var,   p = 2 × (1 − Φ(|z|)),   Holm: p(i) × (Pairs − i + 1)
χ² = (L·AUC)′ (L S L′)⁻¹ (L·AUC),   Degrees of freedom = Models − 1
Gains = % Bads In riskiest x%      Cumulative lift = Gains ÷ x%
Swap in = Challenger ✓, Champion ✗      Swap out = Champion ✓, Challenger ✗

Every model is measured on the same applications, those with every score and a known outcome, so the tests are paired. DeLong’s test reads how much each model’s AUC could move by chance and how much two models move together. With three or more models, p-values are adjusted by Holm’s method, and a chi-square test checks whether all the AUCs are equal. A difference that is not beyond chance on a few hundred bads may still be real, and more bads would show it.

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.