Statistical tests
Fisher's exact test
Implemented
statistics.fisher_exact_testDefinition
Exact test of association for a 2×2 table from the hypergeometric distribution; preferred over χ² when expected counts are small.
Formula
P = Σ hypergeometric probabilities of tables as or more extreme
Range: p in [0, 1]
Inputs and outputs
- table: 2×2 table of counts
- alternative: two-sided, less or greater
Returns: result object
Assumptions
No assumptions beyond valid, aligned inputs of the documented types.
Limitations
No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.
Python API
import evalsuite as es
es.fisher_exact_test(table2x2)References
- Fisher RA. On the interpretation of χ² from contingency tables, and the calculation of P. J R Stat Soc. 1922;85(1):87-94.