Presentation is loading. Please wait.

Presentation is loading. Please wait.

Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.

Similar presentations


Presentation on theme: "Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table."— Presentation transcript:

1 Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table

2 Two-way frequency table – bivariate categorical data can most easily be summarized by the two- way frequency table. Marginal Totals – obtained by adding the observed cell counts in each row and also in each column of the table. Grand Total – The number of observations in the bivariate data set (most cases it is the sample size)

3 An example of a two-way frequency table with the marginal and grand totals.

4 To compare two or more groups on the basis of a categorical variable, calculate an expected cell count for each cell by selecting the corresponding row and column marginal totals and then computing

5 Null Hypothesis: H 0 : The true category proportions are the same for all the populations (homogeneity of populations) Alternative Hypothesis: H a : The true category proportions are not all the same for all the populations. Test Statistic: X 2 P-Values: When H 0 is true, X 2 has approximately a chi- square distribution with df = (number of rows – 1)(number of columns – 1). Assumptions: 1.The data consist of independently chosen random samples. 2.The sample size is large. All expected counts are at least 5.

6 Example The data on drinking behavior for independently chosen random samples of male and female students are similar to data that appeared an article. Does there appear to be a gender difference with respect to drinking behavior? (Note: Low = 1-7 drinks/week, moderate = 8-24 drinks/week, high = 25 or more drinks/week.)

7 Drinking Level MaleFemaleRow Marginal Total None140 (158.6) 186 (167.4) 326 Low478 (554.0) 661 (585.0) 1139 Moderate300 (230.1) 173 (242.9) 473 High63 (38.4) 16 (40.6) 79 Column Marginal Total 98110362017

8 The relevant hypotheses are –H0: True proportions for the four drinking levels are the same for males and females –Ha: H0 is not true Significance Level: α =.01

9 Assumptions: Table 12.5 contains the computed expected counts, all of which are greater than 5. The data consist of independently chosen random samples.

10 P-value: The table has 4 rows and 2 columns, so df = (4 – 1)(2 – 1) = 3. The computed value of X 2 is greater than the largest entry in the 3 – df column of Appendix Table 9, so P-value <.001 Conclusion: Because P-value ≤ α, H 0 is rejected. The data indicate that males and females differ with respect to drinking level.

11 Independence P(A and B) = P(A)P(B) (proportion of individuals in a particular category combination) = (proportion in specified category of first variable) (proportion in specified category of second variable)

12 X 2 Test for Independence Null Hypothesis: H 0 : The two variables are independent Alternative Hypothesis: H a : The two variables are not independent.

13 Example An article examined the relationship between gender and contraceptive use by sexually active teens. Each person in a random sample of sexually active teens was classified according to gender and contraceptive use (with three categories: rarely or never use, use sometimes or most of the time, and always use).

14 Observed Counts Contraceptive Use FemaleMaleRow Marginal Total Rarely/Never210350560 Sometimes190320510 Always400530930 Column Marginal Total 80012002000

15 The authors were interested in determining whether there is an association between gender and contraceptive use. Using a.05 significance level, we will test –H 0 : Gender and contraceptive use are independent –H a : Gender and contraceptive use are not independent

16 Significance Level: α =.05

17 All expected cell counts are greater than 5, so we can continue the test.

18 P-value: The table has 3 rows and 2 columns, so df = (3- 1)(2-1) = 2. The entry closest to 6.572 is 6.70, so the approximate P-value for this test is P-value ≈.035 Conclusion: Because P-value ≤ α, we reject H 0 and conclude that there is an association between gender and contraceptive use.


Download ppt "Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table."

Similar presentations


Ads by Google