Equality of Odds
A model can be accurate overall and still be wrong in a pattern that tracks who you are. This essay defines what it means for two groups to be treated even-handedly, measures it, and shows the three places you can intervene.
Accurate Isn't The Same As Even
Suppose a model screens loan applications and clears 82% of them correctly overall. That single number can hide a great deal. Split the applicants by a protected attribute — say, two demographic groups — and the errors may not be spread evenly at all.
Group A might have most of its genuine defaulters caught, while Group B's slip through more often. Group B might simultaneously have more good applicants wrongly rejected. The overall accuracy is unchanged; the experience of the model is completely different depending on which group you are in.
What exactly should be equal between the groups? Two candidate answers look obviously right and turn out to conflict. Picking between them is a decision you have to make on purpose.
The two error rates that matter are the ones Topic 03 taught us to name: the true positive rate (recall) and the false positive rate.
Same accuracy class · very different error profile
What “Equalized Odds” Actually Requires
A predictor satisfies equalized odds with respect to a sensitive attribute and true outcome when the prediction and the attribute are independent conditional on the true label:
for both and .
Reading it in the two cases spells out the practical requirement. When the condition says the two groups must have the same true positive rate. When it says they must have the same false positive rate. Both, not either.
Because and are the two axes of the ROC curve, this has a tidy geometric reading: each group's operating point must sit at the same coordinates in ROC space.
Equal opportunity drops the half: only the true positive rates must match. It permits unequal false positive rates, which is sometimes exactly what you want — and sometimes exactly the harm you were trying to prevent.
- • Demographic parity — equal flag rates regardless of the true outcome. It ignores the labels entirely, so a model can satisfy it and still be useless.
- • Equal accuracy per group — a group can match on both rates and still differ in calibration.
Take The Parity Dial
Group A is the reference. Drag the dial to move Group B from its original operating point toward Group A's — watching the true positive rate and the false positive rate close their gaps together. Parity is the point where both gaps reach zero at once.
What You Are Looking For
On a real audit you would plot exactly this: paired bars per rate, one pair per group. The pulse marks the distance you are trying to eliminate.
Both pairs must close. A model that matches on the true positive rate but not the false positive rate satisfies equal opportunity while still imposing a systematic cost on one group — more of its innocent members get flagged.
Lending makes the asymmetry concrete. A missed defaulter is a loss to the lender. A wrongly rejected applicant is a loss to the applicant. Those two costs are borne by different people, which is precisely why “just maximise accuracy” is not a neutral choice.
Equalized odds requires every pair to be level
Pre-, In-, and Post-Processing
Every fairness intervention sits at one of three stages. Where you sit determines what you have to change, and what you must trust.
Change the data before training: repair the labels, reweight the rows, or project the features so the sensitive attribute is harder to recover from them.
Pro: model-agnostic — works with any learner.
Con: you must touch the training data, and the repair itself can destroy real signal.
Change the objective: add the parity constraint to the loss, or train adversarially so a second network cannot recover the attribute from the predictions.
Pro: the constraint and the accuracy tradeoff are optimised together.
Con: you need access to the training loop and the sensitive labels at training time.
Leave the model alone and adjust the decisions: give each group its own threshold, chosen so both error rates match.
Pro: works on a frozen black-box model you cannot retrain, and needs only a validation set.
Con: per-group thresholds are legally and politically fraught in many domains.
Parity is not free. Forcing the rates to match generally costs accuracy, because the unconstrained optimum is, by definition, the most accurate point. There is also a known impossibility result: except in degenerate cases you cannot simultaneously have equalized odds and calibration within groups when the groups have different base rates. Someone has to decide which guarantee matters more for this application — that decision is not a modelling choice, it is a policy one.
An Audit You Can Actually Run
Fairness is not a metric you compute once at the end. It is a slicing exercise you run alongside the evaluation you already do: take your held-out set — see Topic 12 — and compute every metric you care about per group, not just overall.
The absolute numbers matter less than the gaps. A model with a 3-point TPR gap and a 2-point FPR gap is in a very different place from one with a 25-point gap, even when their headline accuracies are identical.
And remember that the sensitive attribute you have labels for is rarely the only axis that matters. The same slicing should be run across every dimension on which your model could plausibly be uneven — which means the honest answer to “is this model fair?” is usually “fair with respect to these attributes, on this data, by these measures”.
- • Define the sensitive attributes before modelling.
- • Report TPR and FPR per group, never only overall.
- • Decide which parity notion is required, and say why.
- • Measure the accuracy you paid to get it — parity is never free.
- • Re-run the audit whenever the data or the model changes; fairness does not survive a retrain untouched.
Adapted from MLU-Explain (Amazon, CC BY-SA 4.0).
