# Chi Square Calculator

A chi square is used to investigate if distributions of categorical variables vary from one another. It is a hypothesis test which is used to compare the observed values and the expected value and find the goodness of fit. This calculator will help you to find the statistics χ^{2} value.

## χ^{2} Test Statistics Calculation

A chi square is used to investigate if distributions of categorical variables vary from one another. It is a hypothesis test which is used to compare the observed values and the expected value and find the goodness of fit. This calculator will help you to find the statistics χ^{2} value.

Code to add this calci to your website

#### Formula:

Chi Square Statistic = { ( Observed Value- Expected Value )^{2} / ( Expected Value ) }
In other words, chi square is the difference of the expected and observed data. It is expressed as numerical value not as ratio or percentage.

### Example:

If the test gives the observed value as 40 and expected value as 25.

#### Chi Square (χ^{2}) :

(40-25)^{2} / 25

= 9

Hence, chi square (χ^{2}) is 9