A model in production slowly goes stale because the input data moves, not because the model changed. The Population Stability Index is the standard way to put a number on how far it has moved.
Bucket the feature both ways — how it looked when you trained, and how it looks now — then compare the two sets of bucket shares:
where and are the fractions of the data in bucket i, expected and actual.
Task: write psi(expected_counts, actual_counts) returning the index, rounded to 4 decimal places.
0.0.The industry rule of thumb: below 0.1 is stable, 0.1 to 0.25 warrants a look, and above 0.25 means the population has genuinely shifted and the model probably needs retraining. Those thresholds come from credit scoring and are repeated everywhere, so they're worth recognising even though nothing derives them.