AnyLearn
All lessons
AIadvanced

The Fairness Metrics, and Why You Must Choose

Fairness has several formal definitions that sound equally reasonable and cannot all hold at once. This lesson covers demographic parity, equal opportunity, equalized odds and calibration, the impossibility result proved independently by Chouldechova and by Kleinberg and colleagues, and how to choose one deliberately and defend it.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

The confusion matrix, per group

Every fairness metric in this lesson is a statement about a confusion matrix computed separately for each group, so it is worth fixing the vocabulary first.

For a binary decision, four outcomes. True positives: predicted yes and actually yes. False positives: predicted yes, actually no. True negatives and false negatives correspondingly.

From those, the rates that matter.

Selection rate: what proportion of this group received a positive decision. This is about outcomes, regardless of whether they were correct.

True positive rate, also called recall or sensitivity: of those who actually were positive, what proportion did we identify. Its complement is the false negative rate, which is the proportion of qualified people wrongly rejected.

False positive rate: of those who actually were negative, what proportion did we wrongly select.

Positive predictive value, also called precision: of those we selected, what proportion actually were positive.

The fairness definitions are simply choices about which of these should be equal across groups. That framing is what makes the impossibility result later feel inevitable rather than surprising: these quantities are arithmetically linked, so equalising some forces others apart.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. The confusion matrix, per group

Every fairness metric in this lesson is a statement about a confusion matrix computed separately for each group, so it is worth fixing the vocabulary first.

For a binary decision, four outcomes. True positives: predicted yes and actually yes. False positives: predicted yes, actually no. True negatives and false negatives correspondingly.

From those, the rates that matter.

Selection rate: what proportion of this group received a positive decision. This is about outcomes, regardless of whether they were correct.

True positive rate, also called recall or sensitivity: of those who actually were positive, what proportion did we identify. Its complement is the false negative rate, which is the proportion of qualified people wrongly rejected.

False positive rate: of those who actually were negative, what proportion did we wrongly select.

Positive predictive value, also called precision: of those we selected, what proportion actually were positive.

The fairness definitions are simply choices about which of these should be equal across groups. That framing is what makes the impossibility result later feel inevitable rather than surprising: these quantities are arithmetically linked, so equalising some forces others apart.

2. Four definitions

Demographic parity, also called statistical parity: the selection rate is equal across groups. The same proportion of each group is hired, approved or admitted. It says nothing about accuracy, and it is satisfied by a system that selects randomly at equal rates.

Equal opportunity: the true positive rate is equal across groups. Of the people who would have succeeded, the same proportion are identified in each group. This targets the false negative, the qualified person wrongly rejected, and ignores false positives.

Equalized odds: both the true positive rate and the false positive rate are equal across groups. Stricter than equal opportunity, since it also requires that unqualified people are wrongly selected at equal rates.

Calibration, or predictive parity: a given score means the same thing regardless of group. Among everyone scored at 0.8, the same proportion actually are positive in each group. This is what makes a score interpretable, and it is what a decision-maker relying on the score implicitly assumes.

Each of these sounds like a reasonable definition of fair, and each is defensible in some context. They are also mutually incompatible in the general case, which is the subject of the next step, and that incompatibility is not a technical shortcoming to be engineered away.

3. The impossibility result

This is the most important thing in the cursus, and it is a mathematical result rather than an opinion.

Chouldechova in 2017, and Kleinberg, Mullainathan and Raghavan in 2016, independently proved that when base rates differ between groups and the classifier is not perfectly accurate, you cannot simultaneously satisfy calibration and equalized odds.

The two exceptions are the ones that never occur in practice: the base rate is identical across groups, or the model is perfect.

So in any realistic deployment where prevalence differs and accuracy is imperfect, satisfying calibration forces unequal error rates, and equalising error rates breaks calibration. There is no clever architecture, no better training procedure and no larger model that escapes this, because it is a property of the definitions rather than of any algorithm.

The practical consequences are three.

An organisation cannot commit to fairness in general, because the commitment is not coherent. It can commit to a specific criterion.

Any system will fail some fairness metric, so the existence of a failing metric is not by itself evidence of wrongdoing, which matters both for audits you run and for criticism you receive.

And the choice of criterion is therefore a substantive decision about whose errors matter more, made by someone, whether or not they realise they are making it. Leaving it implicit does not avoid it.

4. Choosing by whose error matters

Since you must choose, the question that actually decides it is which error hurts the person more.

Where a false negative is the serious harm, a qualified applicant rejected, a sick patient missed, a deserving claim denied, equal opportunity is the natural criterion, because it equalises the rate at which people who should have been selected are found.

Where a false positive is the serious harm, someone wrongly flagged for fraud, wrongly investigated, wrongly denied on a risk score, equalising false positive rates matters more, which points toward equalized odds.

Where the score is handed to a human who will rely on it as a probability, calibration matters most, because a score meaning different things for different groups will systematically mislead the decision-maker.

And where the concern is representation in the outcome rather than accuracy, demographic parity is the criterion, which is the right choice less often than it is used.

The reasoning runs from the harm to the metric, never the reverse. A metric chosen because it is the one the system already passes is not a criterion, it is a result.

flowchart TD
A["Which error harms the person more?"] --> B["False negative: qualified person rejected"]
A --> C["False positive: wrongly flagged or denied"]
A --> D["Score relied on as a probability"]
A --> E["Concern is representation in outcomes"]
B --> F["Equal opportunity: equal true positive rate"]
C --> G["Equalized odds: equal TPR and FPR"]
D --> H["Calibration: score means the same per group"]
E --> I["Demographic parity: equal selection rate"]
F --> J["Measure and report the others as residual"]
G --> J
H --> J
I --> J

5. The four-fifths rule and its limits

One threshold appears constantly in practice and deserves accurate treatment, because it is widely misapplied.

The four-fifths or eighty percent rule comes from United States employment law, specifically the Uniform Guidelines on Employee Selection Procedures. It states that a selection rate for any group less than four-fifths of the rate for the highest group is generally regarded as evidence of adverse impact.

Three things about it are worth knowing.

It is a demographic parity test. It compares selection rates and says nothing about accuracy, so a system passing it can still be substantially worse at identifying qualified people in one group.

It is a rule of thumb for triggering scrutiny, not a definition of lawfulness. Passing it does not establish that a system is lawful, and failing it does not establish that it is not, since a business necessity justification can apply.

And it is jurisdiction-specific. It has no direct standing in EU law, where the relevant frameworks are the non-discrimination directives and, for AI systems, the Act's own requirements.

Its genuine value is as a screening threshold: cheap to compute, widely recognised, and useful for deciding where to look harder. Its misuse is as a target, where a team tunes a system to clear four-fifths and declares the fairness work complete, having optimised a proxy in a jurisdiction that may not apply to them.

6. A worked measurement

One model, one dataset, four metrics, showing how differently the same system reads.

SCREENING MODEL, 10,000 applicants

                          GROUP A      GROUP B
Applicants                8,000        2,000
Actually qualified        2,400 (30%)    400 (20%)   <- base rates differ

Selected                  1,840 (23.0%)  340 (17.0%)
Selection rate ratio                     0.74  <- fails four-fifths

True positive rate        0.70           0.60  <- equal opportunity fails
False positive rate       0.13           0.14  <- close
Positive predictive value 0.91           0.71  <- calibration fails badly

Read the last line first. A score from this model means something very different depending on group: 91 percent of selected Group A applicants are qualified, against 71 percent of Group B. A recruiter treating the score as comparable is being systematically misled.

The selection rate ratio of 0.74 fails the four-fifths screen, which would trigger scrutiny in a US employment context.

And equal opportunity fails: the model finds 70 percent of qualified Group A applicants but only 60 percent of qualified Group B ones, so a qualified Group B applicant is meaningfully more likely to be missed.

Note what you cannot do. Fixing the true positive rate gap will move the predictive values, because the base rates differ and the model is imperfect. That is the impossibility result appearing in your own numbers.

7. The data you need to measure

Every metric above requires knowing which group each person belongs to, and many organisations do not hold that data and are nervous about collecting it.

The nervousness has a real basis. Protected attributes such as ethnicity, health status and religion are special category data under the GDPR, whose processing is prohibited absent a specific condition.

That produced a genuine bind, and it has been resolved. The AI Act already permitted processing special category data where strictly necessary for bias detection and correction in high-risk systems, subject to safeguards including limits on re-use, pseudonymisation and restricted access. The 2026 Digital Omnibus clarified and widened that flexibility.

So the position is now clear: not measuring is no longer defensible on data protection grounds. If your organisation declined to test for disparities because it lacked the attributes, that reasoning has been overtaken.

Three practical routes where you still lack the data. Collect it voluntarily with a clear purpose statement, separated from the decision pipeline so it cannot influence the decision. Use a proxy for measurement only, accepting that inferred attributes carry error and reporting that error honestly. Or measure on a consented sample rather than the whole population, which is often sufficient to detect a material disparity.

What is not acceptable is concluding that measurement is impossible and proceeding. The absence of a measurement is not the absence of a disparity.

8. Statistical honesty

Fairness measurements are statistics on samples, and the ordinary cautions apply with more force than usual because the stakes invite motivated reading.

Small groups produce wide intervals. A group of forty people yields an estimate with substantial uncertainty, and reporting a point estimate without that uncertainty invites both false alarm and false comfort. Report confidence intervals, always.

Testing many groups invites false positives. Check twenty intersections at a conventional significance level and you should expect roughly one to look significant by chance. Either adjust for multiple comparisons or, better, name the comparisons you care about in advance so you are not fishing.

Statistical significance is not practical significance. A large sample makes a tiny disparity detectable, and a tiny disparity may not matter. Report the effect size and decide on that, not on whether a p-value cleared a threshold.

And absence of evidence is not evidence of absence. A measurement showing no significant disparity in a small sample is consistent with a substantial disparity you lacked the power to detect. Say what disparity your sample could have detected, which is a more honest summary than reporting no significant difference.

The general posture: these numbers will be read by people who want a particular answer, including you, and the defence is stating the uncertainty as prominently as the estimate.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. What did Chouldechova and, independently, Kleinberg and colleagues prove?
    • That demographic parity is the only coherent fairness definition
    • That calibration and equalized odds cannot both hold when base rates differ and the classifier is imperfect
    • That fairness metrics converge as model accuracy increases
    • That protected attributes must be removed from training data
  2. Which criterion is appropriate when the serious harm is a qualified person being rejected?
    • Demographic parity
    • Calibration
    • Equal opportunity, which equalises the true positive rate
    • The four-fifths rule
  3. What is the correct status of the four-fifths rule?
    • A definition of lawfulness under EU non-discrimination law
    • A calibration test applicable to any scoring model
    • A binding threshold that all AI systems must meet
    • A US employment-law rule of thumb that screens selection rates and says nothing about accuracy
  4. In the worked example, positive predictive value is 0.91 for Group A and 0.71 for Group B. What does this mean in practice?
    • A recruiter treating the score as comparable across groups is being systematically misled
    • Group B applicants are selected at a higher rate
    • The model has equal error rates across groups
    • The four-fifths rule is satisfied
  5. An organisation says it cannot measure disparities because it lacks protected attribute data. What is the current position?
    • This remains a valid justification under the GDPR
    • The AI Act permits processing special category data where strictly necessary for bias detection, and the 2026 Omnibus widened this
    • Only public authorities may collect such data
    • Proxies must be used instead, in all cases

Related lessons