Every fairness metric is a claim about which errors matter. Before you compute anything, you need to answer one question: for the people this model affects, is the harm in being wrongly denied something good, wrongly flagged for something bad, or simply being treated by a different standard? The metric follows from the answer, and the answer is a product decision, not a statistics decision [1].
This page covers the group-fairness metrics you will actually compute, in the vocabulary Fairlearn and AIF360 use, so the next two chapters can stay hands-on.
The setup
Group fairness metrics compare a model's behavior across slices of a protected or sensitive attribute: sex, race, age band, disability status, or any axis your product or regulator cares about. Notation for this page: A is the sensitive attribute, Y is the true label, Yhat is the prediction, and "selection" means Yhat = 1 (approved, shown, hired, flagged).
Nothing here requires the model to see A. Most production models must not use the attribute directly, and the metrics still apply: you join the attribute back on at evaluation time. Removing the attribute from the features does not remove the disparity from the predictions; proxies carry it through.
The five metrics that cover most audits
| Metric | Parity claim | Use when the harm is | Blind spot |
|---|
| Demographic parity | Selection rate equal across groups | Unequal access to an opportunity (ads, outreach, screening-in) | Ignores the true label; can force selecting unqualified members |
| Equal opportunity | TPR equal across groups | Qualified people being missed (loans, hiring, scholarships) | Says nothing about false positives |
| Equalized odds | TPR and FPR equal across groups | Both miss and false-alarm harms matter (fraud, moderation) | Hard to satisfy; usually needs explicit mitigation |
| Predictive parity | Precision (PPV) equal across groups | A positive flag triggers a costly process (audits, investigations) | Compatible with very different miss rates |
| Calibration within groups | Score s means P(Y=1) = s in every group | Scores are consumed by humans or downstream systems | Compatible with unequal error rates |
Demographic parity is the bluntest and the easiest to game; it is also the one closest to the "four-fifths rule" used in US employment law, where a selection rate for any group below 80% of the highest group's rate triggers scrutiny. Treat the 0.8 ratio as a tripwire for review, not a definition of fair.
Equal opportunity and equalized odds come from Hardt et al., and they are the default frame for allocative decisions with ground truth: of the people who genuinely qualified, did each group get selected at the same rate [2]?
The impossibility results, in one paragraph
You cannot have it all. When base rates differ across groups, no classifier short of a perfect predictor can simultaneously satisfy calibration within groups and equal error rates across groups; this is a theorem, not an engineering gap [3]. The COMPAS recidivism debate was exactly this collision: the score was roughly calibrated per group while false positive rates differed sharply, and both sides of the argument were correct about their own metric. The practical consequence: pick the one or two metrics that match your harm model, write down why, and accept the others as unconstrained. A team that claims all five metrics at once has measured none of them carefully.
Figure: The impossibility result for fairness metrics: when base rates differ across groups, no imperfect classifier can satisfy calibration within groups and equal error rates (TPR and FPR) at the same time. This is the COMPAS collision, where the score was roughly calibrated per group while false positive rates differed sharply, and each side of the debate was right about its own metric.
Choosing by harm type
flowchart TD
START{"What does a positive prediction do?"} -->|grants access to something good| OPP["Assistive decision"]
START -->|triggers scrutiny or punishment| PUN["Punitive decision"]
OPP --> OPPQ{"Ground truth labels reliable?"}
OPPQ -->|yes| EO["Equal opportunity: compare TPR per group"]
OPPQ -->|no| DP["Demographic parity: compare selection rates"]
PUN --> FPR["Compare FPR per group, then predictive parity"]
EO --> CAL["If humans read the score: add calibration within groups"]
FPR --> CAL
Two refinements the flowchart cannot carry. First, individual fairness (similar individuals treated similarly) is the intuition behind counterfactual probes: flip only the sensitive attribute in an input and check whether the output changes. It complements group metrics; it does not replace them. Second, intersectionality: a model can pass on sex and pass on race while failing badly on their intersection. Fairlearn's MetricFrame takes a multi-column sensitive feature for exactly this reason [4].
Uncertainty is not optional
Fairness metrics live on slices, and slices are small. A TPR gap of 6 points computed on 40 positives in the minority group is noise dressed as a finding. The discipline from the statistics chapters transfers unchanged: report a Wilson interval per group, report the gap with its own interval, and refuse to conclude from slices where the interval spans the decision threshold. When a group is too small to measure, say so in the report; do not silently fold it into "other".
TIP
Disaggregation is the audit. The single most common fairness-report failure is averaging over the slices the metric exists to expose. Every number in your report should exist once per group, with an N next to it, before any aggregate appears.
What goes in the report
The artifact that survives review has five columns: group, N, base rate, the metric per group, and the gap versus the reference group with an interval. One table per metric you committed to, one row per group, intersections included where N supports them. The next chapter builds exactly this table with MetricFrame, and the Fairlearn audit recipe turns it into runnable code.