A model assigns one person a 70% risk score. Whether that person later has the event or not cannot, by itself, show whether the score is accurate. Probability calibration looks at a group of similar predictions: among people reported at about 70% risk, do events actually occur for about seven in ten? Only by placing predicted probabilities next to event rates can you judge whether the numbers a model gives can support a later decision.

A rhinoceros researcher sets a probability scale beside grouped colored tokens and compares the prediction with the observed rate

The figure compares a predicted probability with the event rate in a group of samples. Original Scholay drawing, generated with AI assistance.

What a 70% prediction says about a group

Suppose a model gives ten people a predicted value of 0.70, and six of them have the event. The group's mean predicted probability is 70%, and the observed event rate is 6÷10 = 60%. The ten-point gap in this sample suggests that this group of predictions is high. Ten people's outcomes still vary a lot by chance, so this does not show that the model overestimates by a fixed ten points in every population.

The comparison of rates has a condition: the event definition and the prediction horizon must be the same. A prediction of "readmission within one year" cannot be mixed with outcomes followed for only three months. The evaluation data should also come from a sample the model was not fitted on. Otherwise the model's ability to remember the training material gets mixed into the judgment of probability quality.

How a calibration curve is drawn

Usually the predicted values are grouped first. For each group, compute the mean predicted probability and the observed event rate, then plot the two as a point. Put the prediction on the horizontal axis and the observation on the vertical axis. A point near the diagonal means the two are close for that group. A point below the diagonal means the predicted event probability for that group is higher than the observed rate. The scikit-learn calibration guide[1] calls this kind of plot a reliability diagram.

To make the calculation visible, the example below builds four groups, forty binary outcomes in all. Each group has ten people and the same prediction within the group. An event is recorded as 1, and no event as 0.

Predicted probability per person People in the group People with the event Observed event rate
20% 10 1 10%
50% 10 4 40%
70% 10 6 60%
90% 10 8 80%

The four constructed prediction points all lie below the calibration diagonal; each group has ten people and the observed rate is ten points below the prediction

Figure 1. Calibration plot of the constructed sample. Each point is the group of ten people in the table; the dashed line means the predicted probability equals the observed rate. The figure is calculated group by group from forty binary outcomes.

All four points sit ten percentage points below the diagonal. That is a feature built into this example, so the direction of the plot is easy to read. In real use, different group boundaries can draw different shapes: equal-width bins can leave some probability intervals with very few samples, while equal-count bins put probability ranges of different widths together. The plot should therefore state both the grouping method and the sample size. Whether the connecting line looks smooth is not enough to judge the model.

Good calibration is not the same as telling risks apart

Nineteen people in this example have the event, so the overall rate is 19÷40 = 47.5%. If another model reports 47.5% for everyone, its overall prediction matches the observation exactly, but it does not say whose risk is higher.

Discrimination looks at ranking. Calibration looks at the probability scale. One model can rank higher-risk people first and still report every probability too high. Another can be accurate for the population as a whole and still give everyone the same score. An evaluation should present the two separately. A calibration plot cannot stand in for a ranking assessment.

The Brier score commonly used for binary predictions is the mean of the squared difference between each predicted probability p and the outcome y: Brier = Σ(p−y)²÷n. Take the group predicted at 70%. Six events contribute 6×(0.7−1)², and four non-events contribute 4×(0.7−0)², for a total of 2.5. Divided by ten, that group's score is 0.25. This score is affected at once by calibration, by discrimination, and by the uncertainty of the outcome itself. It should not be named "calibration error" directly.

A calibrated model also needs a separate evaluation

Once a systematic bias in the probability scale is found, independent data can be used to learn a mapping from the old score to a new probability. Training and evaluation still have to be kept apart: the data used to fit that mapping cannot also serve as the final proof that it works. When data are limited, the calibrator can be trained inside a suitable cross-validation structure, with a separate evaluation left aside. A time series should also keep the real order of time.

After a model moves from one institution to another, the event rate, the enrolled population, and the way records are kept may all change. A probability scale that worked well on the old population needs to be checked again in the new setting. A calibration curve is therefore more like a check of the scale for the present use: first fix what is being predicted and over what horizon, then look at the group sample sizes and the probability gaps, and only then decide whether to calibrate and how.

References

  1. scikit-learn developers. Probability calibration. scikit-learn documentation, accessed 4 November 2026. Concepts, calibration plots, and calibrators.

  2. scikit-learn developers. calibration_curve. scikit-learn documentation, accessed 4 November 2026. Grouping methods and output definitions.

  3. Research Methods · A rite can be imitated; understanding cannot be faked

  4. Compiled and published by the Scholay one-stop academic platform. If this content infringes your rights, please let us know and we will take it down.

  5. Also published on Ente Academic, a community for scholars in the age of intelligence