Fairness Metrics: Demographic Parity, Equalized Odds, and Trade-offs › The Impossibility of Satisfying All Metrics Simultaneously

Michael BrenndoerferMarch 16, 20268 min read
Language AI HandbookAll chapters
Part 58 of 67Bias and Fairness
Chapter 444Fairness Metrics: Demographic Parity, Equalized Odds, and Trade-offs › The Impossibility of Satisfying All Metrics Simultaneously
Reading section 8 of 13 · The Impossibility of Satisfying All Metrics Simultaneously · 8 minSection 8 of 13 · 8 min

Book contents

Section 8 of 13 · 8 min read

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 (P(Y=1∣A=0)≠P(Y=1∣A=1)P(Y=1 \mid A=0) \neq P(Y=1 \mid A=1)), then no classifier can simultaneously satisfy all three of:

  1. Predictive parity: equal precision across groups, P(Y=1∣Y^=1,A=0)=P(Y=1∣Y^=1,A=1)P(Y=1 \mid \hat{Y}=1, A=0) = P(Y=1 \mid \hat{Y}=1, A=1)
  2. Equal opportunity: equal TPR across groups, P(Y^=1∣Y=1,A=0)=P(Y^=1∣Y=1,A=1)P(\hat{Y}=1 \mid Y=1, A=0) = P(\hat{Y}=1 \mid Y=1, A=1)
  3. Equalized FPR: equal false positive rates across groups, P(Y^=1∣Y=0,A=0)=P(Y^=1∣Y=0,A=1)P(\hat{Y}=1 \mid Y=0, A=0) = P(\hat{Y}=1 \mid Y=0, A=1)

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:

Precision=P(Y=1∣Y^=1)=P(Y^=1∣Y=1)⋅P(Y=1)P(Y^=1)=P(Y^=1∣Y=1)⋅P(Y=1)P(Y^=1∣Y=1)⋅P(Y=1)+P(Y^=1∣Y=0)⋅P(Y=0)=TPR⋅P(Y=1)TPR⋅P(Y=1)+FPR⋅P(Y=0)\begin{aligned} \text{Precision} &= P(Y=1 \mid \hat{Y}=1) \\ &= \frac{P(\hat{Y}=1 \mid Y=1) \cdot P(Y=1)}{P(\hat{Y}=1)} \\ &= \frac{P(\hat{Y}=1 \mid Y=1) \cdot P(Y=1)}{P(\hat{Y}=1 \mid Y=1) \cdot P(Y=1) + P(\hat{Y}=1 \mid Y=0) \cdot P(Y=0)} \\ &= \frac{\text{TPR} \cdot P(Y=1)}{\text{TPR} \cdot P(Y=1) + \text{FPR} \cdot P(Y=0)} \end{aligned}

where:

  • P(Y=1)P(Y=1) is the base rate (prevalence of the positive outcome in the group)
  • TPR=P(Y^=1∣Y=1)\text{TPR} = P(\hat{Y}=1 \mid Y=1): the probability of a positive prediction among truly positive individuals
  • FPR=P(Y^=1∣Y=0)\text{FPR} = P(\hat{Y}=1 \mid Y=0): the probability of a positive prediction among truly negative individuals
  • P(Y=0)=1−P(Y=1)P(Y=0) = 1 - P(Y=1): 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 P(Y=1)P(Y=1). 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.

In[22]:
Code
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
]
Out[23]:
Visualization
Line plot of precision vs base rate showing precision rises with base rate when TPR and FPR are held equal, with two groups marked at different base rates showing different resulting precision values.
Precision as a function of base rate when TPR and FPR are held constant (equalized odds satisfied). When two groups have different base rates (vertical dashed lines at 0.30 and 0.55), holding TPR and FPR equal forces different precision values: Group 0 achieves precision 0.60 while Group 1 achieves 0.74. The gap in precision arises purely from the base rate difference and cannot be eliminated without either allowing error rates to differ or achieving perfect classification.

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.

In[24]:
Code
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)
Out[25]:
Visualization
Scatter plot tracing the trade-off between equalized odds difference and predictive parity difference as a function of threshold, showing that reducing one violation increases the other.
Equalized odds difference versus predictive parity difference as Group 1's threshold varies from 0.1 to 0.9 (Group 0's threshold is fixed at 0.5). Each point on the curve corresponds to a specific threshold choice. Moving left (reducing equalized odds violation) increases predictive parity violation and vice versa, tracing the impossibility frontier. The star marks the 0.5/0.5 default configuration. No point reaches the origin (zero for both metrics), confirming the impossibility when base rates differ.

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.