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.

Slides:



Advertisements
Similar presentations
Chapter 11 Inference for Distributions of Categorical Data
Advertisements

Chapter 13: Inference for Tables
+ Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference for Relationships.
Does Background Music Influence What Customers Buy?
Chapter 13: Inference for Distributions of Categorical Data
1 Chi-Squared Distributions Inference for Categorical Data and Multiple Groups.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 25, Slide 1 Chapter 25 Comparing Counts.
Chapter 26: Comparing Counts
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
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.
Ch 10 Comparing Two Proportions Target Goal: I can determine the significance of a two sample proportion. 10.1b h.w: pg 623: 15, 17, 21, 23.
Analysis of Count Data Chapter 26
Goodness-of-Fit Tests and Categorical Data Analysis
 Involves testing a hypothesis.  There is no single parameter to estimate.  Considers all categories to give an overall idea of whether the observed.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 26 Comparing Counts.
A random sample of 300 doctoral degree
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.
1 Desipramine is an antidepressant affecting the brain chemicals that may become unbalanced and cause depression. It was tested for recovery from cocaine.
Chapter 11 Chi-Square Procedures 11.3 Chi-Square Test for Independence; Homogeneity of Proportions.
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.
Warm-up Researchers want to cross two yellow- green tobacco plants with genetic makeup (Gg). See the Punnett square below. When the researchers perform.
Lecture 9 Chapter 22. Tests for two-way tables. Objectives The chi-square test for two-way tables (Award: NHST Test for Independence)  Two-way tables.
Chapter 26 Chi-Square Testing
Chapter 11 Inference for Tables: Chi-Square Procedures 11.1 Target Goal:I can compute expected counts, conditional distributions, and contributions to.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Chapter 11 The Chi-Square Test of Association/Independence Target Goal: I can perform a chi-square test for association/independence to determine whether.
13.2 Chi-Square Test for Homogeneity & Independence AP Statistics.
+ Chi Square Test Homogeneity or Independence( Association)
Chi-Square Analysis Test of Homogeneity. Sometimes we compare samples of different populations for certain characteristics. This data is often presented.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
Analysis of two-way tables - Inference for two-way tables IPS chapter 9.1 © 2006 W.H. Freeman and Company.
Analysis of two-way tables - Inference for two-way tables IPS chapter 9.2 © 2006 W.H. Freeman and Company.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
Inference for Distributions of Categorical Variables (C26 BVD)
Lecture 9 Chapter 22. Tests for two-way tables. Objectives (PSLS Chapter 22) The chi-square test for two-way tables (Award: NHST Test for Independence)[B.
AP STATISTICS LESSON (DAY 1) INFERENCE FOR TWO – WAY TABLES.
+ Chapter 11 Inference for Distributions of Categorical Data 11.1Chi-Square Goodness-of-Fit Tests 11.2Inference for Relationships.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Comparing Counts Chapter 26. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
Chapter 13 Section 2. Chi-Square Test 1.Null hypothesis – written in words 2.Alternative hypothesis – written in words – always “different” 3.Alpha level.
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.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
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.
Inference of 2-way Tables. Review… New Stuff: 2-Way Tables  Looking for Significant difference across 2 variables instead of just 1 (hence, 2-way) 
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,
 Check the Random, Large Sample Size and Independent conditions before performing a chi-square test  Use a chi-square test for homogeneity to determine.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 11: Inference for Distributions of Categorical Data Section 11.2 Inference.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
Objectives (PSLS Chapter 22)
Objectives (BPS chapter 23)
Warm-up Researchers want to cross two yellow-green tobacco plants with genetic makeup (Gg). See the Punnett square below. When the researchers perform.
Chapter 12 Tests with Qualitative 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
Inference for Relationships
Analyzing the Association Between Categorical Variables
Inference for Two Way Tables
Comparing Proportions for Multiple Populations
11.2 Inference for Relationships
Chapter 13: Chi-Square Procedures
Presentation transcript:

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 homogeneity to determine whether the distribution of a categorical variable differs for several populations or treatments. 11.2a h.w: pg 694: 19 – 22; pg 724: 27 – 35 odd, 43

To compare two proportions, we use a 2-Proportion Z. If we want to compare three or more proportions, we need a new procedure.

Two Way Tables The first step in the overall test for comparing several proportions is to arrange the data in a two-way table that gives counts for both successes and failures. Think of the counts as elements of a matrix with r rows and c columns. This is called an r x c table with (r)(c) cells.

Our null hypothesis is that there is no difference among the proportions. Ho: p1 = p2 = p3 The alternative hypothesis is that there is some difference among the proportions. Ha: not all of p1, p2, and p3 are equal

We will use the chi-square test to measure how far the observed values are from the expected values.

Expected Counts to calculate, multiply the row total by the column total, and divide by the table total:

Chi-Square Statistic is the sum over all r x c cells in the table The degrees of freedom is (r – 1)(c – 1). The P-value is the area to the right of the X 2 statistic under the chi-square density curve.

Ex: Treating Cocaine Addiction Read aloud pg. 710 Group Treatment Subjects No relapse Proportion 1 Desipramine 24 14 0.583 2 Lithium 24 6 0.250 3 Placebo 24 4 0.167 Plot data: compares the success rates of 3 treatments for cocaine addition.

Two way table How many subjects relapsed? Observed Counts Relapse Treatment no yes Total Desipramine 14 10 24 Lithium 6 18 24 Placebo 4 20 24 Total 24 48 72 How many subjects relapsed? 48/72 subjects relapsed: (2/3)

Calculate Expected Counts Relapse Observed Expected (s) (f) (s) (f) Treatment no yes no yes Desipramin 14 10 16 Lithium 6 18 16 Placebo 4 20 16 8

What do you observe? We expect 2/3’s of the subjects to relapse. How did Desipramin do? Fewer relapses (10) and more successes (14) than expected. How did the Placebo do? More relapses (20) and fewer successes (4) than expected. How did Lithium do? Between desipramin and the placebo More directly: Desipramin does much better than the placebo with lithium in between.

As in the test for goodness of fit of the X 2 statistic, think of as a measure of the distance of the observed counts from the expected counts. Large values of X 2 are evidence against Ho , because they say that the observed counts are far from what we would expect if Ho were true. Small values are not.

Remember: Although the Ha is many-sided, the chi-square test is always one sided! Any violation of Ho tends to produce a large value of X 2.

Chi-Square Test for Homogeneity In the Cocaine addiction example we had three examples. We can use the same chi-square procedure with several populations if we take separate and independent random samples from each population.

Cell Counts required for the Chi-Square Test Expected counts conditions: No more than 20% of the Expected counts are less than 5 All individual expected counts are 1 or greater For 2x2 table, all expected counts should be 5 or greater.

Ex. Treating Cocaine Addiction continued. We have examined the data from the three cocaine treatment groups informally. Now we proceed formally. Step 1: State We want to perform a test of Ho: p1 = p2 = p3 The proportion of cocaine addicts who avoid relapse are the same. Ha: Not all three of the proportions are equal. Make sure to define p1, p2, and p3

Random: the subjects were assigned to three treatment groups. Step 2: Plan If conditions are met, we should carry out a chi-square test for homogeneity. Random: the subjects were assigned to three treatment groups. Large Sample Size: Expected counts? Yes, all 5 No more than 20% are less than 5: the smallest expected count was 8.

Independent: The random assignment helps create three independent groups. If the experiment is conducted properly, then knowing one subject’s relapse status should give us no information about another subject’s outcome. So individual observations are independent.

(for success and failure): = + + + + + = 10.5 Step 3: Do - Since the conditions are satisfied, we can a perform chi-test for homogeneity. We begin by calculating the test statistic. The test statistic is (for success and failure): = + + + + + = 10.5 df = (r-1)(c-1) = (3-1)(2-1) = 2

Find P-value from table C or X 2cdf(10.5, E99, 2) Falls between .01 and .005. P = .0052

Step 4. Conclude - Interpret the results in the context of the problem. Since the P-value is less than 0.01, the difference between the three proportions are statistically significant at the α = 0.01 level. We would reject the null hypothesis and conclude that not all three of the proportions of cocaine addicts who avoid relapse are the same.

Do the Chi square Tests on the TI-38/89: see page 705 Use Matrix for observed and expected counts and then use Stat:Test: X2 test to calculate X2 value and P-value. Note, you only need to enter the “observed count”. When you use Stat:Test: X2 :Test, the calculator does the expected counts for you and puts them in matrix B. You do need to be able to calculate an individual cell expected value for the test.

Quiz tomorrow 11.1