Parity Difference
Overview
The difference in true values between privileged groups vs unprivileged groups (ex. how many men were hired - how many women were hired)
Formula
Parity Difference = Privileged Selection Rate - Unprivileged Selection Rate
Where:
- Selection Rate = # of samples with positive label / total samples
Usage
Manually
# Calculate parity difference
parity_diff = parity_difference(df, protected_attribute, privileged_group, labels, positive_label)
print("Parity Difference:", parity_diff)
Using Fairness Object
parity_diff = (fo.compute(parity_difference))
Results
Parity Difference: -0.045454545453677664
These results are obtained by using the input data given in the Create Example Data page under Getting Started
Interpretation
The Parity Difference metric quantifies the difference in performance between two groups or populations based on a chosen performance metric. A positive Parity Difference indicates that the first group has a higher performance metric compared to the second group, while a negative value indicates the opposite.
Updated 10 months ago