Course contentsShow
← Software Engineering
Lesson 1912 of 1,93355. Ethics and ProfessionalismFree lesson

Fairness Definitions and Metrics

Learning different mathematical definitions of fairness including demographic parity, equalized odds, and individual fairness.

Fairness Definitions and Metrics

You'll learn: How engineers mathematically define and measure fairness in algorithmic systems, including demographic parity, equalized odds, and individual fairness.

Once you've identified that bias exists in your machine learning system, you need rigorous ways to measure fairness. Unfortunately, there's no single agreed-upon definition—different contexts demand different mathematical approaches.

Demographic Parity (Statistical Parity)

This definition requires that outcomes are independent of protected characteristics. For example, if your loan approval algorithm grants loans to 40% of applicants overall, it should approve approximately 40% of applicants from every demographic group.

Think of it like: A fair coin that lands heads 50% of the time should do so equally regardless of who flips it.

Limitation: This ignores whether different groups have genuinely different qualifications. It treats equal outcomes as fairness, which may not reflect reality.

Equalized Odds (Error Rate Balance)

This requires that true positive rates and false positive rates are equal across groups. Your system should be equally accurate for all demographics—both in correctly identifying positive cases and avoiding false alarms.

Think of it like: A medical test that correctly diagnoses illness 90% of the time should maintain that 90% accuracy for all patient groups.

Limitation: Still allows for different selection rates if base rates differ between groups.

Individual Fairness

This principle states that similar individuals should receive similar outcomes. If two loan applicants differ only in their protected characteristic (race, gender, etc.), they should receive the same decision.

Think of it like: Two students with identical grades and test scores should have equal college admission chances.

Limitation: Defining "similar" is incredibly difficult and subjective.

These definitions can mathematically contradict each other—satisfying one may make it impossible to satisfy another. Engineers must choose which definition best serves their specific context and stakeholders.

Key Takeaway: Fairness in algorithms requires explicit mathematical definitions like demographic parity, equalized odds, or individual fairness—each capturing different ethical priorities and facing unique trade-offs.