# Simple Chi-Square

This is a simple test of assication
This test involves only four cells and is often referred to as a 2 x 2 contingency table.
This table contains two samples and both are divided into two values of a second variable.
This test tells us whether there is an association between the 2 variables

This test works by taking each of the values and comparing it with what would have been there is the null hypothesis were true. (The null hypothesesis table - no association)

We find the difference between the four values and the large the differences, the more our distributions differ from one another.

Note: The 2 sample sizes do not have to be the same size.

X2 (X squared) value is then looked up in a stats table

The degrees of freedom is the number of categories.

### Accuracy

When calculating simple chi-square the value is 0.5 is subtracted from the observed frequenceis
The incorporation of this step is known as Yates correction.
It is the correlation for continuity which is sometimes omitted
However it improves the accuracy of the test and produces a slightly more conservative estimate for X2
It should always be included in calculation from 2x2 contingency tables and is essential when samples are small (less than 25)