Fisher exact and Fisher-Freeman-Halton test
fisher_exact_testExact p-value for a contingency table of counts. 2x2: Fisher exact test (two-sided, greater or less, as R fisher.test). Larger r x c tables (for example 3 variants x converted/not, or 4 x 4 survey tables): Fisher-Freeman-Halton exact test by a network algorithm. Also returns Pearson chi-square and how many cells have expected counts below 5, so you can see when the chi-square approximation is unsafe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Rows of counts, for example [[12, 488], [25, 475]] (rows = groups, columns = outcomes). | |
| alternative | No | One-sided options apply to 2x2 only; greater = odds ratio above 1. | two-sided |