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.
| Formulation | Condition | Typical use |
|---|---|---|
| Strict calibration within groups | P(Y = 1 | S = s, G = g) = s for all s, g | Risk scores read as probabilities |
| Sufficiency | Y independent of G given S | Scores that need equal meaning, not exact probabilities |
| Predictive parity | Equal positive predictive value at one threshold | Binary decisions after thresholding |
| Multicalibration | Calibration on many overlapping subgroups | Intersectional and fine-grained groups |
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.
| Measure | What it captures | Caveat |
|---|---|---|
| Expected calibration error (ECE) | Weighted average gap per bin | Sensitive to the number of bins |
| Maximum calibration error | Worst gap in any bin | Noisy for small groups |
| Brier score by group | Calibration plus discrimination | Mixes two properties |
| Hosmer-Lemeshow test | Statistical fit of observed rates | Low power on small samples |
| Calibration slope and intercept | Systematic over- or underconfidence | Assumes a roughly linear miscalibration |
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.
| Criterion | Conditions on | Compatible with calibration |
|---|---|---|
| Demographic parity | Decision only | Generally no, when base rates differ |
| Equalized odds | Decision given true label | No, except in degenerate cases |
| Equal opportunity | Decision given positive label | Only approximately, with randomization |
| Predictive parity | True label given decision | Yes, it is a thresholded relative |
| Individual fairness | Similar individuals, similar scores | Independent, can hold together |
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.
| Mistake | Consequence | Better practice |
|---|---|---|
| Checking only overall calibration | Group miscalibration stays hidden | Plot one reliability curve per group |
| Treating labels as ground truth | Biased labels look calibrated | Audit how outcomes were recorded |
| Ignoring small-sample noise | False alarms or missed problems | Report confidence intervals |
| Equating calibration with fairness | Unequal error burdens are accepted | Examine error rates and harms too |
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.