Find a course

Module 2: Bias and FairnessLesson 4 of 1113 min

Measuring Fairness

Calculate selection rates, impact ratios and error rates by group, apply the four-fifths rule, and see why common fairness definitions can conflict.

Step 1 of 11Learn

Fairness needs numbers

Saying a system "seems fair" isn't enough. To find and fix bias, teams measure outcomes for different groups and compare them. The good news: the core measurements need nothing more than counting and division.

Start with the simplest one, the selection rate: the share of a group that gets a positive outcome, such as being hired, approved or flagged for extra help.

Selection rate = number selected ÷ number of applicants in the group

Suppose a hiring tool advances 60 of 100 applicants from Group A and 30 of 75 applicants from Group B. Selection rates are 60 ÷ 100 = 60% and 30 ÷ 75 = 40%.

To compare groups, divide the lower rate by the higher one to get the impact ratio: 40% ÷ 60% ≈ 0.67.

In US employment, a long-standing guideline from the 1978 Uniform Guidelines on Employee Selection Procedures, known as the four-fifths rule, treats an impact ratio below 0.8 (80%) as a sign of possible adverse impact that deserves investigation. It's a rule of thumb, not a legal verdict: small samples can produce misleading ratios, and a ratio above 0.8 doesn't prove fairness. But it's widely used, and some laws, such as New York City's 2023 rule on automated employment decision tools, require published bias audits that report impact ratios.

Step 2 of 11Try the calculator

Selection rate and impact ratio

Enter applicants and selections for two groups. The impact ratio divides the lower selection rate by the higher one.

Group A selection rate
40 %
Group B selection rate
28 %
Impact ratio (lower ÷ higher)
0.7

Step 3 of 11Practice · Work it out

A loan model approves 120 of 200 applicants from Group A and 54 of 120 from Group B. What is the impact ratio (lower selection rate ÷ higher), to two decimal places?

Step 4 of 11Learn

Beyond selection rates: error rates

Equal selection rates aren't the only way to think about fairness. Often the question is whether the system makes mistakes equally across groups. For that you need the four outcomes of a yes or no prediction, compared with what actually happened:

  • True positive (TP): predicted yes, actually yes.
  • False positive (FP): predicted yes, actually no.
  • True negative (TN): predicted no, actually no.
  • False negative (FN): predicted no, actually yes.

Two error measures matter most:

True positive rate (TPR) = TP ÷ (TP + FN): of the people who truly qualify, what share does the system catch? Also called recall or sensitivity.

False positive rate (FPR) = FP ÷ (FP + TN): of the people who truly don't have the outcome, what share are wrongly flagged?

The cost of each error depends on context. In a model that flags people as high risk of reoffending, a false positive means someone who wouldn't reoffend is treated as dangerous, possibly kept in jail. In a model that identifies patients for extra care, a false negative means a sick person is missed.

In 2016, the news organization ProPublica analyzed a widely used criminal risk score called COMPAS. It found that Black defendants who did not go on to reoffend were nearly twice as likely as white defendants to have been labeled higher risk: a much higher false positive rate.

Step 5 of 11Practice · Diagram

The four outcomes of a yes/no prediction

A defendant labeled high risk does not reoffend. Tap that box.

Tap the shape that answers the question, then press Check.

The four outcomes of a yes/no predictionTwo-by-two matrix: True positive, False positive, False negative, True negative.True positiveFalse positiveFalse negativeTrue negativeWhat actually happenedYesNoWhat the model predictedNoYes
True positive

Predicted yes, actually yes.

False positive

Predicted yes, actually no: wrongly flagged.

False negative

Predicted no, actually yes: missed.

True negative

Predicted no, actually no.

Step 6 of 11Chart

COMPAS: labeled higher risk but did not reoffend

COMPAS: labeled higher risk but did not reoffendBar chart with 2 categories: Black defendants: 44.9%; White defendants: 23.5%.0%10%20%30%40%50%Black defendantsWhite defendants44.9%23.5%
ProPublica’s 2016 analysis of defendants in Broward County, Florida.
COMPAS: labeled higher risk but did not reoffend
ItemFalse positive rate
Black defendants44.9%
White defendants23.5%

Step 7 of 11Try the calculator

Error rates by group

Enter the four outcome counts for each group to compare true positive rates and false positive rates.

Group A true positive rate
90 %
Group B true positive rate
60 %
Group A false positive rate
20 %
Group B false positive rate
10 %

Step 8 of 11Practice · Work it out

For one group, a fraud model has 30 false positives and 270 true negatives. What is its false positive rate, in percent?

Step 9 of 11Learn

Why fairness definitions conflict

There are several reasonable definitions of a "fair" model:

  • Demographic parity: equal selection rates across groups.
  • Equal opportunity: equal true positive rates, so qualified people in every group are recognized equally.
  • Equalized odds: equal true positive rates and equal false positive rates.
  • Calibration: a given score means the same thing for everyone; for example, among people scored "70% risk," about 70% have the outcome, whatever their group.

The COMPAS debate turned on this. ProPublica showed unequal false positive rates. The tool's developer responded that its scores were calibrated: at each score level, Black and white defendants reoffended at similar rates. Both claims could be true at once.

Researchers then proved a striking result: when the base rate, how common the outcome is, differs between groups, a model generally cannot be calibrated and have equal false positive and false negative rates at the same time, unless it predicts perfectly. This is often called the impossibility theorem of fairness.

The practical lesson isn't that fairness is hopeless. It's that choosing a fairness measure is a value judgment about which errors matter most in a given context, and that choice should be made deliberately, explained openly and informed by the people affected, not left to whatever metric the software reports by default.

Step 10 of 11Practice · Match the pairs

Match each fairness definition to what it requires.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Demographic parity
  2. Equal opportunity
  3. Equalized odds
  4. Calibration

Step 11 of 11Practice · Choose one

A risk model is calibrated across two groups, but one group has a much higher false positive rate. The groups have different base rates. What does fairness research say about this situation?