mcnemar_exact_test
Run an exact binomial test on discordant pairs in paired 2x2 data to compare correlated proportions, providing a small-sample-safe alternative to the chi-squared approximation.
Instructions
Exact version of mcnemar_test: an exact binomial test (p=0.5) on
the discordant pairs instead of the chi-squared approximation -- the
small-sample-safe alternative mcnemar_test's own warning points to,
the same relationship fisher_exact_test has to
chi_square_independence. statistic is b-c (the raw
discordant-pair imbalance); the p-value is two-tailed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | significance level for the test (and any confidence interval); default 0.05 | |
| table | Yes | 2x2 table as [[a, b], [c, d]], same layout as mcnemar_test -- raw non-negative integer counts |