Fairness metrics, precisely
Lesson 2 of 6 in Testing and Evaluation: Fairness Math, Red-Teaming, and Explainability.
You met the fairness-definition conflict conceptually in the ethics module. This lesson is the technical home: the exact definitions, the arithmetic of the impossibility result, and how to defend a metric choice in writing.
Everything starts from the confusion matrix, computed separately for each group. For a binary decision (approve/deny, flag/clear) against a binary truth, four cells: true positives, false positives, false negatives, true negatives. Three rates carry the whole debate:
- TPR (true-positive rate, sensitivity) — of the people who truly are positive, what share did the model catch?
- FPR (false-positive rate) — of the people who truly are negative, what share did the model wrongly flag?
- PPV (positive predictive value, precision) — of the people the model flagged, what share truly are positive?
Every group-fairness metric is a demand that one or more of these quantities be equal across groups. Once you see that, the metric zoo collapses into a short list.
| Metric | What must be equal across groups | The question it answers | When it fits |
|---|---|---|---|
Selection rate: P(decision = positive) — a.k.a. statistical parity | Do both groups receive the favourable outcome at the same rate, regardless of qualification? | Access-allocation contexts (ads shown, outreach) and where the label itself is untrustworthy; the basis of the US four-fifths rule | |
True-positive rate only (TPR parity) | Among the genuinely qualified/deserving, are both groups caught (approved, hired, treated) equally often? | Assistive decisions where missing a deserving person is the harm that matters: loans to creditworthy applicants, medical screening | |
Both error rates: TPR and FPR parity | Are both kinds of mistake distributed equally across groups? | Punitive decisions where a false positive brands someone (fraud flags, recidivism scores) — ProPublica’s implicit standard for COMPAS | |
PPV parity / score calibration within groups — the meaning of a score or flag | Does “risk score 7” or “flagged” imply the same actual probability regardless of group? | Wherever downstream humans act on scores — a judge must be able to read a score identically for everyone; Northpointe’s defence of COMPAS | |
Counterfactual / individual fairness | Individual-level invariance: the decision for this person if only the protected attribute (and its causal descendants) changed | Would you have been treated differently as a member of another group? | Legal reasoning about disparate treatment; hard to compute (needs a causal model), powerful as a design review question |
Now the arithmetic that makes metric choice unavoidable. ProPublica’s 2016 COMPAS analysis found Black defendants who did not reoffend were flagged high-risk at roughly 45% versus 23% for white defendants — an equalized-odds violation. Northpointe replied that at each risk score, the probability of reoffending was about the same for both groups — calibration satisfied. Both computations were correct, on the same data.
Chouldechova (2017) and Kleinberg, Mullainathan & Raghavan (2016) proved this is not a data-quality accident. If two groups have different base rates of the outcome, no imperfect classifier can simultaneously satisfy calibration and equal false-positive and false-negative rates. Sketch of why: PPV mechanically ties error rates to the base rate — with the recidivism base rate around 51% for Black defendants and 39% for white defendants in the COMPAS data, holding PPV equal across groups forces the error rates apart, and vice versa. The only escapes are a perfect predictor or identical base rates. Neither describes any real deployment.
Key terms: confusion matrix, demographic parity, equalized odds, equal opportunity, predictive parity, base rate
Tool: Fairness Lab — Drag decision thresholds for two groups with different base rates and watch the metric dials fight each other — the impossibility theorem, hands-on.
Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.