Quantifying performance disparity across subgroups
fairness evaluation beyond accuracy.
compute per-group precision, recall, FPR, FNR, compare via fairness metrics; visualize with grouped bars or per-group confusion matrices.
trusting one global accuracy number.
What's really being asked
This checks whether you know that aggregate accuracy can mask severe underperformance on a minority subgroup, especially when that group is small, and whether you can choose disaggregated, fairness-aware metrics.
The full answer
The core move is to stop looking at a single global number and slice every metric by the group of concern. For each group compute precision, recall, false positive rate, and false negative rate, because these reveal asymmetric harms, for example a model that misses far more true positives for the minority group has a high false negative rate there even if overall accuracy is high. Then compare across groups with fairness criteria: equal opportunity asks whether recall is equal across groups, equalized odds adds equal false positive rates, and demographic parity compares positive prediction rates. Quantify the disparity as the gap or ratio between groups. For visualization, use grouped bar charts showing each metric side by side per group so the gaps are obvious, present per-group confusion matrices, and overlay per-group ROC or precision-recall curves to compare discriminative power. A calibration plot per group can also show if predicted probabilities are reliable for each.
The mistakes people make
Reporting overall accuracy or a single aggregate metric, which is exactly what hides the problem. Computing only one metric like precision without recall, missing the type of error that harms the group. Not slicing by the subgroup at all. Choosing a fairness definition without stating which harm it targets.
What usually comes next
Which fairness definition fits this use case and why can they conflict? How would you fix the disparity? What if the group is too small for stable estimates?
A concrete example
A loan model is ninety-two percent accurate overall, but slicing shows recall of eighty-five percent for the majority group and fifty-eight percent for a minority group, meaning many qualified minority applicants are wrongly rejected. You plot a grouped bar chart of recall and false negative rate by group, making the twenty-seven-point recall gap unmissable, and you report the equal-opportunity difference as the headline fairness metric.
Interview question
A model is 92% accurate overall but you suspect it fails a minority group. Which evaluation approach exposes the disparity?
- a.Measuring only the global F1 score
- b.Reporting overall accuracy with more decimal places
- c.Increasing the size of the training set globally
- d.Computing precision, recall, and error rates separately for each groupCorrect
Why? this is the answer
Disaggregating metrics by group reveals gaps that aggregate numbers hide, such as far lower recall for the minority group. A more precise overall accuracy, a bigger training set, or a single global F1 all still average across groups and conceal the disparity.
Just read this? Test yourself on what you have been reading.
Read the original → developers.google.com
- #fairness
- #model-evaluation
- #subgroup-metrics
- #responsible-ai
- #recall
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles