Anda di halaman 1dari 7

Application of Chi-Square Test in Mathematical Statistics

Nang Aye Swe1

Abstract The Chi square test is a statistical test which measures the association between two categorical variables. Working knowledge of tests of this nature is important for the chiropractor and osteopath in order to be able to critically appraise the literature.

1. Introduction One of the most common and useful ways to look at information about the social world is in the format of a table. Say, for example, we want to know whether boys or girls get into trouble more often in school. There are many ways we might show information related to this question, but perhaps the most frequent and easiest to comprehend is in a table.

Got into Trouble No Trouble Total Boys Girls Total 46 37 83 71 83 154 117 120 237

Figure (1) The above example is relatively straightforward in that we can fairly quickly tell that more boys than girls got into trouble in school. Calculating percentages, we find that 39 percent of boys got into trouble (46 boys got into trouble out of 117 total
1

Professor, Dr, Department of Mathematics, University of Magway

28

boys =39%), as compared with 31 percent of girls (37 girls got into trouble out of 120 total girls=31%). However, to re-frame the issue, what if we wanted to test the hypothesis that boys got into trouble more often than girls in schools. These figures are a good start to examining that hypothesis; however, the figures in the table are only descriptive. To examine the hypothesis, we need to employ a statistical test, the chi-square test. 2. Method and Procedure 2.1 About the Chi-Square Test Generally speaking, the chi-square test is a statistical test used to examine differences with categorical variables. There are a number of features of the social world we characterize through categorical variables such as religion, political preference, etc. To examine hypotheses using such variables, use the chi-square test. The chi-square test is used in two similar but distinct circumstances: a. For estimating how closely an observed distribution matches an expected distribution-we will refer to this as the goodness of fit test b. for estimating whether two random variables are independent. 2.2 Testing Independence The other primary use of the chi-square test is to examine whether two variables are independent or not. It means that the two factors are not related. Typically in social science research, we are interested in finding factors that are related such as education and income, occupation and prestige, age and voting behavior. In this case, the chi-square can be used to assess whether two variables are independent or not. More generally, we say that variable Y is "not correlated with" or "independent of" the variable X if more of one is not associated with more of another. If two categorical variables are correlated, their values tend to move together, either in the same direction or in the opposite.

29

2.3 Example Return to the example discussed at the introduction to chi-square, in which we want to know whether boys or girls get into trouble more often in school. The table, documenting the percentage of boys and girls who got into trouble in school is as shown in Figure (1). To examine statistically whether boys got in trouble in school more often, we need to frame the question in terms of hypotheses. (Use the 0.05 level of significance.) (i) Establish Hypotheses As in the goodness-of-fit chi-square test, the first step of the chi-square test for independence is to establish hypotheses. The null hypothesis (H0) is that the two variables are independent - or, in this particular case that the likelihood of getting in trouble is the same for boys and girls. The alternative hypothesis (H1) to be tested is that the likelihood of getting in trouble is not the same for boys and girls. (ii) Calculate the expected value for each cell of the table As with the goodness-of-fit example described earlier, the key idea of the chisquare test for independence is a comparison of observed and expected values. How many of something were expected and how many were observed in some process? In the case of tabular data, however, we usually do not know what the distribution should look like (as we did with rolls of dice). Rather, in this use of the chi-square test, expected values are calculated based on the row and column totals from the table. The expected value for each cell of the table can be calculated using the following formula:

For example, in the table comparing the percentage of boys and girls in trouble, the expected count for the number of boys who got into trouble is:

30

The first step, then, in calculating the chi-square statistic in a test for independence is generating the expected value for each cell of the table. Presented in the table below are the expected values (in parentheses and italics) for each cell: Got into Trouble No Trouble Total Boys 46 (40.97) Girls 37 (42.03) Total 83 71 (76.02) 117 83(77.97) 120 154 237

Figure (2) (iii) Calculate Chi-square statistic With these sets of figures, we calculate the chi-square statistic as follows:

In the example above, we get a chi-square statistic equal to:

(iv) Assess significance level Finally, to determine the significance level we need to know the "degrees of freedom." In the case of the chi-square test of independence, the number of degrees of

31

freedom is equal to the number of columns in the table minus one multiplied by the number of rows in the table minus one. Degree of freedom can be described as the number of scores that are free to vary. For example, suppose you tossed three dice. The total score adds up to 12. If you rolled a 3 on the first die and a 5 on the second, then you know that the third die must be a 4 (otherwise, the total would not add up to 12). In this example, 2 dice are free to vary while the third is not. Therefore, there are 2 degrees of freedom. In this table, there were two rows and two columns. Therefore, the number of degrees of freedom is: (number of row 1) x (number of column 1) is equal to 1.

Thus from

table, for alpha is 0.05, the critical value is k = 3.84.

(v) Decision Rule

Otherwise, H0 is accepted. (vi) Decision

Therefore H0 is accepted. (vii) Conclusion We cannot reject the null hypothesis (H0) and conclude that boys are not significantly more likely to get into trouble in school than girls.

32

Chi Square Distribution Table

Degree of Freedom 1 2 3 4 5 . . . 100 67.33 70.06 74.22 0.995 0.00 0.01 0.07 0.21 0.41 0.990 0.975 0.00 0.02 0.11 0.30 0.55 0.00 0.05 0.22 0.48 0.83

Probability Level (alpha) 0.950 0.00 0.10 0.35 0.71 1.15 0.900 0.02 0.21 0.58 1.06 1.61 0.100 2.71 4.61 6.25 7.78 9.24 0.050 3.84 5.99 7.81 9.49 11.07 0.025 5.02 7.38 9.35 11.14 12.83 0.010 6.63 9.21 11.34 13.28 15.09 0.005 7.88 10.60 12.84 14.68 16.75

77.93

82.36

118.50

124.34 129.56 135.81

140.17

3. Discussion The chi-squared test must require the following conditions: 1. Establish hypotheses 2. Calculate expected values for each cell of the table. 3. Calculate chi-square statics. Doing so requires knowing: a. The number of observations b. Observed values 4. Assess significance level. Doing so requires knowing the number of degrees of freedom 5. Finally, decide whether to accept or reject the null hypothesis.

33

4. Conclusion The chi-square test is a statistical test of association between two categorical variables. It is used very commonly in clinical research and a good understanding of the test is useful for chiropractors and osteopaths to be able to critically appraise the literature.
Acknowledgements I would like to express my gratitude and deep appreciation to Dr Aye Kyaw, Acting-Rector, Magway University, for his permission. Thanks are also due to Dr Daw Hla Thein, Professor and Head, Department of Mathematics, University of Magway and U Win Zaw Zaw Htay ,Lecturer (Mech) TU(Taunggyi), for his kind help in writing this paper.

References Neave (1988), HR.Statistics Tables for Mathematicians, Engineers, Economists, and Behavioral and Management Sciences.Unwin Hyman Ltd. Ugoni A. (1993), On the subject of hypothesis testing. COMSIG Review.

Anda mungkin juga menyukai