Credit Risk KS Statistic & Score Band Analyzer
Measure how well a credit score separates good from bad. Get the KS statistic, the full score-band table with bad rate and lift, the cut-off of maximum separation, and AUC and Gini — from a CSV of scores and a binary target, or from counts you have already binned.
One score per row. Any monotonic scale works.
1 = bad (event), 0 = good (non-event).
More bands bring the KS closer to the exact value.
How the KS statistic is calculated
KS turns two overlapping score distributions into one number: how far apart the model manages to push goods and bads.
Reported on a 0–100 scale. AUC is the area under the ROC curve the bands trace, and Gini is 2 × AUC − 1. All three come from the same band table on this page.
| KS | Reading |
|---|---|
| < 20 | Weak separation |
| 20 – 60 | Acceptable — where most scorecards sit |
| 60 – 75 | Strong |
| > 75 | Suspiciously high — check for leakage |
These bands are conventions, not statistical tests. What counts as good depends on the portfolio, and a stable KS over time matters as much as a high one.
A clean scorecard shows the bad rate falling smoothly from the lowest score band to the highest, with lift above 1 in the risky bands and below 1 in the safe ones. That monotonic pattern is the sign the score is rank ordering.
The KS column peaks in the middle of the range and returns to zero at the ends, because the cumulative curves must both start at 0 and finish at 100%. The peak band is where a single approve or decline cut-off separates goods from bads best.
Because KS here is read at the band boundaries, deciles give a slightly conservative figure. Use more bands when you need the reported value to track the exact empirical KS closely.
Take the validation back to your notebook
A single KS is a spot check. Validating a scorecard means recomputing KS, AUC, and the band table on every refresh and every out-of-time sample, on data that never leaves your environment. Copy the Python above into your own notebook, or let an agent with a live Jupyter kernel keep the validation run reproducible.
Related risk tools
Measure how strongly each feature separates good from bad before it enters the score.
Once the score is live, track whether its distribution drifts from the baseline.
Browser-side calculators for risk modeling, data work, and notebook workflows.
FAQ
Common questions about the KS statistic, score bands, and how they relate to AUC and Gini.