Defining Fairness in Data Science
You'll learn why "fairness" has multiple valid mathematical definitions and why context determines which one matters most.
The Fairness Paradox
Fairness seems simple—treat everyone equally, right? But in data science, "fair" has competing mathematical definitions that cannot all be satisfied simultaneously. Choosing one often means sacrificing another.
Think of it like photo filters: "best" depends on what you're shooting. A landscape filter ruins portraits. Similarly, different fairness definitions optimize for different ethical priorities.
Three Common Fairness Definitions
Demographic Parity (Statistical Parity)
The model's positive predictions are distributed equally across groups. If 10% of Group A gets approved, 10% of Group B should too.
Use when: You believe equal outcomes matter most (e.g., ensuring equal opportunity rates).
Equalized Odds (Error Rate Balance)
True positive rates AND false positive rates are equal across groups. The model is equally accurate for everyone.
Use when: Prediction quality matters—you don't want higher error rates harming one group.
Calibration (Predictive Parity)
When the model predicts 70% probability, it should be correct 70% of the time within each group. Predictions mean the same thing for everyone.
Use when: Individual risk scores must be interpretable and trustworthy across groups (e.g., medical diagnosis).
Why No Universal Definition?
These definitions conflict mathematically when base rates differ between groups. A loan model might achieve demographic parity but fail equalized odds. Your choice encodes whose interests you prioritize: individual accuracy, group outcomes, or interpretability.
You've already learned to detect bias and implement mitigation strategies—now you understand that "fair" itself requires deliberate, context-specific definition before building solutions.
Key Takeaway: Fairness in data science isn't one-size-fits-all; demographic parity, equalized odds, and calibration represent different ethical priorities, and your context—stakeholders, domain, and consequences—determines which definition serves justice best.