Learn / Models
How to validate a credit scorecard: Gini, KS and PSI explained
Validating a scorecard means answering three questions. Does it rank customers correctly? Is the population it sees still the one it was built on? Do its predicted bad rates match what happens? Gini and KS answer the first. PSI answers the second. Calibration answers the third.
One table to work from
Take a development sample of 1,180 customers scored and split into five bands, band 1 being the lowest scores. A customer is bad if they reached the bad definition in the observation window. The counts are made up.
| Band | Goods | Bads | Cumulative goods | Cumulative bads | Gap |
|---|---|---|---|---|---|
| 1 (lowest scores) | 100 | 60 | 10.0% | 33.3% | 23.3% |
| 2 | 200 | 50 | 30.0% | 61.1% | 31.1% |
| 3 | 300 | 40 | 60.0% | 83.3% | 23.3% |
| 4 | 250 | 20 | 85.0% | 94.4% | 9.4% |
| 5 (highest scores) | 150 | 10 | 100.0% | 100.0% | 0.0% |
Cumulative means the share of all goods, or all bads, in this band and every band below it. A good scorecard collects bads in the low bands, so the cumulative bad share climbs faster than the cumulative good share.
What is KS?
KS is the largest gap between the two cumulative shares. In the table it is 31.1%, at band 2: 61.1% of the bads sit in the bottom two bands against 30.0% of the goods.
A higher KS means the score separates goods from bads better. It also shows where: band 2 is where the cut-off does the most work on this sample. There is no universal pass mark. Compare KS with the development value and with your policy.
What is Gini?
Plot cumulative bads against cumulative goods, from the lowest score upwards. The area under that curve is the AUC. Gini = 2 x AUC - 1. A score with no ranking power lies on the diagonal and has a Gini of 0. A perfect score has a Gini of 1.
| AUC | 0.696 |
|---|---|
| Gini | 2 x 0.696 - 1 = 0.39 |
Gini and KS measure the same ability in different ways. A fall in Gini over time is the classic sign that rank-ordering is weakening. Compare it with the development value, on a recent cohort that has had time to show its outcome.
SQL for the table above
One row per band with goods, bads, cumulative shares and the gap. KS is the largest gap. The input is a table of development customers, one row each, with their score band and a bad flag.
WITH b AS (
SELECT band,
SUM(CASE WHEN bad = 0 THEN 1 ELSE 0 END) AS goods,
SUM(CASE WHEN bad = 1 THEN 1 ELSE 0 END) AS bads
FROM scores_dev
GROUP BY band
),
c AS (
SELECT band, goods, bads,
1.0 * SUM(goods) OVER (ORDER BY band) / SUM(goods) OVER () AS cum_good,
1.0 * SUM(bads) OVER (ORDER BY band) / SUM(bads) OVER () AS cum_bad
FROM b
)
SELECT band, goods, bads, cum_good, cum_bad,
ABS(cum_good - cum_bad) AS gap
FROM c
ORDER BY band;We ran this on the table above and the output matches the numbers shown.
What is PSI?
Population stability index compares the share of customers in each score band today with the share at development. The formula is the sum, over bands, of (current share - development share) x ln(current share / development share).
| Development shares | 30%, 40%, 30% |
|---|---|
| Current shares | 20%, 40%, 40% |
| PSI | 0.041 + 0 + 0.029 = about 0.07 |
SELECT SUM((c.share - d.share) * LN(c.share / d.share)) AS psi
FROM (SELECT band, 1.0 * COUNT(*) / SUM(COUNT(*)) OVER () AS share
FROM scores_dev GROUP BY band) d
JOIN (SELECT band, 1.0 * COUNT(*) / SUM(COUNT(*)) OVER () AS share
FROM scores_now GROUP BY band) c
ON c.band = d.band;Common rule of thumb: below 0.10 stable, 0.10 to 0.25 watch, above 0.25 investigate. Treat the bands as starting points and set your own policy. The query reproduces 0.069 on these inputs.
What these three do not tell you
- Calibration. A score can rank well and still predict the wrong bad rate. Compare the predicted bad rate with the actual one in each band.
- Why the population moved. PSI says it moved. CSI on each input variable says which variable.
- Whether the outcome window was long enough. Gini on an immature cohort looks better than it should.
- Whether the decisions follow the score. Look at overrides and at who gets approved.
Mistakes that make the numbers look fine
- Recalculating the band edges on each month's data. Freeze the edges from development, or PSI will look stable when the population has moved.
- Measuring Gini on a cohort that has not had time to go bad.
- Mixing products or channels in one population.
- Flipping the score direction. Higher score should mean lower risk. Check before you compute cumulative shares.
- Reporting Gini without the sample size and the bad definition.
What should you put in the validation note?
- Development Gini and KS, and the same measures on the latest matured cohort.
- PSI by month with the 0.10 and 0.25 lines.
- The top CSI movers.
- Predicted and actual bad rate by band.
- A recommendation: keep, recalibrate or rebuild.
Try it on your own tables
The free tools give you the prompt, the checks and how to present the result. You enter table names only.
See the free toolsFrequently asked questions
What is the difference between Gini and KS?
Both measure how well a score separates goods from bads. KS is the largest gap between the cumulative good and bad shares. Gini is twice the area under the cumulative curve, minus one.
What is a good Gini for a credit scorecard?
There is no universal pass mark. It depends on the product, the data and the population. Compare with the development value and with your policy.
What PSI value is acceptable?
A common rule of thumb reads below 0.10 as stable, 0.10 to 0.25 as worth watching, and above 0.25 as needing investigation.
How often should a scorecard be validated?
Often enough that a drop in ranking power or a shift in population shows up before it affects decisions. Many teams monitor PSI monthly and Gini once cohorts have matured. Set the schedule in your model policy.
Keep reading
Why credit scorecards still use logistic regression, and where ML fits
Why most credit scorecards still use logistic regression: explainability, stability and easy governance. Where ML fits, and how PSI and CSI monitoring works.
PortfolioVintage analysis: how to read a vintage curve
Vintage analysis groups loans by the month they were disbursed and tracks how they perform over time. Learn to build a vintage table and spot weak cohorts early.
BasicsCredit risk analyst interview questions with answers, including SQL
Seventeen credit risk analyst interview questions with short answers: DPD, NPA, SMA, roll rates, vintages, scorecards, ECL and SQL. Each answer links to a full guide.