pub fn chisquare_py(
py: Python<'_>,
observed: &Bound<'_, PyArray1<f64>>,
expected: Option<&Bound<'_, PyArray1<f64>>>,
) -> PyResult<Py<PyAny>>Expand description
Chi-square goodness-of-fit test
Tests whether observed frequencies differ from expected frequencies.
Parameters:
- observed: Observed frequencies (integers or floats)
- expected: Expected frequencies (optional, defaults to uniform)
Returns:
- Dict with ‘statistic’, ‘pvalue’, ‘dof’ (degrees of freedom)