The
There are three types of hypothesis testing
- Goodness of fit.
- Homogenity.
- Independence.
Please read details in the manuscript.pdf.
The module chi_square.py consist of functions that help to:
- Calculate cumulative
$\chi^2$ distribution with or without noncentral parameter. - Perform the
$\chi^2$ test for all three types of hypothesis. - Find noncentral parameter for defined
$\chi^2$ quantile and target power. - Calculate sample size for given target power.
- Perform the
$\chi^2$ test and calculate the sample size for given target power.
Please see the test folder for checking how the functions shall be called.
Code was written on the basis of the following article
Guenther, W. (1977). Power and Sample Size for Approximate Chi-Square Tests. The American Statistician, 31(2), 83-85.