Presentation is loading. Please wait.

Presentation is loading. Please wait.

21- 1 Module 21:  2 For Contingency Tables This module presents the  2 test for contingency tables, which can be used for tests of association and for.

Similar presentations


Presentation on theme: "21- 1 Module 21:  2 For Contingency Tables This module presents the  2 test for contingency tables, which can be used for tests of association and for."— Presentation transcript:

1 21- 1 Module 21:  2 For Contingency Tables This module presents the  2 test for contingency tables, which can be used for tests of association and for differences between proportions Reviewed 06 June 05 /MODULE 21

2 21- 2 Contingency tables are very common types of tables used to summarize. The cells of these tables typically include counts of something and/or percentages. For our purposes, we can use only those tables that have integers that are counts. If you are interested in analyzing data in a contingency table that includes only percentages in the cells, then you must convert these percentages into counts in order to proceed. Contingency Tables

3 21- 3 Source: AJPH, November 1977;67:1033-1036

4 21- 4

5 21- 5

6 21- 6 H 0 :There is no association between the classification of the numbers of patients who kept their appointments and the classification of the sex of the patients, vs. H 1 : There is association between the classification of the numbers of patients who kept their appointments and the classification of the sex of the patients. Association Hypothesis

7 21- 7 The association hypothesis can also be tested using a test of proportions hypothesis: H 0 : P M = P F vs. H 1 : P M  P F where P M = Proportion of males in population who “kept their appointments,” P F = Proportion of females in population who “kept their appointments.” Proportions Hypothesis

8 21- 8 Contingency tables have: r = number of rows, not counting any totals c = number of columns, not counting any totals r  c = number of cells Approach is to compare observed number in each cell with the number expected under the assumption that the null hypothesis of no association is true. Contingency Tables

9 21- 9 Calculating the number expected in each contingency table cell under the assumption that the null hypothesis is true is, in practice, quite simple. This number is equal to the total for the row the cell is in times the total for the column the cell is in divided by the overall total for the table. You may be interested in working out why this is true; however, it really isn’t worth the effort. The algebraic expression is: Calculating Expected Numbers

10 21- 10 The value of the test statistic χ 2 calculated by comparing the observed number (O) to the expected number (E) in each cell according to the following formula: The result of this calculation is then compared to the appropriate value in the tables for the χ 2 distribution. These are in the Table Module 3: The χ 2 Distribution. Note that you need to look up χ 2 0.95 (df) for a test with the  -level at  = 0.05. Calculating χ 2

11 21- 11 So, for a 2  2 table, df = (2-1)(2-1) = 1  1=1 Reject H 0 : if  2   2 0.95 (1) = 3.84

12 21- 12 H 0 :There is no association between the classification of the numbers of patients who kept their appointments and the classification of the sex of the patients, vs. H 1 :There is association between the classification of the numbers of patients who kept their appointments and the classification of the sex of the patients. 1.The hypothesis:H 0 : P M = P F vs. H 1 : P M  P F 2.The assumption: Contingency table 3. The  – level:  = 0.05  2 Test for Appointment Keeping Example 1

13 21- 13

14 21- 14

15 21- 15 4. The test statistic: 5. The critical region: Reject H 0 : if  2   2 0.95 (1) = 3.84 6. The result:  2 = 0.86 7. The conclusion: Accept H 0 ; Since  2 = 0.86 < 3.84

16 21- 16 The published table as shown on slide 13 indicates a result of Our result is If with df = 1; then p cannot be > 0.05

17 21- 17

18 21- 18  2 Test for Appointment Keeping Example 2 H 0 :There is no association between the classification of the numbers of patients who kept their appointments and the classification of the age of the patients, vs. H 1 :There is association between the classification of the numbers of patients who kept their appointments and the classification of the age of the patients. 1.The hypothesis:H 0 : P Y = P O vs. H 1 : P Y  P O 2.The assumption:Contingency table 3. The  – level:  = 0.05

19 21- 19

20 21- 20 4. The test statistic: 5. The critical region: Reject H 0 : if  2   2 0.95 (1) = 3.84 6. The result:  2 = 16.90 7. The conclusion: Reject H 0 ; Since  2 = 16.90 > 3.84

21 21- 21

22 21- 22  2 Test for Appointment Keeping Example 3 H 0 :There is no association between the classification of the numbers of patients who kept their appointments and the classification of the ethnicity of the patients, vs. H 1 :There is association between the classification of the numbers of patients who kept their appointments and the classification of the ethnicity of the patients. 1.The hypothesis: H 0 : P P = P B = P w vs. H 1 : P P  P B ≠ P w 2.The assumption: Contingency table 3. The  – level:  = 0.05

23 21- 23

24 21- 24 4. The test statistic: 5. The critical region: Reject H 0 : if  2   2 0.95 (2) = 5.99 6. The result:  2 = 54.43 7. The conclusion: Reject H 0 ; Since  2 = 54.43 > 5.99

25 21- 25 Source: AJPH, July 1996; 86: 948-955

26 21- 26

27 21- 27

28 21- 28 1.The Hypothesis H 0 : There is no association between the classification of the number of male patients according to their change in alcohol consumption and the treatment they received vs. H 1 : There is an association between the classification of the numbers of male patients according to their change in alcohol consumption and the treatment they received. 2. The assumption: Contingency table 3. The  – level:  = 0.05  2 Test for Heavy Drinkers Intervention Example 1

29 21- 29

30 21- 30 4. The test statistic: 5. The critical region: for a 3 x 3 table; df = (3-1)(3-1) = 4 Reject H 0 : if  2   2 0.95 (4) = 9.49 6. The result:  2 = 32.03 7. The conclusion: Reject H 0 ; Since  2 = 32.03 > 9.49

31 21- 31

32 21- 32 1.The Hypothesis H 0 : There is no association between the classification of the number of male patients according to their posttest hazardous alcohol consumption and the treatment they received. vs. H 1 : There is an association between the classification of the numbers of male patients to according to their posttest hazardous alcohol consumption and the treatment they received. 2. The assumption: Contingency table 3. The  – level:  = 0.05  2 Test for Heavy Drinkers Intervention Example 2

33 21- 33

34 21- 34 4. The test statistic: 5. The critical region: for a 2 x 3 table; df = (2-1)(3-1) = 2 Reject H 0 : if  2   2 0.95 (2) = 5.99 6. The result:  2 = 11.74 7. The conclusion: Reject H 0, since  2 = 11.74 > 5.99

35 21- 35 Source: AJPH, August 2001; 91: 1258-1263

36 21- 36

37 21- 37

38 21- 38

39 21- 39

40 21- 40 1.The Hypothesis H 0 : There is no association between the classification of the number of male patients according to their heart rate category and this classification of their diabetes status. vs. H 1 : There is an association between the classification of the numbers of male patients to according to their heart rate category and this classification of their diabetes status. 2. The assumption: Contingency table 3. The  – level:  = 0.05  2 Test for the MATISS Project

41 21- 41

42 21- 42

43 21- 43 4. The test statistic: 5. The critical region: Reject H 0 : if  2   2 0.95 (4) = 9.49 6. The result:  2 = 15.45 7. The conclusion: Reject H 0 ; Since  2 = 15.45 > 9.49


Download ppt "21- 1 Module 21:  2 For Contingency Tables This module presents the  2 test for contingency tables, which can be used for tests of association and for."

Similar presentations


Ads by Google