statsmodels.stats.gof.gof_binning_discrete¶
-
statsmodels.stats.gof.gof_binning_discrete(rvs, distfn, arg, nsupp=
20
)[source]¶ get bins for chisquare type gof tests for a discrete distribution
Notes
The results can be used for a chisquare test
(chis,pval) = stats.chisquare(freq, expfreq)
originally written for scipy.stats test suite, still needs to be checked for standalone usage, insufficient input checking may not run yet (after copy/paste)
- refactor: maybe a class, check returns, or separate binning from
test results
- todo :
optimal number of bins ? (check easyfit), recommendation in literature at least 5 expected observations in each bin
Last update:
Dec 16, 2024