pub fn chi2_independence_py(
py: Python<'_>,
observed: &Bound<'_, PyArray2<i64>>,
) -> PyResult<Py<PyAny>>Expand description
Chi-square test for independence (contingency table).
Tests whether two categorical variables are independent using a contingency table of observed frequencies.
Parameters: observed: 2D array of observed frequencies (contingency table)
Returns: Dictionary with ‘statistic’, ‘pvalue’, ‘df’, and ‘expected’