A loan classifier is evaluated on two demographic groups of 100 applicants each: Group A has TP=48,FN=12,FP=12,TN=28 and Group B has TP=24,FN=6,FP=21,TN=49. What are the positive prediction rate, TPR, FPR and PPV for each group, and which fairness criteria are satisfied or violated?

ML systems and evaluation, Fairness
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can compute group fairness metrics from confusion matrices and see the tension between them empirically.

Key idea

Using confusion-matrix counts (TP, FP, FN, TN for true/false positives and negatives, with group size N=TP+FP+FN+TN), comparing selection rate (TP+FP)/N, true positive rate TPR=TP/(TP+FN), false positive rate FPR=FP/(FP+TN), and positive predictive value PPV=TP/(TP+FP) (precision) across groups shows that equalised odds can hold even while demographic parity and predictive parity fail.

Steps

  1. Group A (60 positives, 40 negatives): positive prediction rate =(48+12)/100=0.60; TPRA=48/60=0.80; FPRA=12/40=0.30; PPVA=48/60=0.80.
  2. Group B (30 positives, 70 negatives): positive prediction rate =(24+21)/100=0.45; TPRB=24/30=0.80; FPRB=21/70=0.30; PPVB=24/45=815≈0.533.
  3. Evaluate equalised odds and equal opportunity: both TPRA=TPRB=0.80 and FPRA=FPRB=0.30, so both equal opportunity (equal TPR) and equalised odds (equal TPR and FPR) are exactly satisfied.
  4. Evaluate demographic parity and predictive parity: demographic parity (equal positive prediction rates) is violated (gap 0.60−0.45=0.15), and predictive parity (equal PPV / precision) is violated (gap 0.80−0.533=0.267), driven by the different base rates (0.60 vs 0.30).

Common mistakes

How long your answer should be

Eight rates across two groups and 2–3 sentences assessing the criteria; 4 minutes.

Read this

Previous in ML systems and evaluation: An A/B test evaluates 20 independent metrics at significance level α=0.05 when the treatment actually has zero effect on all of them. What is the probability of getting at least one false positive, how does Bonferroni correction adjust the threshold, and why does sequential peeking cause a similar problem?
Next in ML systems and evaluation: A credit score model’s training score distribution across four equal-frequency bins is [0.25,0.25,0.25,0.25], while live production traffic shifts to [0.10,0.20,0.30,0.40]. What is the population stability index (PSI), how severe is the drift under standard thresholds, and why should rising PSI trigger investigation rather than automatic blind retraining?