Pass-rate delta
+7.0 pts
INSTRUMENT · EVAL
Run McNemar's paired significance test on two eval runs scored on the same items, with exact and chi-square p-values and a CI on the pass-rate difference.
Two-sided p-value
0.0026
Exact binomial test · 20 discordant pairs · recommended under 25.
Pass-rate delta
+7.0 pts
Interval (Newcombe)
[+2.7, +11.6] pts
Add both agreement counts (both passed, both failed) to size the pass-rate delta and its confidence interval.
All four significance tests on the discordant cells.
| Test | Statistic | Two-sided p |
|---|---|---|
| Exact binomial · recommended | min = 3, n = 20 | 0.0026 |
| Mid-p | min = 3, n = 20 | 0.0015 |
| Chi-square (1 df) | χ² = 9.80 | 0.0017 |
| Chi-square, continuity-corrected | χ² = 8.45 | 0.0037 |
95% interval on the pass-rate delta (candidate minus baseline), in percentage points.
| Method | Lower | Upper |
|---|---|---|
| Newcombe (1998) · recommended | +2.7 | +11.6 |
| Wald (large-sample) | +2.7 | +11.3 |
McNemar's test compares two runs that scored the same items pass or fail. Lay the paired results in a 2x2 table: a items both runs passed, d items both failed, b items the candidate passed and the baseline failed, and c items the candidate failed and the baseline passed. The items both runs agreed on say nothing about which run is better, so the test reads only the two discordant cells, b and c.
Under the null hypothesis of no difference, each discordant item is a fair coin: it was equally likely to flip either way. So min(b, c) follows a binomial distribution Bin(b + c, 0.5), and the exact two-sided p-value is 2 × P(X ≤ min(b, c)). This calculator sums that probability in log space, so it stays accurate even when b + c is large.
The mid-p variant subtracts half the probability mass at min(b, c). It is less conservative than the exact test and sits closer to the nominal error rate on average.
The chi-square form is (b − c)² / (b + c) on one degree of freedom. Edwards' continuity correction replaces the numerator with max(0, |b − c| − 1)², which pulls the statistic toward the null and never reports evidence the raw gap does not support. The chi-square approximation is trustworthy once the discordant count b + c reaches about 25; below that, the exact binomial test is the one to trust, following the mlxtend evaluation guidance in the Sources below.
When you also enter the agreement counts a and d, the calculator reports the pass-rate difference delta = (b − c) / N, where N = a + b + c + d, with its confidence interval. The large-sample Wald interval is delta ± z × (1/N)·√(b + c − (b − c)² / N), which you can reproduce by hand. Its recommended companion is Newcombe's (1998) score interval for paired proportions, built from two Wilson intervals and the paired correlation. Newcombe's interval stays well behaved when the discordant count is small, the regime where the Wald interval undercovers.
Worked example. Two runs over 200 shared items. The candidate passed 174 of 200 (87.0%), the baseline passed 160 (80.0%), a raw gap of +7 points. 180 items agreed, so the test lives on the 20 that disagreed: b = 17 the candidate flipped to pass, c = 3 it flipped to fail, a net of 14.
Both intervals clear zero and the exact p is below 0.05, so the +7-point gain is resolved at 95%. The full procedure, including the unpaired test that reverses this verdict on the identical data, is worked at is your eval difference statistically significant.
Formula: exact p = 2 · P(X ≤ min(b, c)), X ~ Bin(b + c, 0.5)
b and c are the disagreements; a and d are the agreements. Only b and c drive the p-value, because McNemar's test discards every item both runs scored the same way. Enter a and d to also get the pass-rate delta and its confidence interval. Orientation matters: b is the count of items the candidate passed and the baseline failed, so a positive delta means the candidate won.
Use the exact binomial test when the discordant count b + c is under about 25, and chi-square above that. Below 25 the chi-square distribution is a poor approximation, so the exact p is the one to report. The calculator marks which test applies to your counts.
Because both runs scored the same items, the two samples are paired. Treating them as independent carries the full spread of item difficulty into both rates and can turn a real gain into a non-significant result. Pairing subtracts the shared difficulty and measures only the disagreements. The side by side comparison is worked at is your eval difference statistically significant.
A confidence interval that spans zero means the data cannot rule out no difference at your confidence level. The delta is unresolved: add more items or a higher-power design before you write it into a release gate. A significant p with a tiny interval is a real effect that may still be too small to ship on.