[][src]Crate fishers_exact

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

FishersExactPvalues

FishersExactPvalues holds the pvalues calculated by the fishers_exact function.

TooLargeValueError

TooLargeValueError is returned by fishers_exact when the input observed table contains values too large. Currently "too large" is values greater than std::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.