AI Glossary / Statistics and probability / Intermediate

Probability calibration

Definition

Probability calibration concerns whether predicted probabilities agree with observed event frequencies in an appropriate population. For a calibrated binary predictor, among cases assigned a probability near 0.7, the event should occur about 70% of the time over sufficiently many comparable cases. Calibration evaluates the meaning of the probability numbers, rather than only which cases are ranked highest or assigned the correct class. It can be assessed and, where justified, improved using a separate calibration procedure.

What it means

A model can rank cases well while being systematically overconfident. For example, its highest-risk cases may truly be the riskiest, but predicted probabilities of 0.9 may correspond to observed frequencies nearer 0.7. Conversely, a constant prediction equal to the population event rate can be calibrated in aggregate while offering no useful ranking. Calibration and discrimination therefore answer different questions. Calibration also depends on the population, time period, class definition and information available when predictions are made.

How it works

Generate predictions on observations that were not used to fit the original model. Compare predicted probabilities with event frequencies, often using a reliability diagram that groups similar predictions. Fit a calibration mapping, such as sigmoid or isotonic calibration, using appropriately separated data or a suitable cross-validation design. Evaluate the resulting system on independent data. Inspect sample sizes and uncertainty in each region. Monitor for changes in prevalence or case composition, since a mapping that worked previously can become unreliable.

Three practical examples

Example 1: A returns model needs reliable probabilities to compare inspection costs with expected losses. Example 2: A customer-support system uses probabilities to decide which cases need human review. Example 3: A forecasting team checks whether events assigned 20% probability occur at about that rate over comparable predictions. In each application, a good accuracy score alone is insufficient to establish reliable probabilities, and a calibration plot with very few observations can be misleading.

Think of it this way

Think of calibration as checking the markings on a measuring instrument. An instrument may correctly rank warmer and cooler rooms while its displayed temperatures are systematically wrong. Adjusting the markings can improve their meaning without making the instrument better at separating rooms. Similarly, recalibrating a model can improve its probability scale without necessarily adding new information about which individual cases will experience the event.

Worked example

Suppose an independent evaluation set contains 100 cases all assigned probability 0.80, with 60 positive outcomes and 40 negative outcomes. The observed event rate is 0.60, showing overprediction in this group. Its binary Brier score is [60 × (1 - 0.80) squared + 40 × 0.80 squared]/100 = 0.28. If a mapping learned on separate calibration data assigns these cases probability 0.60, the score on this evaluation set becomes [60 × 0.40 squared + 40 × 0.60 squared]/100 = 0.24. The improvement is 0.04. These cases still all tie, so their ranking has not improved. Choosing 0.60 after inspecting this same evaluation set would instead be an optimistically fitted demonstration, not independent validation.

Illustrative case study

Fictional case study: Brook Retail uses a return-probability model for review prioritization. Analysts find that the model ranks cases reasonably but overstates probabilities in a common score range. They reserve separate data to fit a calibration mapping and test the complete pipeline on a later period. They also inspect new-customer cases because aggregate reliability could hide subgroup differences. The example is fictional and reports no measured commercial gain; its purpose is to show why fitting and evaluating calibration should be separated.

Common misconceptions and mistakes

Common mistakes include equating softmax outputs with calibrated probabilities, using training predictions to fit a calibrator without suitable precautions, and judging calibration from one bin or a handful of examples. The Brier score and log loss assess overall probabilistic prediction quality, not calibration alone. Bin choices can change a reliability diagram's appearance. A monotonic recalibration often preserves ranking, but isotonic mappings can introduce ties. Good overall calibration does not guarantee calibration in every subgroup or future environment.

Business use

Business use: Calibration matters when probabilities feed expected-cost calculations, thresholds, resource allocation or customer-facing risk statements. Define the population and outcomes before evaluating reliability. Report discrimination and calibration separately, and compare useful probability scores with baselines. Keep calibration fitting within the training process so that final evaluation remains independent. Revisit the mapping after material data changes and avoid describing an individual prediction as certain merely because the model is well calibrated overall.

People also ask

Does calibration improve classification accuracy automatically?

No; its purpose is probability reliability, and accuracy also depends on the chosen decision threshold. Q: Is isotonic calibration always preferable? A: No; its flexibility and data requirements must be considered. Q: Can a calibrated model be uninformative? A: Yes. Predicting the same correct base rate for everyone can be calibrated while failing to distinguish individual cases.

Check your understanding

In the worked example, did changing 0.80 to 0.60 improve ranking?

Answer: No; every case still receives the same score.

Why should the mapping be learned on separate data?

Answer: Otherwise evaluation partly measures a correction chosen using the very outcomes on which it is being judged, producing an overly favorable impression.

Related terms

  • Reliability diagrams compare predicted probabilities with observed frequencies

Learn next

Plot a reliability diagram with counts for each probability range and compare it with a discrimination metric. Fit a simple calibration mapping using a proper data split, then inspect both on an untouched evaluation set. Repeat the analysis by time period or meaningful subgroup. Investigate sparse regions before claiming that apparent deviations represent stable calibration errors.

More in Statistics and probability

  • Poisson distribution - The Poisson distribution is a probability distribution for a count taking the values 0, 1, 2 and so on.
  • Policy capturing - Policy capturing is a research method for describing how people combine information when making judgments or decisions.
  • Poly-Weibull distribution - The poly-Weibull distribution is a continuous time-to-event distribution constructed by adding several Weibull-type hazard functions.
  • Pólya urn model - A Pólya urn model is a probability model in which sampling changes the probabilities of future samples through a specified reinforcement rule.
  • Polynomial regression - Polynomial regression models an outcome using powers of one or more numerical predictors.
  • Polynomial trend coefficient - A polynomial trend coefficient is a numerical weight used with other such weights to test a specified trend across ordered group means.

Sources

Sources: Scikit-learn developers, Probability calibration: https://scikit-learn.org/stable/modules/calibration.html ; Vaicenavicius and colleagues, Evaluating model calibration in classification: https://arxiv.org/abs/1902.06977 . These primary software and research sources discuss calibration, evaluation and its limitations. The Brier-score calculation and fictional retail example are original, with independent evaluation explicitly distinguished from fitting.

Previous: Probability box Next: Probability density function

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer