Calibration within groups

Also known as: group calibration

On this page 7

Calibration within groups is a fairness criterion in AI ethics which requires that a predicted risk score carries the same empirical meaning for every group defined by a protected attribute: among all people who receive a score of 0.7, about 70 percent should experience the outcome, whether they are women or men, younger or older applicants, or members of any other group. Also called group calibration, it treats a score as a promise about frequencies and asks whether that promise is kept equally for everyone.

The criterion matters because decision makers usually act on scores, not on labels. If a score of 0.3 means a 20 percent default rate for one group and a 40 percent rate for another, a single threshold silently treats the two groups differently. Calibration within groups is central to the impossibility results of algorithmic fairness, which show that it cannot coexist with equalized error rates when base rates differ.

How calibration within groups is defined

Formally, a score S is calibrated within groups if, for every group g and every score value s, the probability that the outcome Y equals 1 given S = s and G = g equals s. A weaker version, sometimes called sufficiency or predictive parity at the score level, only requires that the outcome rate given the score is identical across groups, even if it differs from s itself.

In practice, scores are continuous and samples are finite, so analysts bin the scores into intervals such as deciles and compare the mean predicted score with the observed outcome rate in each bin, separately for each group. The table below summarizes the main formulations used in the fairness literature.

FormulationConditionTypical use
Strict calibration within groupsP(Y = 1 | S = s, G = g) = s for all s, gRisk scores read as probabilities
SufficiencyY independent of G given SScores that need equal meaning, not exact probabilities
Predictive parityEqual positive predictive value at one thresholdBinary decisions after thresholding
MulticalibrationCalibration on many overlapping subgroupsIntersectional and fine-grained groups
Formulations of group calibration

Measuring calibration for each group

The standard diagnostic is a reliability diagram per group: predicted probability on the horizontal axis, observed frequency on the vertical axis, one curve for each group. A well calibrated model follows the diagonal line for every group; systematic curves above or below the diagonal reveal under- or overestimation of risk.

Numerical summaries make comparisons and monitoring easier. The expected calibration error weights each bin by its size, so small groups with few examples in extreme bins need confidence intervals or bootstrapping before any conclusion is drawn.

MeasureWhat it capturesCaveat
Expected calibration error (ECE)Weighted average gap per binSensitive to the number of bins
Maximum calibration errorWorst gap in any binNoisy for small groups
Brier score by groupCalibration plus discriminationMixes two properties
Hosmer-Lemeshow testStatistical fit of observed ratesLow power on small samples
Calibration slope and interceptSystematic over- or underconfidenceAssumes a roughly linear miscalibration
Common calibration measures

Why it conflicts with other fairness metrics

The best known result, published by Kleinberg, Mullainathan and Raghavan in 2016, states that calibration within groups, balance for the positive class and balance for the negative class cannot hold simultaneously unless the model predicts perfectly or the groups have equal base rates. Chouldechova reached a closely related conclusion for binary classifiers, showing that predictive parity and equal false positive and false negative rates are incompatible under unequal prevalence.

The intuition is arithmetic: if one group has a higher true outcome rate, a calibrated score must assign it higher scores on average, and any shared threshold then produces different error rates. Pleiss and colleagues showed that calibration is compatible with at most one relaxed error-rate constraint, typically achieved by randomizing some predictions, which many practitioners find hard to justify.

The comparison below places group calibration next to its closest neighbors in the fairness toolkit.

CriterionConditions onCompatible with calibration
Demographic parityDecision onlyGenerally no, when base rates differ
Equalized oddsDecision given true labelNo, except in degenerate cases
Equal opportunityDecision given positive labelOnly approximately, with randomization
Predictive parityTrue label given decisionYes, it is a thresholded relative
Individual fairnessSimilar individuals, similar scoresIndependent, can hold together
Group calibration compared with related criteria

Achieving calibration in practice

Most well specified probabilistic models trained on representative data are approximately calibrated overall, but overall calibration does not guarantee calibration for each group. Group-specific recalibration fits a separate mapping from raw score to probability for each group, using Platt scaling, isotonic regression or temperature scaling on a held-out set.

Group-specific recalibration requires access to the protected attribute at prediction time, which some laws or policies restrict. An alternative is multicalibration, an algorithmic framework that iteratively corrects the score on many computationally identifiable subgroups without hand-picking them, which also improves intersectional coverage.

  • Collect enough labeled outcomes per group to estimate rates in every bin.
  • Check calibration on a held-out set drawn after deployment, because drift changes base rates.
  • Report calibration alongside error-rate metrics so trade-offs remain visible.

Limitations and common misconceptions

Calibration within groups is a necessary but weak guarantee. A score that assigns every member of a group that group’s average rate is perfectly calibrated yet useless for distinguishing individuals, so calibration must always be read together with discrimination measures such as AUC per group.

MistakeConsequenceBetter practice
Checking only overall calibrationGroup miscalibration stays hiddenPlot one reliability curve per group
Treating labels as ground truthBiased labels look calibratedAudit how outcomes were recorded
Ignoring small-sample noiseFalse alarms or missed problemsReport confidence intervals
Equating calibration with fairnessUnequal error burdens are acceptedExamine error rates and harms too
Frequent errors when assessing group calibration

The deepest limitation is label bias. If historical arrests, diagnoses or loan defaults were recorded unevenly, a score can be perfectly calibrated to a distorted target, and calibration then reproduces historical bias rather than correcting it.

In simple terms

A risk score is like a weather forecast. If the forecast says 70 percent chance of rain, it should rain on about seven of ten such days. Calibration within groups asks for the same honesty for every group of people.

Suppose a score of 7 out of 10 means real trouble for one group but not for another. Then the same number tells two different stories. Calibration fixes that. A given score means the same thing for everyone. It does not, however, make the mistakes fall equally on every group.

A practical example

A regional hospital uses a model to predict 30-day readmission risk and enrolls patients with a score above 0.25 in a follow-up program. An audit team splits a year of discharges by sex and age band and draws one reliability diagram for each group. For patients over 75, a predicted 0.20 corresponds to an observed readmission rate of 0.31, so many older patients just below the cutoff are being missed.

The team fits isotonic regression separately for each age band on a held-out quarter of data and confirms that expected calibration error drops below 0.02 in every band. The follow-up program now enrolls about 12 percent more older patients, and the audit report explicitly notes that false negative rates still differ between age bands because their underlying readmission rates differ.