# Chi Square Formula

Chi Square is one of the most useful non-parametric statistics. Chi Square is used in data consist of people distributed across categories, and to know whether that distribution is different from what would expect by chance.

• A very small Chi Square test statistic means that your observed data fits your expected data extremely well.
• A very large Chi Square test statistic means that the data does not fit very well. If the chi-square value is large, you reject the null hypothesis.

A Chi Square is one way to show a relationship between two categorical variables. There are two types of variables in statistics: numerical variables and non-numerical variables. The value can be calculated by using the given observed frequency and expected frequency. The Chi Square is denoted by X2 and the formula is:

$\LARGE X^{2}=\sum \frac{(O-E)^{2}}{E}$

Where,

O = Observed frequency
E = Expected frequency
$\sum$ = Summation
$X^{2}$ = Chi Square value

### Solved Examples

Question 1: Calculate the chi-square value for the following data:
 Male Female Full Stop 6(observed) 6.24 (expected) 6 (observed) 5.76 (expected) Rolling Stop 16 (observed) 16.12 (expected) 15 (observed) 14.88 (expected) No Stop 4 (observed) 3.64 (expected) 3 (observed) 3.36 (expected)

Solution:

Now calculate Chi Square using the following formula:
$X^{2}=\sum \frac{(O-E)^{2}}{E}$

Calculate this formula for each cell, one at a time. For example, cell #1 (Male/Full Stop):

Observed number is: 6
Expected number is: 6.24

Therefore, $\frac{(6-6.24)^{2}}{6.24} = 0.0092$

Continue doing this for the rest of the cells, and add the final numbers for each cell together for the final Chi Square number. There are 6 total cells, so at the end you should be adding six numbers together for you final Chi Square number.

Solution: