Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. 12.2 Tests for Homogeneity and Independence in a Two-Way Table Data resulting from observations.

Similar presentations


Presentation on theme: "1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. 12.2 Tests for Homogeneity and Independence in a Two-Way Table Data resulting from observations."— Presentation transcript:

1 1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. 12.2 Tests for Homogeneity and Independence in a Two-Way Table Data resulting from observations made on two different categorical variables can be summarized using a tabular format. For example, consider the student data set giving information on 79 student dataset that was obtained from a sample of 79 students taking elementary statistics. The table is on the next slide.

2 2 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity and Independence in a Two-Way Table This is an example of a two-way frequency table, or contingency table. The numbers in the 6 cells with clear backgrounds are the observed cell counts.

3 3 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity and Independence in a Two-Way Table Marginal totals are obtained by adding the observed cell counts in each row and also in each column. The sum of the column marginal total (or the row marginal totals) is called the grand total.

4 4 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity in a Two-Way Table: Comparing Two or More Populations Typically, with a two-way table used to test homogeneity, the rows indicate different populations and the columns indicate different categories or vice versa. For a test of homogeneity, the central question is whether the category proportions are the same for all of the populations Ho: The proportions are all the same (IN CONTEXT) Ha: At least one proportion is not equal

5 5 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity /Independence in a Two-Way Table The expected values for each cell represent what would be expected if there is no difference between the groups under study can be found easily by using the following formula.

6 6 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity/Independence in a Two-Way Table

7 7 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Tests for Homogeneity/Independence in a Two-Way Table Expected counts are in parentheses.

8 8 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Comparing Two or More Populations Using the  2 Statistic Test for Homogeneity Hypotheses: H 0 :The true category proportions are the same for all of the populations (homogeneity of populations). H a :The true category proportions are not all the same for all of the populations.

9 Test statistic: X 2 = (5 - 3.16) 2 + (9 – 9.81) 2 +... + (27 – 25.97) 2 3.16 9.81 25.97

10 10 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Comparing Two or More Populations Using the  2 Statistic The expected cell counts are estimated from the sample data (assuming that H 0 is true) using the formula Test statistic:

11 11 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Comparing Two or More Populations Using the  2 Statistic P-value:When H 0 is true,  2 has approximately a chi-square distribution with The P-value associated with the computed test statistic value is the area to the right of  2 under the chi-square curve with the appropriate df. df = (number of rows - 1)(number of columns - 1)

12 12 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Comparing Two or More Populations Using the  2 Statistic Assumptions: 1.The data consists of independently chosen random samples. 2.The sample size is large: all expected counts are at least 5. If some expected counts are less than 5, rows or columns of the table may be combined to achieve a table with satisfactory expected counts.

13 13 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example The following data come from a clinical trial of a drug regime used in treating a type of cancer, lymphocytic lymphomas.* Patients (273) were randomly divided into two groups, with one group of patients receiving cytoxan plus prednisone (CP) and the other receiving BCNU plus prednisone (BP). The responses to treatment were graded on a qualitative scale. The two-way table summary of the results is on the following slide. * Ezdinli, E., S., Berard, C. W., et al. (1976) Comparison of intensive versus moderate chemotherapy of lympocytic lymphomas: a progress report. Cancer, 38, 1060-1068.

14 14 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Set up and perform an appropriate hypothesis test at the 0.05 level of significance.

15

16

17 17 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example A student decided to study the shoppers in Wegman’s, a local supermarket to see if males and females exhibited the same behavior patterns with regard to the device use to carry items. He observed 57 shoppers (presumably randomly) and obtained the results that are summarized in the table on the next slide.

18 18 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example Determine if the carrying device proportions are the same for both genders using a 0.05 level of significance.

19 19 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Using Minitab, we get the following output: Example Chi-Square Test: Basket, Cart, Nothing Expected counts are printed below observed counts Basket Cart Nothing Total 1 9 21 5 35 9.82 17.19 7.98 2 7 7 8 22 6.18 10.81 5.02 Total 16 28 13 57 Chi-Sq = 0.069 + 0.843 + 1.114 + 0.110 + 1.341 + 1.773 = 5.251 DF = 2, P-Value = 0.072

20 20 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. We draw the following conclusion. Example

21 21 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Hypotheses: H 0 :The two variables are independent. H a :The two variables are not independent.  2 Test for Independence The  2 test statistic and procedures can also be used to investigate the association between two categorical variable in a SINGLE POPULATION

22 22 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example Consider the two categorical variables, gender and principle form of vision correction for the sample of students used earlier in this presentation. We shall now test to see if the gender and the principle form of vision correction are independent.

23 23 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example Assumptions: We are assuming that the sample of students was randomly chosen. All expected cell counts are at least 5, and samples were chosen independently so the  2 test is appropriate.

24 24 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example Assumptions: Notice that the expected count is less than 5 in the cell corresponding to Female and Contacts. So that we should combine the columns for Contacts and Glasses to get

25

26 26 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Example Minitab would provide the following output if the frequency table was input as shown. Chi-Square Test: Contacts or Glasses, None Expected counts are printed below observed counts Contacts None Total 1 14 11 25 12.97 12.03 2 27 27 54 28.03 25.97 Total 41 38 79 Chi-Sq = 0.081 + 0.087 + 0.038 + 0.040 = 0.246 DF = 1, P-Value = 0.620


Download ppt "1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. 12.2 Tests for Homogeneity and Independence in a Two-Way Table Data resulting from observations."

Similar presentations


Ads by Google