10 Elementi di Statistica ESERCIZI Next, we build the table that contains the theoretical expected frequencies in case of statistical independence between X and Y, obtained by multiplying the marginal frequencies and then dividing them by the total n: Table of the theoretical frequencies Y X Low Medium High Sum Female 11 8 4.40 = _____ 20 11 5 2.75 = _____ 20 11 7 3.85 = _____ 20 11 Male 9 8 3.60 = _____ 20 9 5 2.25 = _____ 20 9 7 3.15 = _____ 20 9 Sum 8 5 7 20 Variables X and Y are not independent since the two tables are different (for example, for the first cell of the first row, the observed frequency is 4 while the one that should theoretically be is 4.40). We therefore try to measure the degree of correlation between the two variables with the test of the 2 index. We then build a table by inserting in each cell the square of the contingencies (difference between the observed frequency and the theoretical frequency) divided by the theoretical value: Chi Square Calculation Table Y X Low Medium High Female (4 4.40)2 0.04 = __________ 4.40 (3 2.75)2 0.02 = __________ 2.75 (4 3.85)2 0.01 = __________ 3.85 Male (4 3.60)2 0.04 = __________ 3.60 (2 2.25)2 0.03 = __________ 2.25 (3 3.15)2 0.01 = __________ 3.15 The sum of all 6 cells gives the chi-squared value 2 = 0.15 The chi-squared index is different from 0 and confirms the presence of some level of correlation. 2 To better establish the level of correlation, we also calculate the Cramér contingency index C = _______ where h n(h 1) is the lower number between rows and columns. 0.15 0.15 C = ___________ = _ = 0.0075 0.01 20(2 1) 20 1 The value close to 0 affirms that the level of correlation existing between sex and the satisfaction of the course is extremely low. 573