Fairness Metrics: Demographic Parity, Equalized Odds, and Trade-offs › The Impossibility of Satisfying All Metrics Simultaneously
Language AI HandbookAll chapters Fairness Metrics: Demographic Parity, Equalized Odds, and Trade-offs › The Impossibility of Satisfying All Metrics SimultaneouslyOne section · Sections in this chapter8 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
One of the most important theoretical results in algorithmic fairness is that most group fairness criteria are mutually incompatible in the general case. You cannot satisfy demographic parity, equalized odds, and predictive parity simultaneously unless one of two special conditions holds: either the base rates are equal across groups, or the classifier is perfectly accurate.
The Chouldechova impossibility theorem (2017) shows that if the base rates of the positive outcome differ between groups (), then no classifier can simultaneously satisfy all three of:
- Predictive parity: equal precision across groups,
- Equal opportunity: equal TPR across groups,
- Equalized FPR: equal false positive rates across groups,
unless the classifier achieves perfect accuracy.
The proof follows from the relationship between precision, TPR, FPR, and base rate. Precision asks: "given a positive prediction, what fraction are truly positive?" We can expand this using the law of total probability:
where:
- is the base rate (prevalence of the positive outcome in the group)
- : the probability of a positive prediction among truly positive individuals
- : the probability of a positive prediction among truly negative individuals
- : the fraction of truly negative individuals
The crucial implication: if TPR and FPR are both forced to be equal across groups (equalized odds), then the only thing that can vary in the precision formula is the base rate . When base rates differ between groups, equal TPR and FPR mathematically force unequal precision. There is no way around this: the formula is an identity, not an approximation.
Working through the logic in the other direction: if we demand equal precision (predictive parity), and we know the base rates differ, then the TPR and FPR cannot both be equal. The formula dictates that at least one of TPR or FPR must differ. A model trying to maintain equal precision across groups with different base rates must compensate for the base rate difference by adjusting error rates.
This is not a failure of any particular algorithm. It is a mathematical constraint on the joint distribution of outcomes, predictions, and groups. When base rates differ between groups, there is a fundamental tension between giving everyone equal access (demographic parity), finding everyone's true positives equally well (equal opportunity), and making equally reliable positive predictions (predictive parity).
The Kleinberg et al. (2016) impossibility result shows a similar tension between calibration within groups and equalized odds: a calibrated classifier cannot achieve equal TPR and equal FPR across groups with different base rates, except in degenerate cases. These are independent proofs of overlapping impossibilities, together mapping out the full set of what cannot be achieved simultaneously.
Let's visualize this impossibility directly.
def precision_from_tpr_fpr_baserate(tpr, fpr, base_rate):
"""
Compute precision given TPR, FPR, and the group's base rate.
Uses: precision = (tpr * base_rate) / (tpr * base_rate + fpr * (1 - base_rate))
"""
numerator = tpr * base_rate
denominator = tpr * base_rate + fpr * (1 - base_rate)
return numerator / denominator if denominator > 0 else 0.0
# Suppose both groups have equal TPR and FPR (equalized odds satisfied)
tpr_shared = 0.70
fpr_shared = 0.20
base_rates = np.linspace(0.1, 0.9, 100)
precisions = [
precision_from_tpr_fpr_baserate(tpr_shared, fpr_shared, br)
for br in base_rates
]
The plot makes the impossibility concrete. If Group 0 has a base rate of 0.30 and Group 1 has a base rate of 0.55, holding TPR and FPR equal across groups forces precision to be 0.60 for Group 0 and 0.74 for Group 1, a difference of 0.14 that you cannot eliminate without violating equalized odds. You can close the precision gap only by allowing TPR or FPR to differ. There is no mathematical escape from this trade-off except through perfect classification.
The Impossibility Triangle
It is useful to visualize the impossibility as a triangle of competing constraints. The three vertices represent three properties we would like a model to have:
- A (Equalized odds): TPR and FPR are equal across groups
- B (Predictive parity): Precision is equal across groups
- C (Base rate parity): Base rates are equal across groups (this is typically a property of the data, not the model)
The impossibility theorem says that when base rates differ (C is violated), you cannot simultaneously achieve both A and B with an imperfect classifier. You must choose: do you want equalized odds or predictive parity? Trying to satisfy both will fail, and any optimization that makes one better will make the other worse.
Let's quantify this trade-off empirically.
import pandas as pd
# Train classifiers with group-specific thresholds to explore the trade-off
# By varying the threshold for group 1 relative to group 0,
# we can trace the equalized-odds vs predictive-parity frontier
threshold_g0 = 0.5
frontier_data = []
for threshold_g1 in np.linspace(0.1, 0.9, 80):
y_pred_adjusted = np.zeros(len(y_test), dtype=int)
y_pred_adjusted[group_test == 0] = (
y_prob[group_test == 0] >= threshold_g0
).astype(int)
y_pred_adjusted[group_test == 1] = (
y_prob[group_test == 1] >= threshold_g1
).astype(int)
m = compute_group_fairness(y_test, y_pred_adjusted, group_test)
frontier_data.append(
{
"threshold_g1": threshold_g1,
"eo_diff": m["equalized_odds_diff"],
"pp_diff": abs(m["predictive_parity_diff"]),
"dp_diff": abs(m["demographic_parity_diff"]),
}
)
frontier_df = pd.DataFrame(frontier_data)
The trade-off curve makes the impossibility tangible. Moving along the curve by adjusting the threshold for Group 1, you can reduce equalized odds violations at the cost of increasing predictive parity violations, or vice versa, but you cannot reach zero for both simultaneously. The origin of the plot (zero for both metrics) is unreachable given differing base rates and imperfect classification.