Sunday, August 3, 2025

KS Statistic

 The KS (Kolmogorov-Smirnov) Statistic is a powerful and commonly used evaluation metric for binary classification models, especially in finance, credit scoring, and risk modeling.


๐Ÿ“Š What is KS Statistic?

The KS statistic measures the maximum difference between the cumulative distribution functions (CDFs) of the predicted scores for the positive class (events) and negative class (non-events).

Formula:

KS=maxxF1(x)F0(x)KS = \max_x |F_1(x) - F_0(x)|

Where:

  • F1(x)F_1(x): Cumulative distribution of positive class (e.g., default)

  • F0(x)F_0(x): Cumulative distribution of negative class (e.g., non-default)


๐Ÿง  Intuition:

  • It tells how well the model separates the two classes.

  • A higher KS value means better separation of good and bad cases.

  • KS = 0: no separation (useless model)

  • KS = 1: perfect separation (ideal but unrealistic)


๐Ÿ“Œ Usage by Domain

DomainWhy KS is Used
Banking / Credit RiskIndustry standard for measuring discriminatory power between defaulters and non-defaulters
InsuranceDistinguishing claimants vs non-claimants
Fraud DetectionSeparating fraudulent from legitimate transactions
MarketingUsed less commonly; better suited metrics include precision@k and lift

✅ Typical KS Value Interpretation:

KS ScoreModel Quality
< 0.2Poor
0.2 - 0.3Fair
0.3 - 0.4Good
> 0.4Excellent

No comments:

Post a Comment