CalcWorldHub
Free online calculator · no signup

Expected calibration error equal width bins calculator

Compare positive-class probabilities with observed event frequencies in equal-width bins.

4,000 tools
Expected calibration error equal width bins calculator — Predicted positive probabilities, True binary outcomes, Equal-width bins and calculation method
Expected calibration error equal width bins calculator: inputs and calculation method.

How to use this calculator

Compare positive-class probabilities with observed event frequencies in equal-width bins.

  1. Enter Predicted positive probabilities, True binary outcomes, Equal-width bins. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Expected calibration error equal width bins explained

Measure the sample-weighted gap between mean predicted probability and observed binary frequency in equal-width bins.

Equal-width expected calibration error0.2
Equal-width expected calibration error: 0.2 in the worked scenario.

How the calculation works

Σ bin frequency × |mean probability − observed rate|

Each bin contributes its share of the sample multiplied by the absolute difference between mean probability and observed outcome rate. This is binary positive-probability ECE, not top-label multiclass ECE.

Set up the calculation

p — Predicted positive probabilities
One model probability per case, each from 0 to 1, in the same order as the outcomes.
y — True binary outcomes
Observed labels for those cases: 1 for positive and 0 for negative, paired position by position.
k — Equal-width bins
Number of probability intervals spanning 0 to 1; the final bin includes probability 1.

Limits of this model

This is binary positive-probability ECE, not top-label multiclass ECE. Results depend strongly on binning and sample size.

Check this example

Predicted positive probabilities = 0.1, 0.3, 0.7, 0.9; True binary outcomes = 0, 0, 1, 1; Equal-width bins = 2.

  • Equal-width expected calibration error: 0.2

Each bin has a 0.2 calibration gap and half the samples, so this equal-width binary ECE is 0.2. ECE depends on the chosen binning.

Interpreting the result

An ECE of 0.2 is a sample-weighted average gap of 0.2 probability points on this example’s 0–1 scale; it depends on the chosen bin boundaries and does not certify calibration for every subgroup.

Frequently asked questions

Do bins contain equal numbers of items?

No, they cover equal probability widths.

Where does probability one go?

Into the final bin.

Does low ECE prove calibration?

No, binning can conceal local errors.

How do I use the Expected calibration error equal width bins calculator?

Enter Predicted positive probabilities, True binary outcomes, Equal-width bins. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Expected calibration error equal width bins?

Predicted positive probabilities = 0.1, 0.3, 0.7, 0.9; True binary outcomes = 0, 0, 1, 1; Equal-width bins = 2. Equal-width expected calibration error: 0.2 Each bin has a 0.2 calibration gap and half the samples, so this equal-width binary ECE is 0.2. ECE depends on the chosen binning.