Chi-Square Calculation: An Example Play chess Not play chess Sum(row) Like science fiction 250(90)20(360) 450 Not like science fiction 50(210) 1000(840) 1050 Sum(col 300 1200 1500 a X2(chi-square) calculation(numbers in parenthesis are expected counts calculated based on the data distribution the two categories) (250-90)2(50-210)2(200-360)2(1000-840) x =507.93 90 210 360 840 a It shows that like science fiction and play chess are correlated in the group 同济大学软件学院 ool of Software Engineering. Tongpi Unversity 616 Chi-Square Calculation: An Example ◼ Χ2 (chi-square) calculation (numbers in parenthesis are expected counts calculated based on the data distribution in the two categories) ◼ It shows that like_science_fiction and play_chess are correlated in the group 507.93 840 (1000 840) 360 (200 360) 210 (50 210) 90 (250 90) 2 2 2 2 2 = − + − + − + − = Play chess Not play chess Sum (row) Like science fiction 250(90) 200(360) 450 Not like science fiction 50(210) 1000(840) 1050 Sum(col.) 300 1200 1500