Equal Opportunity Difference Calculator
Fairness metrics for a classifier across two groups: the difference in true-positive rates (equal opportunity) and in false-positive rates (equalised odds), from each group’s confusion counts.
A model satisfies equal opportunity when the people who deserve a positive outcome get one at the same rate in every group — equal true-positive rates.
How the equal opportunity difference calculator works
A model satisfies equal opportunity when the people who deserve a positive outcome get one at the same rate in every group — equal true-positive rates. Equalised odds adds equal false-positive rates. Enter the confusion counts for each group; the differences in percentage points, and their ratios, show where the model treats groups differently. The disparate-impact calculator covers the selection-rate view of the same question.
Formula: TPR = TP ÷ (TP + FN); FPR = FP ÷ (FP + TN); EOD = TPR_A − TPR_B
Worked examples
| Inputs | Equal opportunity difference (TPR A − TPR B) | Note |
|---|---|---|
| A finds 80% of positives, B 70% | 10 pp | +10 pp — investigate |
| Equal rates | 0 pp | 0 pp |
| B favoured | -25 pp | −25 pp |
FAQFrequently asked questions
Which fairness metric should I use?
It depends on the harm. Equal opportunity fits cases where missing a deserving person is the main harm (loans, hiring); equalised odds adds false positives, which matter when a wrong positive hurts (fraud flags, bail). No classifier can satisfy every definition at once when base rates differ.
What gap is acceptable?
There is no legal number for TPR gaps the way the four-fifths rule exists for selection rates; practitioners often flag differences above 5–10 percentage points or ratios outside 0.8–1.25. Document the choice.
How do I fix a gap?
Group-specific thresholds equalise rates directly but may be prohibited in some domains; reweighting training data, adding features that explain the difference, or constrained training are the usual alternatives.
Why do the counts need actual positives and negatives in each group?
Because the rates are conditional on the true outcome; with no positives in a group its TPR is undefined, and a tiny group gives a noisy rate — report intervals when groups are small.
Where these figures come from
- Vaswani et al. (2017) — Attention Is All You Need — the transformer architecture the memory arithmetic follows
- Kaplan et al. (2020) — Scaling Laws for Neural Language Models — the compute relationship used for training estimates
- Hoffmann et al. (2022) — Training Compute-Optimal Large Language Models — the tokens-per-parameter guidance ("Chinchilla")
- IEEE 754 — Standard for Floating-Point Arithmetic — the numeric formats behind bytes per parameter
- National AI Centre — Australia's national AI body
Last checked: September 2026. The relationships here are architectural, not vendor-specific: bytes per parameter follow the numeric format, KV-cache size follows the transformer definition, and token-per-word ratios come from published tokeniser behaviour.