Library · Credit scoring

PSI: the population stability index

The population stability index sums, over score bands, the difference between two shares times the log of their ratio. The usual thresholds of 0.10 and 0.25 are conventions: with small samples or many bands, PSI exceeds them when nothing has changed.

By , published

Definition

Cut the score into bands, usually ten. Let ei be the share of the development sample in band i and ai the share of the recent sample.

PSI = Σi ( ai − ei ) × ln( ai ÷ ei )

PSI is zero when the two distributions are identical and grows with their difference. The common reading, below 0.10 stable, above 0.25 a significant shift, comes from practice. Yurdakul and Naranjo derived the distribution of PSI when nothing has changed: it is close to a chi-square with B − 1 degrees of freedom multiplied by (1/N + 1/M), where B is the number of bands and N, M the two sample sizes.

Worked example

Two samples are drawn from the same distribution, so the true shift is zero. We compute the PSI thousands of times for several sample sizes and numbers of bands, and print its mean and the value exceeded one time in twenty.

import numpy as np

rng = np.random.default_rng(22)

def psi(expected, actual, bands):
    edges = np.quantile(expected, np.linspace(0, 1, bands + 1))[1:-1]
    e = np.bincount(np.searchsorted(edges, expected), minlength=bands) / len(expected)
    a = np.bincount(np.searchsorted(edges, actual), minlength=bands) / len(actual)
    a = np.clip(a, 1e-4, None)
    return np.sum((a - e) * np.log(a / e))

print("no shift at all:   n per sample   bands   mean PSI   95th percentile   theory mean")
for n, bands in [(200, 10), (200, 20), (1000, 10), (1000, 20), (20000, 10)]:
    values = [psi(rng.normal(size=n), rng.normal(size=n), bands) for _ in range(2000)]
    print(f"{n:30d} {bands:7d} {np.mean(values):10.3f} {np.percentile(values, 95):17.3f} {(bands - 1) * 2 / n:13.3f}")

big = psi(rng.normal(size=200_000), rng.normal(0.1, 1, size=200_000), 10)
print(f"real shift of 0.1 standard deviation, 200,000 per sample: PSI = {big:.3f}")

Output, produced by running the code above when this page was built:

no shift at all:   n per sample   bands   mean PSI   95th percentile   theory mean
                           200      10      0.093             0.180         0.090
                           200      20      0.200             0.327         0.190
                          1000      10      0.018             0.035         0.018
                          1000      20      0.039             0.061         0.038
                         20000      10      0.001             0.002         0.001
real shift of 0.1 standard deviation, 200,000 per sample: PSI = 0.010

With 200 clients per sample and 20 bands, identical populations give a PSI above 0.10 on average, and above 0.25 in a fair share of the draws. With large samples the noise vanishes, and a real shift of a tenth of a standard deviation gives a PSI far below 0.10.

Where it misleads

  • A fixed threshold ignores the sample size. On a small monthly sample a PSI of 0.15 can be pure noise; the comparison should be made against the percentile expected under no change.
  • The value depends on the number of bands and on where they are cut. Bands must be defined once on the development sample and kept.
  • A band that is empty in one sample makes the logarithm infinite. Software replaces the zero by a small number, and the PSI then depends on that number.
  • PSI sees a change in who applies. It does not see a change in how clients with a given score behave, see concept drift.

Applied to one input variable instead of the score, the same formula is called the characteristic stability index. Applied to the goods and the bads of one sample, it is the information value.

In our work

In our credit validation report the stability section gives PSI with the bands frozen at development, and shows what it misses: a model can lose its accuracy while the score distribution stays stable.

References

  1. Yurdakul, B., Naranjo, J. (2020). Statistical properties of the population stability index. Journal of Risk Model Validation, 14(4), 89-100. doi:10.21314/JRMV.2020.227
  2. Siddiqi, N. (2005). Credit risk scorecards: developing and implementing intelligent credit scoring. Wiley, Hoboken.
  3. Thomas, L. C., Edelman, D. B., Crook, J. N. (2002). Credit scoring and its applications. SIAM, Philadelphia. doi:10.1137/1.9780898718317

Have a question like this one on your own data? Tell us what you need in a few lines.

Send us the brief

Related pages

  • Concept drift and data driftA model can stop working in two ways. The population it scores changes, which is data drift. Or the relation between inputs and outcome changes, which is concept drift. Monitoring the inputs detects the first and is blind to the second.
  • Weight of evidence and information valueWeight of evidence turns each bin of a variable into a number: the log of the share of good payers over the share of bad payers. Information value sums the bins into one figure for the variable. It is biased upward by the number of bins.
  • The KS statistic of a scorecardThe Kolmogorov-Smirnov statistic of a scorecard is the maximum distance between two curves: the share of defaulters and the share of good payers below each score. It reads as the best separation achievable with one cut-off.
All library pages