13.2 Chi-Square Test for Homogeneity & Independence AP Statistics.

Slides:



Advertisements
Similar presentations
 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)
Advertisements

Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables.
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Chapter 11 Inference for Distributions of Categorical Data
Chapter 13: Inference for Tables
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Chi Square Procedures Chapter 11.
Does Background Music Influence What Customers Buy?
Chapter 13: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Presentation 12 Chi-Square test.
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
Lesson Inference for Two-Way Tables. Vocabulary Statistical Inference – provides methods for drawing conclusions about a population parameter from.
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.
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Goodness-of-Fit Tests and Categorical Data Analysis
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
Chapter 11: Applications of Chi-Square. Count or Frequency Data Many problems for which the data is categorized and the results shown by way of counts.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
Chi-square test Chi-square test or  2 test Notes: Page Goodness of Fit 2.Independence 3.Homogeneity.
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
Chapter 26 Chi-Square Testing
CHAPTER 11 SECTION 2 Inference for Relationships.
Chapter 11 The Chi-Square Test of Association/Independence Target Goal: I can perform a chi-square test for association/independence to determine whether.
Chapter 14: Chi-Square Procedures – Test for Goodness of Fit.
Chapter 11 Chi- Square Test for Homogeneity Target Goal: I can use a chi-square test to compare 3 or more proportions. I can use a chi-square test for.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
The Practice of Statistics Third Edition Chapter (13.1) 14.1: Chi-square Test for Goodness of Fit Copyright © 2008 by W. H. Freeman & Company Daniel S.
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Chapter Outline Goodness of Fit test Test of Independence.
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.
Lesson Inference for Two-Way Tables. Knowledge Objectives Explain what is mean by a two-way table. Define the chi-square (χ 2 ) statistic. Identify.
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.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Section 13.2 Chi-Squared Test of Independence/Association.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Statistics 300: Elementary Statistics Section 11-3.
Chapter 14 Inference for Distribution of Categorical Variables: Chi-Squared Procedures.
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.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
Textbook Section * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of.
11/12 9. Inference for Two-Way Tables. Cocaine addiction Cocaine produces short-term feelings of physical and mental well being. To maintain the effect,
CHAPTER 11 Inference for Distributions of Categorical Data
Introduction The two-sample z procedures of Chapter 10 allow us to compare the proportions of successes in two populations or for two treatments. What.
CHAPTER 11 Inference for Distributions of Categorical Data
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Contingency Tables: Independence and Homogeneity
Chi-square test or c2 test
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 13: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Chi-Square Hypothesis Testing PART 3:
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
11.2 Inference for Relationships
CHAPTER 11 Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Analysis of two-way tables
Presentation transcript:

13.2 Chi-Square Test for Homogeneity & Independence AP Statistics

Homogeneity The two-sample procedures in Chapter 12 allow us to compare the proportion of successes in two groups. What if we want to compare more than two proportions? We’ll need a new test for that. If data is presented in a two-way table, we can look at categorical variables. The same test that compares multiple proportions also tests if those variables are related. This test is the X 2 test for homogeneity/independence.

Example: Does Background Music Influence Wine Purchases? A study in a supermarket in Northern Ireland was conducted to determine whether or not the sales of wine changed relative to the type of background music that was played. Researchers recorded the amount and type of wine that was sold while Italian, French, and no music was played. Music WineNoneFrenchItalianTotal French Italian Other Total

If music had no effect on the type of wine sold, we would expect to see similar distributions for each type of wine. Sketch the three wine distributions and compare: Wine Music

To compare the three population distributions, we must determine what counts we would expect to see if the three distributions were the same. To calculate the expected cell counts, we use the following formula…try to determine why? or….see page 747 expected count = Calculate the expected counts for each cell and enter them in parentheses next to the observed counts.

Music WineNoneFrenchItalianTotal French 30 (34.22)39 (30.56)30 (34.22) 99 Italian 11 (10.72)1 (9.57)19 (10.72) 31 Other 43 (39.06)35 (34.88)35 (39.06) 113 Total

To test the significance of the difference between the observed and expected counts, we must calculate a X 2 value. If this value is close to zero, then there is not much of a difference between the distributions. However, if this value is large, then we may have evidence that the distributions differ. H 0 : p 1 = p 2 = p 3. The proportion of wine sold with each type of music is the same vs. H a : Not all are equal. over all cells in the table. Calculate this value. X 2 =

How likely was this observed difference? To calculate the p-value, we must look up our information on the table. The degrees of freedom in a test for homogeneity is (row – 1)(column – 1). (3 – 1)(3 – 1) = 4 P-value = X 2 cdf(X 2,1E99, df) Conclusion? There is significant evidence at α = 0.05 to reject the null hypothesis. It appears the distributions of wine sales may be different for each type of background music.

Independence In a sense, the Test for Homogeneity can be used to determine whether or not one categorical variable has an effect on another. If the goal of our analysis is to determine an association between two categorical variables, we call the test a Test for Independence. If one variable is affecting the other, then we would expect to see differences between the distributions of counts.

The null hypothesis vs. the alternative in a test for independence is H o : There is no association between the two categorical variables H a : There is an association between the two categorical variables

Chi-Square procedures can be used for a test of homogeneity or a test of independence if all expected counts are at least 1 and if 80% of the expected counts are greater than 5. If these conditions are met, the distribution of X 2 will be Chi-Square with df = (r – 1)(c – 1).

Example: Smoking Habits—Students & Parents How are the smoking habits of students and parents related? Does a parent’s habits affect their child’s smoking habits? Consider the following data from eight high schools in Arizona and perform a test for independence: Student SmokesStudent Does NOT SmokeTotal Both Parents Smoke One Parent Smokes Neither Parent Smokes Total

Hypotheses: H o : There is no association between parent and child smoking behavior H a : There is an association between parent and child smoking behavior Conditions: Since we do not know if we have an SRS, we must proceed with caution. All expected counts are greater than 5. We will proceed with a X 2 test of independence. Sampling Distribution of X 2 : df = (3 – 1)(2 – 1) = 2 x 1 = 2 X 2 = p < α Reject H o Conclusion: There is significant evidence to conclude there may be an association between parent and child smoking behavior (α = 0.05).

Example: Because of the stressful working environment, employees at Company X are prone to criminal activities. The following data represent the number of various types of crimes by gender in a random sample of 750 wayward employees at Company X. Does the evidence suggest that gender is independent of type of crime at a 0.05 significance level? GenderPersonal Assault Property Damage Drug Abuse Public Disorder Female Male GenderPersonal Assault Property Damage Drug AbusePublic Disorder Total Female Male Total

H o : There is NO association between gender and type of crime. H a : There is an association between gender and type of crime. We will assume we have an SRS. Since all expected counts are greater than 5, we will proceed with a X 2 test for Independence. df = (4 – 1)(2 – 1) = 3 X 2 = p > α do NOT reject H o There is NOT significant evidence to suggest an association between gender and type of crime (α = 0.05).