# Chi-squared and Fisher's exact tests on a contingency table, version 1.0.0

contingency-tests\@1.0.0: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

## What this page can and cannot show

**Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.**

Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.

[Every version of this method](https://www.drybench.com/methods/m/contingency-tests) · [Every method](https://www.drybench.com/methods/m) · [What the levels mean](https://www.drybench.com/methods/levels)

## Version 1.0.0

**Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.** `contingency-tests@1.0.0`

[What this page can and cannot show](#what-this-page-can-and-cannot-show)

### What was checked

Checked against R 4.4.3 (chisq.test with and without Yates; fisher.test with workspace = 2e8) on 30 cases of the 0.11.0 fixture (28 tables analysed, 2 refused): X², the Yates statistic and their p within 1e-8 relative, Fisher's 2 × 2 p within 1e-8 and r × c p within 1e-6 relative, expected counts within 1e-9 relative, the conditional maximum-likelihood odds ratio and its interval within 1e-8 relative of a transcription of fisher.test's 2 × 2 internals at uniroot tol = 1e-12 (fisher.test's own values recorded beside them); the table, totals, refused cells and withheld states exact (2026-10-13).

Cases: no case set is linked to contingency-tests\@1.0.0.

### Not yet recorded for this version

- Equation: not recorded for contingency-tests\@1.0.0.
- Constants: not recorded for contingency-tests\@1.0.0.
- Worked example: not recorded for contingency-tests\@1.0.0.
- Prediction error: not recorded.

### What was not checked

What was not checked: not recorded for contingency-tests\@1.0.0. Its absence does not mean everything was checked.

### Changes

No correction is logged for contingency-tests\@1.0.0.

## Tools that use it

- [`stats_contingency_table`](https://www.drybench.com/methods/tools/stats-contingency-table)

## Cite this version

Chi-squared and Fisher's exact tests on a contingency table. Drybench; contingency-tests\@1.0.0; [https://www.drybench.com/methods/m/contingency-tests/1.0.0](https://www.drybench.com/methods/m/contingency-tests/1.0.0) (accessed \[date\]).
