Statistical tests
Chi-square test of independence
Implemented
statistics.chi_square_testDefinition
Pearson's χ² test of independence for a contingency table, with Yates' continuity correction for 2×2 tables by default.
Formula
χ² = Σ (O − E)² / E, E = row total · column total / n
Range: p in [0, 1]
Inputs and outputs
- table: contingency table of counts
- correction: Yates' correction for 2×2
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.chi_square_test(table)References
- Pearson K. On the criterion that a given system of deviations from the probable... Philosophical Magazine. 1900;50(302):157-175.