Expand description
Fisher’s exact test.
Implements a 2×2 Fishers exact test. Use this to test the independence of two categorical variables when the sample sizes are small.
For an approachable explanation of Fisher’s exact test, see Fisher’s exact test of independence by John H. McDonald in the Handbook of Biological Statistics.
The test is computed using code ported from Øyvind Langsrud’s JavaScript implementation at http://www.langsrud.com/fisher.htm, used with permission.
Structs§
- Fishers
Exact Pvalues FishersExactPvalues
holds the pvalues calculated by thefishers_exact
function.- TooLarge
Value Error TooLargeValueError
is returned byfishers_exact
when the input observed table contains values too large. Currently “too large” is values greater thanstd::i32::MAX
. Note that for large sample sizes tests other than Fisher’s exact test of are more appropriate to determine statistical independence.
Functions§
- fishers_
exact - Computes the Fisher’s exact pvales to determine if there are nonrandom associations between two categorical variables, in a two by two contingency table.