Parity Ratio

Overview

The ratio of true values between the privileged groups and unprivileged groups (ex. how many men were hired / how many women were hired)

Formula

parity difference = privileged selection rate / non_privileged selection rate

Source

Where:

  • selection rate = # of samples with positive label / total samples

Source

Usage

Manually

# Calculate parity ratio
parity_ratio_value = parity_ratio(df, protected_attribute, privileged_group, labels, positive_label)

print("Parity Ratio:", parity_ratio_value)

Using Fairness Object

 parity_ratio_value = (fo.compute(parity_ratio))

Results

Parity Ratio: 0.9090909089099174

These results are obtained by using the input data given in the Create Example Data page under Getting Started

Interpretation

The Parity Ratio metric quantifies the ratio of performance between two groups or populations based on a chosen performance metric. A parity ratio greater than 1 indicates that the first group has a higher performance metric compared to the second group, while a ratio less than 1 indicates the opposite.