Fisher’s exact test
Hypothesis tests · Method and input reference
Nonnegative integer counts. Fisher and McNemar require 2×2. McNemar uses the exact binomial test for paired binary outcomes. Synthetic example: Adverse event / no event in two independent arms of 120 people; a 2×2 count table.
Open calculator · Compare methods in the decision matrix
When to consider it
- Test association in an independent-samples 2×2 count table using Fisher’s exact test.
Assumptions and scope
- Observations must be independent between subjects; repeated rows from one subject are not independent samples.
- Use the outcome and predictor coding required by the calculator; review missing data and model diagnostics.
Required inputs
- Observed count matrix — Numeric observations; preserve the row and column structure described above.
Review missing values and data coding before running. Sample inputs are synthetic teaching examples.
Implementation
Lifescio validates inputs and formats results; listed functions are the principal calculation routines, not an exhaustive transitive dependency list.
- scipy 1.15.3: scipy.stats.fisher_exact
These are pinned library versions; saved results record the versions actually used at runtime.