Inferensys

Glossary

Demographic Parity

A group fairness metric requiring a model's positive prediction rate to be equal across all demographic groups, ensuring statistical independence from the sensitive attribute.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
GROUP FAIRNESS METRIC

What is Demographic Parity?

Demographic parity is a statistical group fairness criterion requiring a model's positive prediction rate to be identical across all protected demographic groups, ensuring the decision is statistically independent of the sensitive attribute.

Demographic parity, also known as statistical parity, is a fairness metric that mandates a model's selection rate—the proportion of individuals predicted to receive a positive outcome—be equal across different groups defined by a sensitive attribute like race or gender. It is satisfied when the probability of a favorable prediction is the same regardless of group membership, mathematically expressed as P(Ŷ=1|A=a) = P(Ŷ=1|A=b). This definition enforces statistical independence between the model's output and the protected attribute, making it a foundational, input-agnostic fairness constraint.

While intuitive for legal compliance with disparate impact doctrine, demographic parity has a critical limitation: it ignores the ground-truth base rates. If a qualified subgroup is underrepresented in the training data, enforcing parity may require the model to arbitrarily grant positive outcomes to unqualified individuals in one group while denying qualified individuals in another, creating a severe fairness-utility trade-off. This metric is best suited for scenarios where historical labels are known to be corrupted by systemic bias, and the primary goal is to rapidly equalize opportunity distribution rather than maximize predictive accuracy.

STATISTICAL INDEPENDENCE

Key Characteristics of Demographic Parity

Demographic Parity, also known as statistical parity, is a group fairness metric that mandates a model's decision rate be independent of protected attributes. It is the foundational constraint for ensuring proportional representation in algorithmic outcomes.

01

The Statistical Independence Constraint

Demographic Parity requires that the probability of a positive prediction is identical across all demographic groups. Formally, this is expressed as P(ŷ=1 | A=a) = P(ŷ=1 | A=b) for any two groups a and b. This enforces that the model's output is statistically independent of the sensitive attribute, meaning knowing a person's group membership provides no information about the likelihood of a favorable classification. This is the strictest form of group fairness and is often legally mandated in contexts like hiring.

P(ŷ=1|A=a)
Positive Rate Group A
P(ŷ=1|A=b)
Positive Rate Group B
02

The Disparate Impact Ratio

In practice, perfect equality is rarely achievable, so compliance is often measured using the Disparate Impact Ratio. This is calculated by dividing the positive prediction rate of the unprivileged group by that of the privileged group. The U.S. Equal Employment Opportunity Commission's 80% rule is a common threshold: a ratio below 0.8 indicates a potential adverse impact. A ratio of 1.0 represents perfect demographic parity.

< 0.8
Adverse Impact Threshold
1.0
Perfect Parity
03

The Core Limitation: Laziness

A critical weakness of Demographic Parity is that it permits lazy solutions. A model can satisfy the constraint by randomly granting positive outcomes to unqualified individuals in one group to match the rate of qualified individuals in another, or by arbitrarily denying qualified candidates. This is known as tokenism or randomized fairness. The metric ignores the ground truth label (Y), meaning it does not account for whether the decisions were actually correct or justified.

04

Prevalence Disparity Conflict

Demographic Parity becomes mathematically impossible to satisfy without causing harm when the base rates of the target variable differ significantly between groups. If the true rate of loan default is 10% for Group A and 20% for Group B, forcing equal acceptance rates would require either:

  • Over-accepting risky applicants in Group B
  • Under-accepting qualified applicants in Group A This inherent conflict with predictive accuracy is the central fairness-utility trade-off.
05

Pre-Processing Mitigation: Reweighing

A common technique to achieve Demographic Parity is reweighing, a pre-processing method. It works by assigning weights to training examples based on the combination of their sensitive attribute and outcome label. For instance, a qualified applicant from an underrepresented group receives a higher weight, while an unqualified applicant from an overrepresented group receives a lower weight. The model is then trained on this weighted dataset, learning to make predictions that are statistically independent of the sensitive attribute without explicit in-processing constraints.

06

In-Processing Constraint: Adversarial Debiasing

Demographic Parity can be enforced during model training using adversarial debiasing. This architecture pits a predictor network against an adversary network. The predictor tries to accurately classify the target variable, while the adversary tries to predict the sensitive attribute from the predictor's output. The predictor is trained to maximize accuracy while simultaneously minimizing the adversary's ability to detect the protected group, effectively learning a representation that achieves statistical independence from the sensitive attribute.

FAIRNESS METRIC COMPARISON

Demographic Parity vs. Equalized Odds

A technical comparison of two foundational group fairness criteria, contrasting their definitions, mathematical constraints, and operational trade-offs in classification systems.

FeatureDemographic ParityEqualized OddsNotes

Core Definition

Positive prediction rate is equal across all groups

True positive and false positive rates are equal across all groups

DP ignores ground truth; EO conditions on it

Mathematical Constraint

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

P(Ŷ=1|Y=y,A=a) = P(Ŷ=1|Y=y,A=b) for y∈{0,1}

DP: independence. EO: separation

Sensitive Attribute Independence

Requires Ŷ ⊥ A

Requires Ŷ ⊥ A | Y

DP is a stronger unconditional constraint

Uses Ground Truth Labels

EO requires labeled outcomes; DP does not

Satisfies Individual Fairness

Both are group-level metrics, not individual guarantees

Allows Perfect Predictor

DP forbids perfect predictor if base rates differ; EO permits it

Laziness Penalty

High risk of 'laziness' via random positive selection

Lower risk; must match error rates per group

DP can be satisfied by trivial classifiers

Typical Mitigation Strategy

Pre-processing or in-processing with adversarial debiasing

Post-processing threshold adjustment or constrained optimization

Different intervention points in the ML pipeline

FAIRNESS METRICS

Frequently Asked Questions

Clear answers to the most common questions about demographic parity, its implementation, and its role in building equitable AI systems.

Demographic parity is a group fairness metric that requires a model's positive prediction rate to be identical across all protected demographic groups, ensuring statistical independence from the sensitive attribute. It works by constraining the decision boundary so that the proportion of individuals receiving a favorable outcome—such as loan approval or ad delivery—is the same for every group, regardless of the base rate of qualification. Formally, it is satisfied when P(Ŷ=1 | A=a) = P(Ŷ=1 | A=b) for all groups a and b, where Ŷ is the predicted outcome and A is the sensitive attribute. This metric is also known as statistical parity or group fairness and is one of the most widely cited definitions in the algorithmic fairness literature.

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.