cswork / libraryOpen practice workspace

Articles

ML Fairness Interview Questions: Conflicting Metrics, Thresholds, and Data Limits

Practice ML fairness interview questions covering conflicting metrics, label validity, thresholds, uncertainty, data limits, and system governance.

“Make the model fair” is not a complete machine-learning requirement. Fair to whom, for which harm, at what point in the decision process, and relative to which valid outcome? An interview answer that jumps directly to demographic parity or removes a protected feature skips the hardest part: translating a sociotechnical risk into a measurable and governable decision.

This guide uses two synthetic groups with different outcome rates to show why fairness metrics conflict. It then treats thresholds, labels, missing demographic data, and monitoring as parts of one product decision. For related threshold practice, open Compute and Plot a Precision-Recall Curve and attach every error to its real cost.

Evidence boundary: Metric definitions and trade-off claims use Fairlearn documentation, peer-reviewed research, and NIST risk-management guidance. The confusion matrices, decision workflow, and interview wording are original preparation material.

What an interviewer is testing

A strong answer resolves six urgent questions:

  1. Who is affected, and what allocation or quality-of-service harm is possible?
  2. Is the target label valid, timely, and measured comparably across groups?
  3. Which metric corresponds to the stated harm?
  4. Which metrics cannot be satisfied together in this setting?
  5. How do thresholds change benefits and error burdens?
  6. Who owns monitoring, appeals, overrides, and policy changes?

The article-specific thesis is: fairness metrics encode different value judgments and rely on imperfect data. Choose them from the use case and harm model, expose conflicts with a numeric example, and evaluate the complete human-and-model decision process.

Define the metrics before choosing one

Let A be group membership, Y the observed binary outcome, and Y_hat the decision.

Demographic parity

Demographic parity requires equal positive decision rates across groups:

P(Y_hat = 1 | A = a) is equal for each a.

It ignores the observed label. This can fit an allocation concern when positive decisions distribute an opportunity, especially if historical labels are themselves biased. It can also hide large differences in false positives and false negatives.

Equalized odds

Equalized odds requires equal true-positive rates and equal false-positive rates across groups:

P(Y_hat = 1 | Y = y, A = a) is equal across groups for both y = 1 and y = 0.

Equal opportunity is a relaxation that usually requires parity only for the true-positive rate. This may match a setting where missing qualified people is the central harm and false positives carry a different cost.

Predictive parity and calibration

Predictive parity asks whether positive predictions have the same positive predictive value across groups. Score calibration asks whether people assigned a score such as 0.7 experience the outcome about 70% of the time within each evaluated group.

These definitions answer different questions. Equalized odds conditions on the outcome; predictive parity conditions on the decision. When base rates differ and prediction is imperfect, they generally cannot all hold simultaneously. Kleinberg, Mullainathan, and Raghavan formalized related incompatibilities for risk scores. The conclusion is not “fairness is impossible.” It is that the system owner must choose and justify the relevant constraint instead of presenting one metric as neutral.

Worked example: equal errors, unequal selections

Consider two synthetic evaluation groups of 100 people each.

GroupPositivesNegativesTPFNFPTN
A60404812832
B20801641664

Calculate the rates:

MetricGroup AGroup B
True-positive rate48/60 = 80%16/20 = 80%
False-positive rate8/40 = 20%16/80 = 20%
Accuracy80%80%
Selection rate56%32%
Positive predictive value48/56 = 85.7%16/32 = 50.0%

The model satisfies equalized odds in this fixture because TPR and FPR match. It also has equal accuracy. It fails demographic parity and predictive parity because the observed base rates differ.

No arithmetic tells us which condition the product should prioritize. If a positive decision is access to a scarce opportunity, selection-rate disparity may demand attention. If false accusations impose severe harm, FPR parity and absolute FPR levels matter. If the label records an historically unequal process, conditioning on it can reproduce that process. State the harm, label meaning, intervention, and decision owner before recommending a metric.

Thresholds allocate errors

A classifier score becomes an action through a threshold. Lowering the threshold typically increases both TPR and FPR; raising it typically decreases both. A single global threshold may yield different group rates because score distributions and base rates differ. Group-specific thresholds can move operating points toward a chosen parity constraint, but they explicitly use group membership and may be unsuitable or restricted in a given context.

Fairlearn's ThresholdOptimizer can optimize an objective subject to constraints such as demographic parity or equalized odds. The tool implements a declared optimization problem; it does not decide whether that problem is legitimate. Validate the learned thresholds on separate data, include uncertainty, and review their operational and legal acceptability.

Do not tune a threshold to the evaluation set and report the same set as proof. Split data into training, threshold-selection, and final evaluation roles, preserving relevant time and entity boundaries. When sample sizes are small, bootstrap or other justified uncertainty intervals around group rates can show that a measured gap is too noisy for a precise conclusion.

Thresholds also interact with capacity. A review team that can inspect 1,000 cases per week needs a queue policy, not only a fairness constraint. Compare policies on total benefit, group benefit, each error type, workload, delay, and appeals. Randomization may appear in an optimal postprocessor; if it is unacceptable to the product, include that constraint before optimization.

The label can be the main source of unfairness

A technically correct metric is only as meaningful as Y. Arrest is not the same as offending, repayment observed only for approved applicants excludes rejected people, and performance ratings may reflect unequal opportunity or measurement. These are examples of selective labels and measurement bias.

Audit:

  • how the outcome is defined and who gets measured;
  • whether observation rates differ by group;
  • label delay, censoring, and missingness;
  • historical policies that created the data;
  • disagreement among human labelers;
  • proxy variables and feedback loops;
  • whether the model changes future labels.

Removing a protected attribute from features does not guarantee fairness. Names, locations, language, access patterns, and correlated socioeconomic features can act as proxies. At the same time, protected attributes may be necessary for evaluation. Separate “used for prediction,” “used for auditing,” and “used for a mitigation policy,” then govern access and retention accordingly.

Data limits can make the metric unreliable

Group averages hide intersectional failures. A model can look acceptable by gender and by age while performing poorly for an age-by-gender subgroup. Expand slices based on plausible harms, but manage multiple comparisons and avoid publishing unstable tiny-cell statistics that threaten privacy.

Missing demographic data creates a dilemma: without it, group disparities are difficult to measure; inferred attributes can be inaccurate and harmful. Do not silently treat unknown values as a group or use probabilistic demographic inference as ground truth. Document coverage, consent or authority, error in the attribute itself, and which conclusions remain unsupported.

Dataset representation is not the only concern. A balanced test set may estimate group metrics well but differ from the deployment population, so report both sampling design and any weights used. Performance can drift when policy, population, instrumentation, or human behavior changes.

A fairness assessment is a system assessment

NIST's AI Risk Management Framework treats fairness and harmful bias as part of risk management across design, development, deployment, use, testing, and evaluation. That lifecycle view matters: a model metric does not capture notification, accessibility, human overrides, delays, or the ability to challenge a decision.

Build an assessment around:

  1. intended use and prohibited use;
  2. affected people and plausible harms;
  3. data and label provenance;
  4. baseline and group confusion matrices;
  5. chosen constraint and rejected alternatives;
  6. mitigation experiments with utility trade-offs;
  7. human review, explanation, appeal, and fallback;
  8. production monitoring and incident ownership.

Engage domain experts and affected communities when defining harms. A candidate need not claim that one interview exercise completes that work; showing where statistical analysis ends is a strength.

Evaluate mitigations with controlled comparisons

Mitigation can happen before, during, or after training. Data collection and reweighting change the learning sample. Constrained optimization changes the training objective. Thresholding changes decisions after scoring. Product or process changes can improve access without changing the model.

For every candidate intervention, compare:

  • aggregate and group-specific task performance;
  • selection, TPR, FPR, precision, and calibration as relevant;
  • confidence intervals and sample counts;
  • intersectional and high-harm slices;
  • utility and workload at the chosen threshold;
  • temporal stability and drift;
  • user experience, appeals, and override outcomes.

Keep a no-model or current-policy baseline. A “fairer” model can still be worse than a simple rule or a redesigned process. Avoid collapsing the comparison into one composite score unless its weights have an accountable owner.

Common wrong answers and precise repairs

Wrong answerWhy it failsBetter response
“Remove the protected feature.”Proxies and biased labels remain.Audit features, labels, outcomes, and group metrics.
“Demographic parity is the fairness metric.”It encodes one definition and ignores labels.Choose a metric from the harm and decision context.
“Equalized odds makes outcomes fair.”It equalizes selected error rates relative to observed labels.Validate label meaning and the full process.
“Use different thresholds for each group.”Feasibility, stability, policy, and legality vary.Treat thresholding as a reviewed intervention.
“The gap is five points, so it is real.”Small groups can produce noisy estimates.Report counts and uncertainty.
“Accuracy stayed constant, so mitigation is free.”Costs and benefits can move between groups and error types.Report the complete decision scorecard.

A concise interview answer template

Begin: “I need the use case, affected groups, decision, label, and harm before choosing a fairness metric.” Then:

  1. Map the complete decision process and responsible owner.
  2. Audit label validity, selection, missingness, and group coverage.
  3. Report confusion matrices and score distributions by relevant slice.
  4. Choose a metric tied to the harm and show conflicting metrics numerically.
  5. Compare data, model, threshold, and process mitigations on held-out data.
  6. Review legal, policy, privacy, and operational constraints with qualified owners.
  7. Monitor outcomes, overrides, appeals, drift, and incidents after launch.

That answer treats fairness as a measurable product responsibility while respecting what a metric cannot settle.

Sources and Further Reading

Sources checked September 13, 2026. All group counts, rates, thresholds, and product scenarios are synthetic.