Inferensys

Glossary

Demographic Parity

Demographic parity is a fairness criterion requiring that a model's positive prediction rate is equal across all protected demographic groups, regardless of the ground truth.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
FAIRNESS METRIC

What is Demographic Parity?

Demographic parity is a group fairness criterion requiring a model's positive prediction rate to be statistically identical across all protected demographic groups, irrespective of the ground truth labels.

Demographic parity, often synonymous with statistical parity, mandates that the selection rate—the proportion of individuals classified as positive—must be equal across groups defined by a protected attribute such as race, gender, or age. A model satisfies this constraint if P(Ŷ=1 | A=a) = P(Ŷ=1 | A=b), where Ŷ is the predicted outcome and A is the sensitive attribute. This metric directly addresses disparate impact by ensuring a model's decisions do not disproportionately favor one group over another in aggregate.

While effective for detecting underrepresentation, demographic parity ignores the ground truth base rates, meaning it can require actively discriminating against a qualified majority group to achieve mathematical balance. This limitation distinguishes it from metrics like equalized odds, which condition on the true outcome. In practice, enforcing strict demographic parity often involves post-processing techniques such as threshold adjustment or in-processing constraints, but it remains legally contentious under disparate treatment doctrine when it necessitates explicit consideration of protected characteristics.

FAIRNESS METRIC

Core Characteristics

Demographic parity is a group fairness criterion that mandates equal positive prediction rates across all protected demographic groups, irrespective of the ground truth labels.

01

Statistical Definition

Demographic parity is satisfied when the probability of a positive prediction is identical for all groups. Formally: P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for all groups a, b, where ŷ is the predicted outcome and A is the protected attribute. This metric is also known as statistical parity or group fairness. It is an independence criterion, meaning the prediction is statistically independent of the sensitive attribute.

02

Independence from Ground Truth

A defining characteristic of demographic parity is that it does not consider the actual ground truth labels (Y). It only evaluates the distribution of predictions. This is both its primary strength and its most significant limitation. It can be achieved even if the base rates of the target variable differ substantially between groups, which may require systematically over-predicting positive outcomes for one group and under-predicting for another.

03

Measurement: Disparate Impact Ratio

The most common implementation is the Disparate Impact Ratio, often defined as the 80% rule. It is calculated as:

  • Ratio = P(ŷ=1 | unprivileged group) / P(ŷ=1 | privileged group)
  • A perfectly fair model under this definition has a ratio of 1.0.
  • A ratio below 0.8 (or above 1.25) is typically flagged as potential discrimination.
04

Incompatibility with Other Fairness Metrics

Demographic parity is mathematically incompatible with equalized odds and predictive parity unless the base rates of the target variable are identical across groups or the model is perfectly accurate. This is a fundamental impossibility theorem in algorithmic fairness. Pursuing demographic parity often requires sacrificing calibration, meaning the predicted probability of a positive outcome may no longer accurately reflect the true likelihood for a given individual.

05

Regulatory and Legal Context

Demographic parity aligns closely with disparate impact legal theory under U.S. employment law (Title VII of the Civil Rights Act), where a facially neutral policy that disproportionately harms a protected group is unlawful. It is a primary metric used in Algorithmic Impact Assessments under the EU AI Act to evaluate potential discrimination. However, strict demographic parity is not universally mandated by law, and its use as a binding constraint rather than a diagnostic tool remains legally debated.

06

Implementation Techniques

Achieving demographic parity typically involves one of three intervention points:

  • Pre-processing: Reweighing or transforming the training data to remove statistical dependence on the protected attribute.
  • In-processing: Adding a fairness constraint or regularization term to the model's loss function during training.
  • Post-processing: Adjusting decision thresholds independently for each group after prediction to equalize positive rates.
FAIRNESS METRICS

Frequently Asked Questions

Clear answers to the most common technical and regulatory questions about the Demographic Parity fairness criterion.

Demographic parity is a group fairness criterion requiring that a model's positive prediction rate is identical across all protected demographic groups, regardless of the ground truth labels. It is calculated as the ratio of positive predictions to total predictions for each group. For example, if a hiring algorithm approves 10% of male applicants and 10% of female applicants, it satisfies demographic parity. The mathematical condition is P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for all groups a and b, where ŷ is the predicted outcome and A is the protected attribute. This metric is also known as statistical parity or equal acceptance rate.

FAIRNESS CRITERIA COMPARISON

Demographic Parity vs. Other Fairness Metrics

A comparison of Demographic Parity against other common statistical fairness definitions used in algorithmic impact assessments.

FeatureDemographic ParityEqualized OddsEqual Opportunity

Core Definition

Positive prediction rate is equal across all groups

True positive and false positive rates are equal across groups

True positive rate is equal across all groups

Considers Ground Truth

Formula Basis

P(Ŷ=1|A=a) = P(Ŷ=1|A=b)

P(Ŷ=1|Y=y, A=a) = P(Ŷ=1|Y=y, A=b)

P(Ŷ=1|Y=1, A=a) = P(Ŷ=1|Y=1, A=b)

Allows Perfect Prediction

Sensitive to Base Rate Differences

Primary Legal Alignment

Disparate impact doctrine

Individual fairness

Affirmative action doctrine

Risk of Laziness

Typical Use Case

University admissions, hiring quotas

Pretrial risk assessment, credit scoring

Medical diagnosis, fraud detection

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.