Credit scorecards

Binning, Weight of Evidence, and Information Value

Calculate bin-level evidence while guarding against unstable or empty bins.

Visual summary of Binning, Weight of Evidence, and Information Value: Calculate bin-level evidence while guarding against unstable or empty bins.
A visual overview of Calculate bin-level evidence while guarding against unstable or empty bins. See the guide for assumptions and implementation details.

Purpose

Explain how bins summarize predictor relationships with a binary outcome in a logistic scorecard.

Hover over or focus a term for a quick definition, or open its glossary entry.

  • Binning

Key definitions

  • Weight of Evidence (WOE) compares the share of goods and bads in a bin.
  • Information Value (IV) aggregates bin separation; conventions vary with the chosen good/bad sign.
Formula
WOEᵢ = ln(good_shareᵢ ÷ bad_shareᵢ); IV = Σᵢ(good_shareᵢ − bad_shareᵢ) × WOEᵢ.

Worked example

If a bin contains 30% of goods and 10% of bads, WOE = ln(3) ≈ 1.099 under this convention.

Detailed explanation

Binning creates interpretable groups for continuous or categorical variables. For each bin, count good and bad outcomes, compute each class share, and take the logarithm of the share ratio. This page defines positive WOE as good-heavy; reversing the ratio reverses the sign but not the underlying evidence. A small smoothing adjustment can prevent undefined logarithms when one class has zero observations.

IV sums the difference in class shares multiplied by WOE. Treat it as a development diagnostic, not a universal variable-selection threshold. Check sample size, monotonicity where justified, missing-value bins, stability over time, business meaning, and leakage. Fit bin boundaries on training data only and preserve them for validation and production scoring.

Try a reproducible Python example

These examples use synthetic inputs and run locally in a browser worker. Edit the code, run it, and compare its output with the published example.

Runnable Python · local in your browser

Calculate WOE and IV from grouped counts

Use synthetic good and bad counts for three ordered scorecard bins. The 0.5 adjustment avoids a zero distribution in this small example.

Output

Run the code to see the output.

Runtime loads only after you press Run. Code runs in a separate browser worker with a 10-second limit and a 20,000-character output cap. Use synthetic examples only; browser execution is not a secure environment for secrets or sensitive records.

Assumptions

  • Bins are defined without using future information, and smoothing is disclosed for zero counts.

Limitations

  • IV is a screening statistic, not proof of causality or out-of-time performance.
  • Automated bins can overfit, be unstable, or encode sensitive proxies.

References

Educational material only. Methods and examples are simplified; state and validate the assumptions required for your use case.

Binning, Weight of Evidence, and Information Value | CreditRiskHub