Sunday, May 18, 2008

Chi-squared test X2 (MR, unit 10)

can test the hypothesis that two variables are unconnected (also known as goodness-of-fit tests)
Two steps:
  1. calculate a chi-squared statistic
  2. see whether this statistic exceeds a certain critical point value (to establish the significance of figures in the sample)
List observed and expected frequencies in a table. Calculate X2 using the above equation.
If X2 = 0 there is no difference between observed and expected (the null hypothesis)

Levels of significance:
If the null hypothesis is correct then the probability our X2 statistic will exceed the critical point value is 10%, 5% or 1%

Critical point value is got from a X2 distribution table that compares probability levels with differing degrees of freedom. Our degree of freedom = (n-1) where n is number of categories

in this example, the critical value point (probability 5%, degrees of freedom 6) is 12.59. Our X2 statistic is 22.5. There is only a 5% probability it could exceed the critical value if the null hypothesis was right.

Conclusion: There is a significant difference between O & E

TESTING ASSOCIATIONS
X2 can also test comparisons.
  • Arrange data in a contingency table showing Observed and Expected results.
  • Calculate X2 for all data.
  • Calculate critical value from table N.B. Degrees of freedom is calculated differently in a contingency table this. v = (m-1) (n-1) where size of table is m x n (row x column)
  • How does X2 compare with the critical point? Either accept or reject null hypothesis

No comments: