calculate the X2 and test whether the two attributes are independent at 5% level of significance
A chi-squared test, also written as "\\chi^2" test,is a statistical hypothesis test that is valid to perform when the test statistic is chi-squared distributed under the null hypothesis, specifically Pearson's chi-squared test and variants thereof. Pearson's chi-squared test is used to determine
whether there is a statistically significant difference between the expected frequencies
and the observed frequencies in one or more categories of a contingency table.
The formula for "\\chi^2" is given by-
"\\chi^2=\\sum\\dfrac{(O_f-E_f)^2}{E_f}"
Where "O_f=" Observed frequency of samples
"E_f=" Expected frequency of samples
At 5% level of significance, The value of "\\chi^2" test is generally lies between "0.1232 \\text{to} 0.6754"
It also depends upon the degree of freedom.
Comments
Leave a comment