Skip to content

grzegorz-karas/chi-square-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chi-square-test (chi-squared-test)

The $\chi^2$-test is a statistical method to test hypothesis, where random variable follows multinomial distribution. It tests a null hypothesis stating that the frequency distribution of certain events is consistent with a particular theoretical distribution.

There are three types of hypothesis testing

  1. Goodness of fit.
  2. Homogenity.
  3. Independence.

Please read details in the manuscript.pdf.

Content description

The module chi_square.py consist of functions that help to:

  1. Calcualte cumulative $\chi^2$ distrubution with or without noncentral parameter.
  2. Perform the $\chi^2$ test for all three types of hypothesis.
  3. Find noncentral parameter for defined $\chi^2$ quantile and target power.
  4. Calculate sample size for given target power.
  5. 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.

Disclaimer

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published