Skip to content

Correcting results

Rogan-Gladen correction

result = vc.correct_rate(audit, judge_verdicts)  # verdicts
result = vc.correct_rate(audit, n_items=3000, n_pass=2460)  # or counts

The corrected rate is

\[ \hat\theta = \frac{\hat q + \hat s_p - 1}{\hat s_e + \hat s_p - 1}, \]

where \(\hat q\) is the judge's pass rate. It removes the judge's bias whether the judge is lenient or strict.

Uncertainty

Two methods propagate the uncertainty of \(\hat q\), \(\hat s_e\) and \(\hat s_p\):

method How When
"delta" (default) First order variance formula, normal interval Fast, deterministic and slightly conservative. The recommended default
"bootstrap" Resamples the evaluation and the audit, percentile interval Useful to check the delta interval, for asymmetric intervals near 0 or 1, and for clustered audits

In the simulations of benchmarks/bench_coverage.py (3000 answers, audits of 200 to 400 answers), nominal 95 % delta intervals covered the truth in 95.5 % to 96.8 % of repetitions, and bootstrap percentile intervals in 92.7 % to 95.8 %. The naive interval, which ignores the judge's errors, covered the truth in 0 % of repetitions when the judge was biased.

When the correction fails

If the judge is no better than chance on the audit (Youden's index at most zero), its verdicts carry no information and NonInformativeJudgeError is raised. A small positive Youden's index gives a valid but very wide interval.

Prediction-powered correction

If the audited answers are a uniform random subsample of the evaluated answers, use

human = np.full(n_items, np.nan)
human[audited_positions] = human_labels
result = vc.ppi_rate(judge_verdicts, human)

It combines the judge's rate on all answers with the average human-minus- judge difference on the audited ones. It does not model sensitivity and specificity, works with any judge, and is usually more precise than the Rogan-Gladen correction in this design.

The result object

CorrectedRate provides the estimate, the naive rate, the bias, the standard error and the interval, plus one-sided bounds (lower_bound, upper_bound) and p-values (pvalue_above, pvalue_below) used by the decision functions.