Course contentsShow
← Machine Learning and Deep Learning
Lesson 3297 of 3,53872. Bias and FairnessFree lesson

Equal Opportunity and Equalized Odds

Fairness metrics based on true positive rates and false positive rates across groups.

Equal Opportunity and Equalized Odds

What you'll learn: How to measure fairness by ensuring models achieve similar true positive and false positive rates across different demographic groups.

Core Idea

While demographic parity focuses on equal overall positive prediction rates, Equal Opportunity and Equalized Odds dive deeper into prediction quality across groups. These metrics ask: "Does the model perform equally well for people who truly deserve a positive outcome, regardless of their group membership?"

Equal Opportunity requires that among people who actually belong to the positive class (e.g., truly qualified loan applicants), the model identifies them at the same rate across all groups. Mathematically, this means equal True Positive Rates (TPR) or recall:

TPR(Group A) = TPR(Group B)

Equalized Odds is stricter—it demands both equal true positive rates and equal False Positive Rates (FPR) across groups. This ensures the model doesn't just catch positives equally well, but also makes mistakes equally rarely.

Why This Matters

Think of a medical diagnosis system. Equal Opportunity ensures that if someone from Group A has the disease, they're as likely to be diagnosed as someone from Group B with the disease. Equalized Odds goes further: people without the disease should also have equal chances of false alarms, regardless of group.

Unlike demographic parity (which ignores ground truth), these metrics explicitly consider whether predictions are correct, making them suitable when accurate identification of true positives matters most—like detecting fraud, diagnosing illness, or identifying qualified candidates.

Key Takeaway: Equal Opportunity ensures equal benefit (same TPR), while Equalized Odds ensures both equal benefit and equal burden (same TPR and FPR) across groups—fairness definitions rooted in prediction accuracy rather than raw rates.