User Tools

Site Tools


chi-square_test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
chi-square_test [2016/05/16 08:20] hkimscilchi-square_test [2024/12/09 08:20] (current) hkimscil
Line 175: Line 175:
 I do not know exactly why the degree of freedom is important in a conceptual way -- so, having a difficulty explaining it. But, the idea behind it is that if you know totals of column and row, and the values of two cells (as a minimum requirement; called degree of freedom), you would be able to obtain the values of the other four cells without consulting the actual observed values. I do not know exactly why the degree of freedom is important in a conceptual way -- so, having a difficulty explaining it. But, the idea behind it is that if you know totals of column and row, and the values of two cells (as a minimum requirement; called degree of freedom), you would be able to obtain the values of the other four cells without consulting the actual observed values.
  
-{{07-419434-a-tshirt-camp-scils-rutgers.jpg?202 |RUSURE campaign SCILS Rutgers 2000}} Anyway, you just obtained the chi-square value (37.58) and the degrees of freedom (2). You can look up the text book (for chi-square test): (1) find your degrees of freedom (2), that is, the second row of the table; (2) decide the probability you want to employ (usually .05 or .01); (3) write down the numbers; and (4) compare them to your chi-square value. (see [[chi square distribution table]])+{{07-419434-a-tshirt-camp-scils-rutgers.jpg?202 |RUSURE campaign SCILS Rutgers 2000}} Anyway, you just obtained the chi-square value (37.58) and the degrees of freedom (2). You can look up the text book (for chi-square test): (1) find your degrees of freedom (2), that is, the second row of the table; (2) decide the probability you want to employ (usually .05 or .01); (3) write down the numbers; and (4) compare them to your chi-square value. (see [[:chi-square distribution table]])
  
 The numbers you obtain from the book are 5.991 for the 0.05 probability and 9.210 for the 0.01 probability. They are called critical values. So the critical values are: The numbers you obtain from the book are 5.991 for the 0.05 probability and 9.210 for the 0.01 probability. They are called critical values. So the critical values are:
Line 181: Line 181:
 5.991 at 0.05 probability 5.991 at 0.05 probability
 9.210 at 0.01 probability 9.210 at 0.01 probability
 +<code>
 +> qchisq(0.95, 2)
 +[1] 5.991465
 +> qchisq(0.99, 2)
 +[1] 9.21034
 +
 +</code>
  
 These critical values do not exceed the chi-square value you obtained from your table -- 37.58. How do you want to relate them together? Think about the expected values -- the ideal types. Suppose you obtained the same values (observed values) as those of expected values, what would be your chi-square value? --Yes, it is going to be zero. Why? If you look at the formula These critical values do not exceed the chi-square value you obtained from your table -- 37.58. How do you want to relate them together? Think about the expected values -- the ideal types. Suppose you obtained the same values (observed values) as those of expected values, what would be your chi-square value? --Yes, it is going to be zero. Why? If you look at the formula
Line 251: Line 258:
  5.991 (0.05 probability)   5.991 (0.05 probability) 
  9.210 (0.01 probability)   9.210 (0.01 probability) 
 +
 +OR
 +<code>
 +> pchisq(2.73, df=2)
 +[1] 0.7446193
 +</code>
  
 Now the rest of what you need to do is to compare the numbers (chi-square value and the critical values). Now the rest of what you need to do is to compare the numbers (chi-square value and the critical values).
Line 265: Line 278:
 __Another note:__ You might have a question... Hey, wait a minute... If I pick up some other numbers from the chi-square distribution table, the result would be totally different!  __Another note:__ You might have a question... Hey, wait a minute... If I pick up some other numbers from the chi-square distribution table, the result would be totally different! 
 <WRAP clear /> <WRAP clear />
-For your information, the table looks as follows. And the chi-square value you got from your data was 2.73 (see [[Chi square distribution table]]).+For your information, the table looks as follows. And the chi-square value you got from your data was 2.73 (see [[:Chi-square distribution table]]).
 | df  | .30  | .20  | .10  | .05  | .02  | .01  | .001  |  | df  | .30  | .20  | .10  | .05  | .02  | .01  | .001  | 
 | 1  | 1.074  | 1.642  | 2.706  | 3.841  | 5.412  | 6.635  | 10.827  | 1  | 1.074  | 1.642  | 2.706  | 3.841  | 5.412  | 6.635  | 10.827 
chi-square_test.1463356232.txt.gz · Last modified: 2016/05/16 08:20 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki