test how well a given set of data fits a specified distribution (Goodness of Fit)
test the independence of two variables
It takes a test statistic
where refers to observed frequencies, and refers to expected frequencies.
If we’re using test statistic with the distribution, we write
where is the number of degrees of freedom, and is the level of significance.
Value of
In a goodness of fit test, is the number of classes minus the number of restrictions.
In a test for independence for two variables, if your contingency table has rows and columns,
Interpretation
If the value of is low, then this means there’s a less significant difference between the observed and expected frequencies. The higher is, the more significant the differences become.