Chi-square Test

Definitions

The chi-square test-statistic

χc2=∑(Ei−Oi)2Ei

where the subscript “c” is the degrees of freedom. “O” is observed value and E is expected value.

Chi-square distribution

The chi-square distribution (or the chi-squared distribution) is a special case of the gamma distribution.
A chi square distribution with n degrees of freedom is equal to a gamma distribution with a = n / 2 and b = 0.5 (or β = 2).
chi-sqrt-distribution.png300

Relationship between χ2 and χ2 distribution

You can compare χ2 to the critical value from the χ2 distribution with df degrees of freedom and the selected confidence level p.

Applications

Pearson's chi-squared test is used to assess three types of comparison

How to determine df

Rules