Skip to content
EvalSuite
Documentation menu

Statistical tests

Fisher's exact test

Implementedstatistics.fisher_exact_test

Definition

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

PythonSince v0.2.0
import evalsuite as es

es.fisher_exact_test(table2x2)

References

  1. Fisher RA. On the interpretation of χ² from contingency tables, and the calculation of P. J R Stat Soc. 1922;85(1):87-94.

Implementation status