⚖️  Equalized Odds (Fairness)

Equalized Odds (Fairness)#

Requires equal true-positive and false-positive rates across groups.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Equalized odds requires a classifier to have the same true-positive rate and the same false-positive rate across groups. Formally,

\[P(\hat{Y}=1 \mid Y=y, A=a) = P(\hat{Y}=1 \mid Y=y, A=b) \quad \forall\, y \in \{0,1\},\ \forall\, a, b.\]

So among those who truly are positive (\(Y=1\)) every group is recognised at the same rate, and among those who truly are negative (\(Y=0\)) every group is wrongly flagged at the same rate.

Where it sits among fairness criteria#

This is the separation criterion, \(\hat{Y} \perp A \mid Y\) — the prediction is independent of group once you condition on the truth. It is the strictest of the error-rate criteria: equalized odds = equal opportunity (equal TPR) plus equal FPR.

Example#

A loan model approves qualified men at TPR 80% but qualified women at TPR 60%, and wrongly approves unqualified men at FPR 20% but unqualified women at FPR 30%. Both rates differ by group, so equalized odds is violated on both counts.

The catch#

Like the other criteria, equalized odds collides with predictive parity when base rates differ (the impossibility theorem), and enforcing it can cost overall accuracy — so practitioners often target approximate equalized odds within a tolerance.

Limitations#

  • Hard to satisfy exactly, especially with unequal base rates.

  • Trades off against accuracy; usually relaxed rather than enforced exactly.

In code#

from fairlearn.metrics import equalized_odds_difference

eod = equalized_odds_difference(y_true, y_pred, sensitive_features=A)  # 0 = parity

Theme: Fairness & Calibration  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Equalized Odds (Fairness) (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: advanced