Equal-frequency binning

Equal-frequency binning divides n numeric values into k bins, each holding about n ÷ k values. Its cut points are quantiles, and it is also called equifrequent binning or equal-depth binning. Quantile binning is another name.

Example

For illustration, sort twenty applicants by monthly income and split them into four bins. Each bin contains five applicants, and the first ranges from $1,000 to $1,800.

Equal-frequency binning, monthly income: 20 incomes from $1,000 to $8,800 in 4 bins, $1,000 to $1,800: 5, $2,000 to $3,100: 5, $3,300 to $4,600: 5, $4,900 to $8,800: 5. Each bin contains five applicants.
In the example, each of four equal-frequency bins contains five applicants, though their monthly-income ranges differ in width.

Calculating equal-frequency bins from the data

For illustration, sort the twenty monthly incomes: $1,000, $1,200, $1,400, $1,600, $1,800, $2,000, $2,200, $2,500, $2,800, $3,100, $3,300, $3,600, $3,800, $4,200, $4,600, $4,900, $5,400, $6,100, $6,800 and $8,800. With four bins, 20 ÷ 4 = 5 values per bin. The cut points fall after the fifth, tenth and fifteenth values.

The ranges are $1,000 to $1,800, $2,000 to $3,100, $3,300 to $4,600 and $4,900 to $8,800. Their widths are $800, $1,100, $1,300 and $3,900, so equal counts do not mean equal ranges.

If the number of values does not divide evenly by the number of bins, some bins contain one more value. Identical values at a cut point stay together, which can also leave bins with unequal counts.

Where equal-frequency bins fit in credit scoring

In scorecard development, fine classing often creates 10 to 20 bins so each has enough goods and bads. Coarse classing then merges neighbouring bins with similar bad rates or weights of evidence. Equal-width bins instead cover the same numeric range. For the same illustrative incomes, four $2,000-wide bins from $1,000 to $9,000 contain 9, 7, 3 and 1 applicants.

For score monitoring, deciles from the development sample create ten bands of 10% each. PSI compares the recent sample’s share in each band with that 10%, using the original cut points rather than recutting the recent data.

Equal-frequency cut points change when the data changes, and they are uneven and rarely round numbers. Repeated values cannot be split across bins, and a wide bin can hide very different values.

Questions we get asked

Can equal-frequency binning be used for categorical variables?

The method is defined for numeric variables with ordered values. Its cut points are quantiles, so it does not divide unordered categories into equal-frequency ranges.

How do outliers affect equal-frequency binning?

An outlier can make the bin containing it much wider than the others. It does not leave bins empty, because the method assigns about the same number of observations to each bin.

How does equal-frequency binning differ from equal-width binning?

Equal-frequency binning balances the number of values across bins, while equal-width binning keeps the range constant. Among the twenty applicants’ incomes, equal-frequency bins have five applicants each; four equal-width bins from $1,000 to $9,000 have 9, 7, 3 and 1.

Decisimo’s information value calculator can bin a raw numeric file into equal-frequency ranges or calculate results from goods and bads counts entered or pasted into bins.

Related topics: