Test of Homogeneity Lecture 45 Section 14.4 Wed, Apr 19, 2006.

Slides:



Advertisements
Similar presentations
Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
Advertisements

Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Introduction to Chi-Square Procedures March 11, 2010.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Chi-Square Test.
Chi-square Goodness of Fit Test
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
The table shows a random sample of 100 hikers and the area of hiking preferred. Are hiking area preference and gender independent? Hiking Preference Area.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Chapter 11: Inference for Distributions of Categorical Data.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. 1.. Section 11-2 Goodness of Fit.
Chi-square test Chi-square test or  2 test Notes: Page Goodness of Fit 2.Independence 3.Homogeneity.
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Chapter 26 Chi-Square Testing
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Testing Hypotheses about a Population Proportion Lecture 30 Sections 9.3 Wed, Oct 24, 2007.
Chi-Square Test.
Warm up On slide.
Test of Goodness of Fit Lecture 43 Section 14.1 – 14.3 Fri, Apr 8, 2005.
Test of Independence Lecture 43 Section 14.5 Mon, Apr 23, 2007.
Chapter Outline Goodness of Fit test Test of Independence.
1 Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION.
13.2 Inference for Two Way Tables.  Analyze Two Way Tables Using Chi-Squared Test for Homogeneity and Independence.
Copyright © Cengage Learning. All rights reserved. Chi-Square and F Distributions 10.
AGENDA:. AP STAT Ch. 14.: X 2 Tests Goodness of Fit Homogeniety Independence EQ: What are expected values and how are they used to calculate Chi-Square?
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Fri, Nov 12, 2004.
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Wed, Nov 1, 2006.
11.2 Tests Using Contingency Tables When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
ContentFurther guidance  Hypothesis testing involves making a conjecture (assumption) about some facet of our world, collecting data from a sample,
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Testing Hypotheses about a Population Proportion Lecture 31 Sections 9.1 – 9.3 Wed, Mar 22, 2006.
Chapter 12 The Analysis of Categorical Data and Goodness of Fit Tests.
Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.
Color Distribution A block BrownYellowOrangeRedGreenBlue GreenYellowOrangeRedPurple M&M Skittles.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
Statistics 300: Elementary Statistics Section 11-3.
11.1 Chi-Square Tests for Goodness of Fit Objectives SWBAT: STATE appropriate hypotheses and COMPUTE expected counts for a chi- square test for goodness.
Statistics 26 Comparing Counts. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
Chapter 12 Lesson 12.2b Comparing Two Populations or Treatments 12.2: Test for Homogeneity and Independence in a Two-way Table.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
The  2 (chi-squared) test for independence. One way of finding out is to perform a  2 (chi-squared) test for independence. We might want to find out.
Independent Samples: Comparing Means Lecture 39 Section 11.4 Fri, Apr 1, 2005.
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Warm up On slide.
Chi-Square Test.
Chi-Square Test.
The Analysis of Categorical Data and Chi-Square Procedures
Chi-Square Test.
Chi-Square - Goodness of Fit
Lecture 36 Section 14.1 – 14.3 Mon, Nov 27, 2006
The Analysis of Categorical Data and Goodness of Fit Tests
Chi-Square Test.
Day 66 Agenda: Quiz Ch 12 & minutes.
Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007
Lecture 42 Section 14.4 Wed, Apr 17, 2007
Lecture 37 Section 14.4 Wed, Nov 29, 2006
Lecture 38 Section 14.5 Mon, Dec 4, 2006
Lecture 43 Sections 14.4 – 14.5 Mon, Nov 26, 2007
The Analysis of Categorical Data and Goodness of Fit Tests
The Analysis of Categorical Data and Goodness of Fit Tests
Chapter 26 Comparing Counts.
The Analysis of Categorical Data and Goodness of Fit Tests
Testing Hypotheses about a Population Proportion
Lecture 46 Section 14.5 Wed, Apr 13, 2005
Lecture 43 Section 14.1 – 14.3 Mon, Nov 28, 2005
Presentation transcript:

Test of Homogeneity Lecture 45 Section 14.4 Wed, Apr 19, 2006

Homogeneous Populations Two distributions are called homogeneous if they exhibit the same proportions within categories. Two distributions are called homogeneous if they exhibit the same proportions within categories. For example, if two colleges’ student bodies are each 55% female and 45% male, then the distributions are homogeneous. For example, if two colleges’ student bodies are each 55% female and 45% male, then the distributions are homogeneous.

Example Suppose a teacher teaches two sections of Statistics and uses two different teaching methods. Suppose a teacher teaches two sections of Statistics and uses two different teaching methods. At the end of the semester, he gives both sections the same final exam and he compares the grade distributions. At the end of the semester, he gives both sections the same final exam and he compares the grade distributions. He wants to know if the differences that he observes are significant. He wants to know if the differences that he observes are significant.

Example Does there appear to be a difference? Does there appear to be a difference? Or are the two sets (plausibly) homogeneous? Or are the two sets (plausibly) homogeneous? ABCDF Method I Method II

The Test of Homogeneity The null hypothesis is that the populations are homogeneous. The null hypothesis is that the populations are homogeneous. The alternative hypothesis is that the populations are not homogeneous. The alternative hypothesis is that the populations are not homogeneous. H 0 : The populations are homogeneous. H 1 : The populations are not homogeneous. Notice that H 0 does not specify a distribution; it just says that whatever the distribution is, it is the same in all rows. Notice that H 0 does not specify a distribution; it just says that whatever the distribution is, it is the same in all rows.

The Test Statistic The test statistic is the chi-square statistic, computed as The test statistic is the chi-square statistic, computed as The question now is, how do we compute the expected counts? The question now is, how do we compute the expected counts?

Expected Counts Under the assumption of homogeneity (H 0 ), the rows should exhibit the same proportions. Under the assumption of homogeneity (H 0 ), the rows should exhibit the same proportions. We can get the best estimate of those proportions by pooling the rows. We can get the best estimate of those proportions by pooling the rows. That is, add the rows (i.e., find the column totals), and then compute the column proportions from them. That is, add the rows (i.e., find the column totals), and then compute the column proportions from them.

Row and Column Proportions ABCDF Method I Method II

Row and Column Proportions ABCDF Method I Method II Col Total

Row and Column Proportions ABCDF Method I Method II Col Total %15%45%20%10%

Expected Counts Similarly, the columns should exhibit the same proportions, so we can get the best estimate by pooling the columns. Similarly, the columns should exhibit the same proportions, so we can get the best estimate by pooling the columns. That is, add the columns (i.e., find the row totals), and then compute the row proportions from them. That is, add the columns (i.e., find the row totals), and then compute the row proportions from them.

Row and Column Proportions ABCDF Method I Method II Col Total %15%45%20%10%

Row and Column Proportions ABCDF Row Total Method I Method II Col Total %15%45%20%10%

Row and Column Proportions ABCDF Row Total Method I % Method II % Col Total %15%45%20%10%

Row and Column Proportions ABCDF Row Total Method I % Method II % Col Total %15%45%20%10% Grand Total

Expected Counts Now apply the appropriate row and column proportions to each cell to get the expected count. Now apply the appropriate row and column proportions to each cell to get the expected count. Let’s use the upper-left cell as an example. Let’s use the upper-left cell as an example. According to the row and column proportions, it should contain 60% of 10% of the grand total of 120. According to the row and column proportions, it should contain 60% of 10% of the grand total of 120. That is, the expected count is That is, the expected count is 0.60  0.10  120 = 7.2

Expected Counts Notice that this can be obtained more quickly by the following formula. Notice that this can be obtained more quickly by the following formula. In the upper-left cell, this formula produces In the upper-left cell, this formula produces (72  12)/120 = 7.2

Expected Counts Apply that formula to each cell to find the expected counts and add them to the table. Apply that formula to each cell to find the expected counts and add them to the table. ABCDF Method I 5 (7.2) 7 (10.8) 36 (32.4) 17 (14.4) 7 (7.2) Method II 7 (4.8) 11 (7.2) 18 (21.6) 7 (9.6) 5 (4.8)

The Test Statistic Now compute  2 in the usual way. Now compute  2 in the usual way.

Degrees of Freedom The number of degrees of freedom is The number of degrees of freedom is df = (no. of rows – 1)  (no. of cols – 1). In our example, df = (2 – 1)  (5 – 1) = 4. In our example, df = (2 – 1)  (5 – 1) = 4. To find the p-value, calculate To find the p-value, calculate  2 cdf(7.2106, E99, 4) = At the 5% level of significance, the differences are not statistically significant. At the 5% level of significance, the differences are not statistically significant.

TI-83 – Test of Homogeneity The tables in these examples are not lists, so we can’t use the lists in the TI-83. The tables in these examples are not lists, so we can’t use the lists in the TI-83. Instead, the tables are matrices. Instead, the tables are matrices. The TI-83 can handle matrices. The TI-83 can handle matrices.

TI-83 – Test of Homogeneity Enter the observed counts into a matrix. Enter the observed counts into a matrix. Press MATRIX. Press MATRIX. Select EDIT. Select EDIT. Use the arrow keys to select the matrix to edit, say [A]. Use the arrow keys to select the matrix to edit, say [A]. Press ENTER to edit that matrix. Press ENTER to edit that matrix. Enter the number of rows and columns. (Press ENTER to advance.) Enter the number of rows and columns. (Press ENTER to advance.) Enter the observed counts in the cells. Enter the observed counts in the cells. Press 2 nd Quit to exit the matrix editor. Press 2 nd Quit to exit the matrix editor.

TI-83 – Test of Homogeneity Perform the test of homogeneity. Perform the test of homogeneity. Select STATS > TESTS >  2 -Test… Select STATS > TESTS >  2 -Test… Press ENTER. Press ENTER. Enter the name of the matrix of observed counts. Enter the name of the matrix of observed counts. Enter the name (e.g., [E]) of a matrix for the expected counts. These will be computed for you by the TI-83. Enter the name (e.g., [E]) of a matrix for the expected counts. These will be computed for you by the TI-83. Select Calculate. Select Calculate. Press ENTER. Press ENTER.

TI-83 – Test of Homogeneity The window displays The window displays The title “  2 -Test”. The title “  2 -Test”. The value of  2. The value of  2. The p-value. The p-value. The number of degrees of freedom. The number of degrees of freedom. See the matrix of expected counts. See the matrix of expected counts. Press MATRIX. Press MATRIX. Select matrix [E]. Select matrix [E]. Press ENTER. Press ENTER.

Example Is the color distribution in Skittles candy the same as in M & M candy? Is the color distribution in Skittles candy the same as in M & M candy? One package of Skittles: One package of Skittles: Red: 12 Red: 12 Orange: 14 Orange: 14 Yellow: 10 Yellow: 10 Green: 10 Green: 10 Purple: 12 Purple: 12

Example One package of M & Ms: One package of M & Ms: Red: 8 Red: 8 Orange: 19 Orange: 19 Yellow: 4 Yellow: 4 Green: 8 Green: 8 Blue: 10 Blue: 10 Brown: 6 Brown: 6

The Table RedOrangeYellowGreenBrown Skittles M & Ms819486

The Table RedOrangeYellowGreenBrown Skittles12 (11.3) 14 (18.6) 10 (7.9) 10 (10.1) 12 (10.1) M & Ms8 (8.7) 19 (14.4) 4 (6.1) 8 (7.9) 6 (7.9) df = 4  2 = p-value =

Example Let’s gather more evidence. Buy a second package of Skittles and add it to the first package. Let’s gather more evidence. Buy a second package of Skittles and add it to the first package. Second package of Skittles: Second package of Skittles: Red: 10 Red: 10 Orange: 13 Orange: 13 Yellow: 15 Yellow: 15 Green: 13 Green: 13 Purple: 7 Purple: 7

Example Buy a second package of M & Ms and add it to the first package. Buy a second package of M & Ms and add it to the first package. Second package of M & Ms: Second package of M & Ms: Red: 5 Red: 5 Orange: 12 Orange: 12 Yellow: 16 Yellow: 16 Green: 9 Green: 9 Blue: 8 Blue: 8 Brown: 8 Brown: 8

The Table RedOrangeYellowGreenBrown Skittles M & Ms

The Table RedOrangeYellowGreenBrown Skittles22 (19.2) 27 (31.9) 25 (24.7) 23 (22.0) 19 (18.1) M & Ms13 (15.8) 31 (26.1) 20 (20.3) 17 (18.0) 14 (14.9) df = 4  2 = p-value =