Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter-8 Chi-square test. Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution.

Similar presentations


Presentation on theme: "Chapter-8 Chi-square test. Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution."— Presentation transcript:

1 Chapter-8 Chi-square test

2 Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution

3 1. Tests of goodness-of-fit Observed frequencies of one variable are significantly different from the expected frequencies of the same variable. E.g. occurrences of heads and tails while flipping a coin. Chi-Square 2. Chi-Square tests of independence( or relationship) Two variables are associated or independent of the other. E.g. association between smoking and lung cancer. Types of chi-square tests

4 The chi-square test of independence is probably the most frequently used hypothesis test in the medicine. In this chapter, we will use chi-square test to evaluate differences among population when the test variable is nominal, dichotomous, ordinal, or grouped interval. Chi-square test

5 Independence Defined Two variables are independent if, for all cases, the classification of a case into a particular category of one variable (the group variable) has no effect on the probability that the case will fall into any particular category of the second variable (the test variable). When two variables are independent, there is no relationship between them. We would expect that the frequency breakdowns of the test variable to be similar for all groups.

6 Independence Demonstrated Suppose we are interested in the relationship between gender and attending college. If there is no relationship between gender and attending college and 40% of our total sample attend college, we would expect 40% of the males in our sample to attend college and 40% of the females to attend college. If there is a relationship between gender and attending college, we would expect a higher proportion of one group to attend college than the other group, e.g. 60% to 20%.

7 Displaying Independent and Dependent Relationships When the variables are independent, the proportion in both groups is close to the same size as the proportion for the total sample. When group membership makes a difference, the dependent relationship is indicated by one group having a higher proportion than the proportion for the total sample.

8 Independent and Dependent Variables  The two variables in a chi-square test of independence each play a specific role. The group variable is also known as the independent variable because it has an influence on the test variable. The test variable is also known as the dependent variable because its value is believed to be dependent on the value of the group variable.  The chi-square test of independence is a test of the influence or impact that a subject’s value on one variable has on the same subject’s value for a second variable.

9 Chi square distribution Expected frequency observed frequency Expected frequency are computed as if there is no difference between the groups, i.e. both groups have the same proportion. This formula compute how the pattern of observed frequency differs from the pattern of expected frequency.

10 2. Chi-square distributions are determined by degree of freedom Chi square distribution 1. Chi-square distribution is a nonsymmetrical distribution

11 Chi square test statistic Cannot be negative because all discrepancies are squared. Will be zero only in the unusual event that each observed frequency exactly equals the corresponding expected frequency. Larger the discrepancy between the expected frequencies and their corresponding observed frequencies, the larger the observed value of chi-square.

12 Table 2.1 Partial Table of Critical Values of Chi-Square Probability for chi square test statistic can be obtained from the chi-square probability distribution. 0.05 reject region

13 The decision rule The quantity will be small if the observed and expected frequency are close together and will be large if the differences are large. The computed value of χ 2 is compared with the tabulated value of with K-1 degrees of freedom. The decision rule, then is: reject H 0 if χ 2 is greater than or equal to the tabulated χ 2 for the chosen value of α.

14 Ⅱ Chi-Square test tests of goodness-of-fit ( tests of goodness-of-fit )

15 Model assumptions: No cell has an expected frequency less than 5. At least one cell has an expected frequency less than 5. Degrees of Freedom: k - 1 Number of outcomes tests of goodness-of-fit

16 Example 1 As personnel director, you want to test the perception of fairness of three methods of performance evaluation. Of 180 employees, 63 rated Method 1 as fair. 45 rated Method 2 as fair. 72 rated Method 3 as fair. At the 0.05 level, is there a difference in perceptions? tests of goodness-of-fit

17 H0: p 1 = p 2 = p 3 = 1/3 H1: At least 1 is different a = 0.05 tests of goodness-of-fit Reject at a = 0.05There is evidence of a difference in proportions Reject H0 at a = 0.05. There is evidence of a difference in proportions

18 Exercise 1 Ask 100 People (n) Which of 3 Candidates (k) They Will Vote For. At the 0.05 level, is there a difference in candidates? tests of goodness-of-fit

19 Ⅲ Chi-Square test tests of independence or relationship ( tests of independence or relationship )

20 Hypothesis test for 2×2 table Pearson chi- square Continuity correction of chi- square Fisher’ exact test hypothesis test for 2×2table 1. hypothesis test for 2×2table n≥40 and E ≥ 5 n≥40 and 1 ≤ E < 5 n<40 or E <1

21 n≥40 and E ≥ 5 hypothesis test for 2×2table 1. hypothesis test for 2×2table Pearson chi- square

22 n ≥ 40 and 1≤E<5 hypothesis test for 2×2table 1. hypothesis test for 2×2table Continuity correction of chi- square

23 n<40 or E<1 hypothesis test for 2×2table 1. hypothesis test for 2×2table Fisher’ exact test

24 Example 2 A sample of 200 college students participated in a study designed to evaluate the level of college students’ knowledge of a certain group of common diseases. The following table shows the students classified by major field of study and level of knowledge of the group of diseases: hypothesis test for 2×2table 1. hypothesis test for 2×2table

25 Do these data suggest that there is a relationship between knowledge of the group of diseases and major field of study of the college students from which the present sample was drawn? Let α=0.05. hypothesis test for 2×2table 1. hypothesis test for 2×2table

26 Four cells  four-fold table 1624 20140 131.228.8 32.87.2 Observed cells Expected cells

27 H 0 : there is no relationship (independent) between knowledge and major field H 1 : there is a relationship between knowledge and major field a = 0.05 131.228.8 32.87.2 14020 2416 Chi-Square test for 2×2table 1. Chi-Square test for 2×2table

28 df=(R-1)(C-1)=1 Reject H 0 at a=0.05 There is relationship between knowledge of the group of diseases and major field of study of the college students. The students major in premedical has higher knowledge rates of diseases. Chi-Square test for 2×2table 1. Chi-Square test for 2×2table

29 Exercise 2 A study was conducted to determine whether the antibody status in wives is related with antibody status in their husband. 48 couples were examined, the data regarding the incidence of anti- sperm antibodies is as follows:

30 Question: Is the antibody status in wives related with antibody status in their husband?

31 H 0 : the antibody status in wives is related with antibody status in their husband H 1 : the antibody status in wives is not related with antibody status in their husband a = 0.05 Not reject H 0, we can not think the antibody status in wives is related with antibody status in their husband.

32 Hypothesis test for R×C table Pearson chi- squareFisher’ exact test hypothesis test for R×C table 2. hypothesis test for R×C table

33 Model assumptions : The expected frequency should be greater than 5 in more than 4/5 cells; The expected frequency in any cell should be greater than 1. R×C table Pearson chi- square for R×C table

34 Example3 To study menstrual dysfunction in distance runners. Somebody did an observational study of three groups of women. The first two groups were volunteers who regularly engaged in some form of running, and the third, a control group, consisted of women who did not run but were otherwise similar to the other two groups. The runners were divided into joggers who jog "slow and easy" 5 to 30 miles per week, and runners who run more than 30 miles per week and combine long, slow distance with speed work. The investigators used a survey to show that the three groups were similar in the amount of physical activity (aside from running), distribution of ages, heights, occupations, and type of birth control methods being used.

35 Are these data consistent with the hypothesis that running does not increase the likelihood that a woman will consult her physician for a menstrual problem?

36 Table 5-6 shows these expected frequencies, together with the expected frequencies of women who did not consult their physicians.

37 H 0 : π 1 = π 2 = π 3 H 1 : At least 1 is different from the other a = 0.05 Reject H 0 at 0.05 level, so we can think that running increases the likelihood a woman will consult her physician for a menstrual problem.

38

39


Download ppt "Chapter-8 Chi-square test. Ⅰ The mathematical properties of chi-square distribution  Types of chi-square tests  Chi-square test  Chi-square distribution."

Similar presentations


Ads by Google