Skip to content

Kesavan-Raman/Chi-Square-Test---Statistical-Approach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Chi-Square Test - Statistical Approach

This is a simple Python script that demonstrates how to perform a chi-square test using a statistical approach. The script takes two input CSV files: one containing the observed frequencies and one containing the expected frequencies. It then calculates the chi-square statistic and the corresponding p-value, and outputs the results to the console.

Requirements

  • Python 3.x
  • NumPy
  • Pandas

Usage

  1. Clone this repository or download the chisquare.py file.
  2. Install the required packages using pip: pip install numpy pandas
  3. Prepare two CSV files with the observed and expected frequencies. The CSV files should have a single column each, and the same number of rows.
  4. Run the script with the following command: python chisquare.py path/to/observed.csv path/to/expected.csv

Example: python chisquare.py data/observed.csv data/expected.csv

License

This code is released under the MIT License. See the LICENSE file for more information.

Acknowledgments

This script was inspired by the following resources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published