When to use it
Use when comparing paired binary outcomes on the exact same subjects or prompts.
Required Inputs
- Paired 2x2 table [[Both Yes, A Yes / B No], [A No / B Yes, Both No]]
Evaluate paired or matched binary classification shifts using McNemar's test with continuity correction.
Run this test live in StatLab npm i @statlab/coreUse when comparing paired binary outcomes on the exact same subjects or prompts.
χ² = (|b - c| - 1)² / (b + c)
from statsmodels.stats.contingency_tables import mcnemar
res = mcnemar([[745, 35], [90, 130]], exact=False, correction=True)
print(f"p={res.pvalue:.5f}")
mcnemar.test(matrix(c(745, 90, 35, 130), nrow=2))
import { mcnemarTest } from '@statlab/core';
const res = mcnemarTest([[745, 35], [90, 130]]);
Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.
Explore VoxelPulse →Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.
Explore VoxelAssurance →Explore static calculators across the StatLab inference engine suite.