Fairness explorer

A risk score rates people from 0 to 100, and everyone at or above a cutoff is flagged. Pick a real case, then move the cutoff and watch the errors trade off. The two groups have the same score tool but different real base rates, the situation at the center of the Week 3 fairness reading. Nothing here is saved or sent anywhere; the data is synthetic and the same for everyone.

Pick a case to run the same math in a different setting:

Error costs

Confusion matrix

Every prediction lands in one of four boxes. The two ways to be wrong each have a name that runs through statistics and machine learning. Move the cutoff below and these counts and rates update across all 1,200 people.

Flagged
Not flagged
Actually high-risk
True positive 0caught
False negative 0Type II error, a miss
Actually not high-risk
False positive 0Type I error, a false alarm
True negative 0correctly cleared
Recall / sensitivity
of everyone actually high-risk, the share flagged. TP / (TP + FN)
Precision / PPV
of everyone flagged, the share actually high-risk. TP / (TP + FP)
False-positive rate, Type I
of everyone actually not high-risk, the share wrongly flagged. FP / (FP + TN)
False-negative rate, Type II
of everyone actually high-risk, the share missed. FN / (FN + TP)

Group A

Real base rate: 26% actually high-risk

Group B

Real base rate: 50% actually high-risk

Fairness tests

    The impossibility result

    When two groups have different base rates, no single cutoff, and in fact no pair of cutoffs, can equalize the flag rate, the false-positive rate, and the predictive value at the same time. This is a proven result, not a tuning problem: see Chouldechova (2017) and Kleinberg, Mullainathan, and Raghavan (2016). Picking which test to satisfy, and which error to tolerate, is a values decision, which is the Week 3 point.