Tutorials › Exam PA - Predictive Analytics › Uncertainty in Small-Group Fairness Estimates

Exam PA · Ethics, Bias, and Fairness · Tutorial 851 of 966

Uncertainty in Small-Group Fairness Estimates

Quantify uncertainty in group fairness metrics and communicate what small denominators do—and do not—show.

Advanced 13 min read

What You'll Learn

  • Identify the denominator that determines uncertainty for a group error rate
  • Calculate and interpret Wilson confidence intervals for a single group rate
  • Estimate uncertainty in the difference between two independent group rates
  • Recognize why zero observed events do not establish a zero underlying rate
  • Distinguish evidence of a disparity from a wide interval that leaves the comparison unresolved

Why Small-Group Fairness Estimates Need Uncertainty

A fairness audit may report that one group has a higher false-negative rate, false-positive rate, or selection rate than another. Those estimates describe the observed data, but they are not automatically precise estimates of the corresponding population rates. When a group has few relevant observations, changing the outcome for just one person can move its estimated rate substantially.

The denominator depends on the metric. A false-negative rate is calculated among people who actually have the positive outcome; a false-positive rate is calculated among people who actually have the negative outcome. Thus, the uncertainty in an error-rate estimate depends on the number of people in that group who meet the metric’s conditioning condition—not simply the group’s total size. The estimates also depend on how the data were selected and whether the recorded outcomes and group labels are appropriate for the audit.

Definition: For a group metric that is a rate, let \(n\) be the number of relevant observations in the denominator and let \(x\) be the number meeting the event definition in the numerator. The observed rate is \(\hat p=x/n\). Under a binomial model, \(x\) is the number of events in \(n\) independent observations, each with the same event probability \(p\). The estimate \(\hat p\) is subject to sampling uncertainty; it is not necessarily the population rate \(p\).

For example, a hypothetical audit of false-negative rates should use, for each group, the count of people who actually had the positive outcome as \(n\), and the count of those people classified negatively as \(x\). The reported rate is \(x/n\). If the audit instead divides false negatives by everyone in the group, it has changed the metric as well as the denominator. Correctly identifying the denominator is a necessary first step in quantifying uncertainty.

Wilson Intervals for a Group Rate

A common interval for a binomial rate is the Wilson score interval. It is generally preferable to the simple normal interval \(\hat p\pm z\sqrt{\hat p(1-\hat p)/n}\) when counts are small or the observed rate is near zero or one. The simple normal interval can extend below zero or above one, and can give a zero-width interval when every observation has the same result. Wilson intervals stay within the possible rate range.

Result: For \(x\) events among \(n\) independent Bernoulli observations, \(\hat p=x/n\), and a two-sided confidence level based on the standard-normal critical value \(z\), the Wilson interval is
$$ \frac{\hat p+\frac{z^2}{2n}}{1+\frac{z^2}{n}} \ \pm\ \frac{z}{1+\frac{z^2}{n}} \sqrt{\frac{\hat p(1-\hat p)}{n}+\frac{z^2}{4n^2}}. $$
For a 95% interval, use \(z=1.96\). The lower and upper endpoints are the displayed center minus and plus the displayed half-width, respectively.

The Wilson interval is an interval for a binomial probability under the stated sampling model. Its usual interpretation is that a procedure constructed this way would cover the fixed probability \(p\) in about 95% of repeated samples, when the model assumptions hold. It does not mean there is a 95% probability that the fixed \(p\) lies in this particular interval. Nor does the interval account for biased labels, selective observation of outcomes, or other limitations in the audit data.

Why the Wilson Formula Has This Form

The Wilson interval is obtained by inverting a score test for a candidate rate \(p_0\). Under the binomial model, the standard error used by that test is calculated at the candidate value \(p_0\), rather than at the observed rate. A candidate value remains in the 95% interval when its score statistic is no more than \(z\) standard errors from the observed rate:

$$ \left|\frac{\hat p-p_0}{\sqrt{p_0(1-p_0)/n}}\right|\leq z. $$

Squaring both sides and multiplying by the positive denominator gives

$$ n(\hat p-p_0)^2\leq z^2p_0(1-p_0). $$

Expanding and collecting terms in \(p_0\) gives the quadratic inequality

$$ (n+z^2)p_0^2-(2n\hat p+z^2)p_0+n\hat p^2\leq 0. $$

The two roots of this quadratic are the interval endpoints. Applying the quadratic formula and dividing the numerator and denominator by \(n\) gives the Wilson center and half-width in the result above. The candidate-rate standard error is what produces the adjustment involving \(z^2\); the Wilson interval is not obtained merely by substituting \(\hat p\) into the ordinary normal standard error.

Worked Example: A False-Negative Rate with Ten Relevant Cases

In a hypothetical audit, 2 of 10 people in a group who actually had a qualifying outcome were classified negatively by a model. Estimate the group’s false-negative rate and calculate a 95% Wilson interval. Use \(z=1.96\), so \(z^2=3.8416\).

Method. The denominator is the 10 people with the qualifying outcome, and the numerator is the 2 classified negatively. Thus \(n=10\), \(x=2\), and \(\hat p=2/10=0.2000\).

The Wilson denominator is \(1+z^2/n=1+3.8416/10=1.38416\). The center is \((0.2000+3.8416/(2\cdot10))/1.38416 =(0.2000+0.19208)/1.38416 =0.39208/1.38416\approx0.2833\).

The quantity under the square root is \(0.2000(0.8000)/10+3.8416/(4\cdot10^2) =0.016000+0.009604=0.025604\). Its square root is approximately \(0.1600125\). The half-width is \(1.96(0.1600125)/1.38416\approx0.226581\), which rounds to \(0.2266\).

The endpoints, calculated before rounding, are approximately \(0.28326-0.22658=0.05668\) and \(0.28326+0.22658=0.50984\). Answer: The estimated false-negative rate is \(0.2000\), and the 95% Wilson interval is \([0.0567,0.5098]\), rounded to four decimal places. This interval is wide: the ten observations do not pin down the underlying rate closely. The calculation avoids treating the observed rate as known without error.

Uncertainty in a Difference Between Two Group Rates

A group comparison often focuses on a difference, such as \(\hat p_1-\hat p_2\). The sign indicates which observed rate is larger, while the interval for the difference indicates how uncertain that contrast is under the model. For independent groups, an approximate unpooled standard error uses each group’s own observed rate and denominator.

Result: Suppose two independent groups have binomial event counts \(x_1,x_2\), denominators \(n_1,n_2\), and observed rates \(\hat p_1=x_1/n_1\), \(\hat p_2=x_2/n_2\). A large-sample Wald interval for \(p_1-p_2\) is
$$ (\hat p_1-\hat p_2)\ \pm\ z\sqrt{\frac{\hat p_1(1-\hat p_1)}{n_1} +\frac{\hat p_2(1-\hat p_2)}{n_2}}. $$
This approximation relies on independent observations within and between groups and adequate counts for a normal approximation. It can be unreliable with small counts or rates near zero or one; an interval that includes values outside \([-1,1]\) is also a warning not to treat the approximation as a sensible rate-difference interval.

The standard error adds the two estimated variances because the group estimates are independent. The standard error is not calculated from the total sample size alone: a small denominator can dominate the uncertainty even when the other group is large. If both groups are measured on the same individuals or otherwise dependent observations, the independence formula does not apply as written.

Worked Example: Comparing False-Negative Rates with Unequal Denominators

A hypothetical audit observes 7 false negatives among 14 people with the qualifying outcome in Group A, and 28 among 70 such people in Group B. Estimate the difference \(p_A-p_B\) and calculate an approximate 95% interval using the unpooled Wald formula. Treat the two groups as independent.

Method. The observed rates are \(\hat p_A=7/14=0.5000\) and \(\hat p_B=28/70=0.4000\). The estimated difference is \(0.5000-0.4000=0.1000\).

The estimated variance of the first rate is \(0.5000(1-0.5000)/14=0.2500/14=0.0178571\). For the second rate it is \(0.4000(1-0.4000)/70=0.2400/70=0.0034286\). Their sum is \(0.0212857\), so the standard error is \(\sqrt{0.0212857}\approx0.145896\).

For 95% confidence, the margin is \(1.96(0.145896)\approx0.285957\). The interval is \(0.1000\pm0.285957=[-0.185957,0.385957]\), or \([-0.1860,0.3860]\) to four decimal places.

Interpretation. Group A’s observed rate is 0.1000 higher, but the approximate interval includes zero and also includes differences in either direction. These data do not give precise evidence about the direction or size of the population difference. This does not prove the rates are equal. The calculation avoids the mistake of interpreting the 0.1000 observed difference by itself as a stable disparity.

Zero Events, Wide Intervals, and Careful Conclusions

A zero numerator is especially easy to misinterpret. If no events are observed, the sample rate is zero, but a nonzero underlying rate can still be consistent with the data. The Wilson interval makes this visible: for \(x=0\), the lower endpoint is zero but the upper endpoint is positive. The size of that upper endpoint depends on the denominator.

Worked Example: No Observed Errors in a Small Group

In a hypothetical audit, none of 12 relevant cases in a group is classified incorrectly. Calculate the observed error rate and its 95% Wilson interval, using \(z=1.96\). Explain what the zero numerator does and does not establish.

Method. Here \(x=0\), \(n=12\), and \(\hat p=0/12=0.0000\). The Wilson center is \((0+3.8416/(2\cdot12))/(1+3.8416/12)\). The numerator is \(3.8416/24=0.1600667\); the denominator is \(1+0.3201333=1.3201333\). The center is approximately \(0.12125\).

The square-root term is \(\sqrt{0(1-0)/12+3.8416/(4\cdot12^2)} =\sqrt{3.8416/576} =\sqrt{0.0066694}\approx0.081666\). The half-width is \(1.96(0.081666)/1.3201333\approx0.12125\). Thus the lower endpoint is approximately zero and the upper endpoint is approximately \(0.24250\).

Answer: The observed error rate is \(0.0000\), and the 95% Wilson interval is \([0.0000,0.2425]\), rounded to four decimal places. The observations show no errors in these 12 cases; they do not establish that the group’s underlying error probability is zero. The calculation avoids reporting zero observed errors as proof of error-free performance.

Distinguishing Disparity from Imprecision

An observed gap and the uncertainty around it answer different questions. The gap describes the sample. The interval describes a range of population differences compatible with the data under the model and approximation used. A wide interval that includes zero signals that the data do not resolve the direction of the difference with that procedure; it does not establish equality or fairness. Conversely, a narrow interval around a nonzero difference is stronger evidence of a disparity under the stated assumptions, but does not by itself establish why the disparity exists or whether a particular policy or model is fair.

In a report, pair the point estimate with its denominator and uncertainty interval. For example, “The estimated false-negative rate was 20.0% (2 of 10 relevant cases); its 95% Wilson interval was 5.7% to 51.0%.” This is more informative than saying only “the rate was 20%.” It also makes the small denominator visible to decision-makers.

Intervals quantify sampling uncertainty, not every source of uncertainty or error. They do not correct for unrepresentative data, biased outcome labels, missing outcomes that depend on group membership, or a metric definition that fails to match the decision context. If observations are clustered—for example, several records belong to the same person—the independent-binomial calculation can understate uncertainty. Audit design and the limitations of the data therefore remain essential to interpretation.

  • Report the denominator. State the numerator and the population on which the rate is conditioned.
  • Do not rank groups from noisy point estimates alone. A small apparent gap may be unstable, especially when one denominator is small.
  • Do not interpret overlap of separate rate intervals as a formal test of the difference. If the question is about a contrast, calculate an interval for the contrast, using a method appropriate to the data.
  • Do not treat inclusion of zero as proof of equality. It indicates that the interval procedure does not rule out zero at its stated level.
Key takeaway: A fairness estimate from a small group can be highly uncertain even when its point estimate looks striking. Show the relevant count, use an interval suited to the metric and sample size, and distinguish “no precise evidence of a difference” from “evidence that there is no difference.”

Check Your Understanding

For numerical questions, use \(z=1.96\) for 95% intervals and round interval endpoints to four decimal places.

  1. A hypothetical audit finds 5 errors among 20 relevant cases in one group. Find the observed rate and its 95% Wilson interval. (Answer: rate \(0.2500\); interval approximately \([0.1119,0.4687]\).)
  2. Independent groups have 6 errors among 15 relevant cases and 18 among 60. Estimate the first rate minus the second and calculate the unpooled approximate 95% interval. (Answer: difference \(0.1000\); standard error approximately \(0.1396\); interval approximately \([-0.1737,0.3737]\).)
  3. No events are observed among 12 relevant cases. Give the 95% Wilson interval and explain why it does not justify saying the underlying probability is zero. (Answer: \([0.0000,0.2425]\); zero events were observed, but positive underlying rates remain compatible with this small sample.)
  4. A report gives Group C’s error rate as 3 of 8 and Group D’s as 30 of 100, then says C has a reliably higher population rate because \(0.3750>0.3000\). Identify the main inferential problem and one useful reporting improvement. (Answer: the point estimates alone do not establish a reliable population difference, particularly with only 8 relevant cases in C; report the counts and an uncertainty interval for the rate difference.)
Clinical Biostats