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 [2025/11/30 23:03] hkimscilchi-square_test [2025/11/30 23:11] (current) hkimscil
Line 165: Line 165:
 |  yes  |  5  |  32  |  13  |  50  |    |  |  yes  |  5  |  32  |  13  |  50  |    | 
 |  Expected value  |  (20)  |  (21)  |  (9)  |  50  |    |  |  Expected value  |  (20)  |  (21)  |  (9)  |  50  |    | 
-|  (O-T)2 / T  |  (-15)<sup>2</sup>/20=11.25  |  (11)<sup>2</sup>/20=5.76  |  (4)<sup>2</sup>/20=1.78  |    |  18.79  | +|  (O-T)2 / T  |  (-15)<sup>2</sup>/20=11.25  |  (11)<sup>2</sup>/21=5.76  |  (4)<sup>2</sup>/9=1.78  |    |  18.79  | 
 |  no  |  35  |  10  |  5  |  50  |    |  |  no  |  35  |  10  |  5  |  50  |    | 
 |    |  (20)  |  (21)  |  (9)  |  50  |    |  |    |  (20)  |  (21)  |  (9)  |  50  |    | 
-|    |  (15)<sup>2</sup>/20=11.25  |  (-11)<sup>2</sup>/20=5.76  |  (-4)<sup>2</sup>/20=1.78  |    |  18.79  | +|    |  (15)<sup>2</sup>/20=11.25  |  (-11)<sup>2</sup>/21=5.76  |  (-4)<sup>2</sup>/9=1.78  |    |  18.79  | 
 |  Total  |  40  |  42  |  18  |  100  |  37.58  |  |  Total  |  40  |  42  |  18  |  100  |  37.58  | 
 Chi-square value = 37.58. \\  Chi-square value = 37.58. \\ 
Line 182: Line 182:
 9.210 at 0.01 probability 9.210 at 0.01 probability
 <code> <code>
-> qchisq(0.95, 2)+> qchisq(0.95, 2) # in R, we don't use 0.975 since we look up (the distribution table has) square values
 [1] 5.991465 [1] 5.991465
-> qchisq(0.99, 2)+> qchisq(0.99, 2) 
 [1] 9.21034 [1] 9.21034
  
chi-square_test.1764543816.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki