4.4 The Chi-squared test for independence.

Write a hypothesis:

Null Hypothesis:             H0: the data sets are independent
Alternative Hypothesis:  H1: the data sets are not independent (ie. dependent)


Calculate the chi-squared value on the Calulator:

Calculator Sheet
    => [menu]
        => 7: Matrix
            => 1: Create
                => 1: Matrix 
                        ~ type in number of columns and rows (TAB is useful for this)
                        => [enter]
                            ~type in values from table
                            => [enter]
                                => [ctrl] [var] [A] [enter]

                                    => [menu]
                                        => 6: Statistics
                                            => 7: Stat tests
                                                => 8: Chi squared 2-way test

                    magic! on your screen will be the chi-squared vale and the p-value


Conclusion:

Comparing chi-squared value

If your chi-squared calculated value is less than your chi-squared critical value you accept the null hypothesis. 

                    chi-squared calculated < chi-squared critical          accept  H0 : the data sets are independent

If your chi-squared calculated value is greater than your chi-squared critical value you reject the null hypothesis and accept the alternative hypothesis. 

                     chi-squared calculated > chi-squared critical          reject  H0, accept H1 : the data sets are not independent                 chi high, no H0


Comparing p-value

If your p-value is less than your significance level you reject the null hypothesis and accept the alternative hypothesis. 

                    p-value < significance level             reject  H0, accept H1 : the data sets are not independent                                            P low, no H0

If your p-value is greater than your significance level you accept the null hypothesis. 

                      p-value > significance level          accept  H0 : the data sets are independent