 Check the Random, Large Sample Size and Independent conditions before performing a chi-square test  Use a chi-square test for homogeneity to determine.

Slides:



Advertisements
Similar presentations
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Advertisements

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
Does Background Music Influence What Customers Buy?
Chapter 13: Inference for Distributions of Categorical Data
Copyright ©2011 Brooks/Cole, Cengage Learning More about Inference for Categorical Variables Chapter 15 1.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Categorical Variables Chapter 15.
1 Chi-Squared Distributions Inference for Categorical Data and Multiple Groups.
CHAPTER 11 Inference for Distributions of Categorical Data
1 Chapter 20 Two Categorical Variables: The Chi-Square Test.
Presentation 12 Chi-Square test.
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.
 Involves testing a hypothesis.  There is no single parameter to estimate.  Considers all categories to give an overall idea of whether the observed.
A random sample of 300 doctoral degree
Chi-square test or c2 test
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 26 Chi-Square Testing
CHAPTER 11 SECTION 2 Inference for Relationships.
+ Chi Square Test Homogeneity or Independence( Association)
BPS - 5th Ed. Chapter 221 Two Categorical Variables: The Chi-Square Test.
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.
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 11.1Chi-Square Goodness-of-Fit Tests 11.2Inference for Relationships.
Lesson Inference for Two-Way Tables. Knowledge Objectives Explain what is mean by a two-way table. Define the chi-square (χ 2 ) statistic. Identify.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
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.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
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.
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.
Textbook Section * We already know how to compare two proportions for two populations/groups. * What if we want to compare the distributions of.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
11.1 Chi-Square Tests for Goodness of Fit
Warm Up Check your understanding on p You do NOT need to calculate ALL the expected values by hand but you need to do at least 2. You do NOT need.
CHAPTER 11 Inference for Distributions of Categorical Data
Chi-square test or c2 test
Warm-up Researchers want to cross two yellow-green tobacco plants with genetic makeup (Gg). See the Punnett square below. When the researchers perform.
Vocabulary Statistical Inference – provides methods for drawing conclusions about a population parameter from sample data Expected Values– row total *
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 12 Tests with Qualitative Data
CHAPTER 11 Inference for Distributions of Categorical Data
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Inference for Relationships
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
Chapter 11: Inference for Distributions of Categorical Data
CHAPTER 11 Inference for Distributions of Categorical Data
Chapter 10 Analyzing the Association Between Categorical Variables
Chi-Square Goodness-of-Fit Tests
Inference for Relationships
CHAPTER 11 Inference for Distributions of Categorical Data
Analyzing the Association Between Categorical Variables
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
Chi Square Test of Homogeneity
Presentation transcript:

 Check the Random, Large Sample Size and Independent conditions before performing a chi-square test  Use a chi-square test for homogeneity to determine whether the distribution of a categorical variable differs for several populations or treatments  Interpret computer output for a chi-square test based on a two-way table  Examine individual components of the chi- square statistic as part of a follow-up analysis  Show that the two-sample z test for comparing two proportions and the chi-square test for a 2- by-2 two-way table give equivalent results

 +wort&view=detail&mid=EE2829F48ED52D904F13EE2829 F48ED52D904F13&first=21&FORM=LKVR12 +wort&view=detail&mid=EE2829F48ED52D904F13EE2829 F48ED52D904F13&first=21&FORM=LKVR12  +wort&view=detail&mid=220851A58E7D5E49DFC A58E7D5E49DFC3&first=21&FORM=LKVR10 +wort&view=detail&mid=220851A58E7D5E49DFC A58E7D5E49DFC3&first=21&FORM=LKVR10   An article in the Journal of the American Medical Association (vol. 287, no. 14, April 10, 2002) reports the results of a study designed to see if the herb Saint-Jon’s- wort is effective in treating moderately severe cases of depression. The study involved 228 subjects who were being treated for major depression. The subjects were randomly assigned to receive one of three treatments – Saint-John’s-wort, Zoloft (a prescription drug), or a placebo – for an eight-week period. The table below summarizes the results of the experiment.

 (a) Calculate the conditional distribution (in proportions) of the type of response for each treatment.  (b) Make an appropriate graph for comparing the conditional distributions in part (a).  (c) Compare the distributions of response for each treatment. Saint- John’s- wort ZoloftPlaceb o Total Full Respon se Partial respons e No respons e Total

 (a) For the Saint-John’s-wort treatment: › Full: 27/113 = › Partial: 16/113 = › No: 70/113 =  For the Zoloft treatment: › Full: 27/109 = › Partial: 26/109 = › No: 56/109 =  For the placebo treatment: › Full: 37/116 = › Partial: 13/116 = › No: 66/116 = 0569

 (b) Use either a bar graph or segmented bar graph.  (c) Surprisingly, a higher proportion of subjects receiving the placebo had a full response than subjects receiving Saint- John’s-wort or Zoloft. Overall, a higher proportion of Zoloft users had at least some response, followed by placebo users, and then Saint-John’s wort users.

 What would the hypotheses be if we did a test with this data? › H 0 : There is NO difference in distribution of responses of patients with major depression when there is Saint-John’s-wort, Zoloft, or Placebo › H a : There is a difference in distribution of responses of subjects with major depression when there is Saint-John’s-wort, Zoloft, or Placebo

 The problem of how to do many comparisons at once with an overall measure of confidence in all our conclusions is common in statistics.  This is the problem of multiple comparisons. › 1. An overall test to see if there is good evidence of any difference among the parameters that we want to compare. › 2. A detailed follow up analysis to decide which of the parameters differ and to estimate how large the differences are.

 Calculate the expected counts for the three treatments, assuming that all three treatments are equally effective.  (turn to a person around you and see if you can figure out the expected counts!) › Full response: 91/338 = 26.9%  we expect 26.9% of patients in each treatment group to have a full response.  Saint-John’s wort: (91/338)(113) = 30.4  Zoloft: (91/338)(109) = 29.3  Placebo: (91/338)(116) = 31.2 › Do the same for the other responses and fill in the chart below.

Saint- John’s-wort ZoloftPlaceboTotal Full Response 27 ( 30.4) 27 (29.3) 37 (31.2) 91 Partial response 16 (18.4) 26 (17.7) 13 (18.9) 55 No response 70 (64.2) 56 (61.9) 66 (65.9) 192 Total

 Expected count = (row total)(column total) table total  Remember, you don’t NEED to use this formula – we just did the (row total/table total)(column total) in the last example!

 Calculate the chi-square statistic. Show your work.

 We use Chi-Square Goodness of Fit Test for one categorical variable (with df = #categories – 1)  We use Chi-Square Test for Homogeneity for a categorical variable of several populations or treatments. › Typically for a two-way table or a comparative experiment.

 If the Random, Large Sample Size, and Independent conditions are met. You can use the chi-square test for homogeneity to test: › H 0 : There is no difference in distribution of a categorical variable for several populations or treatments. › H a : There is a difference in distribution of a categorical variable for several populations or treatments.  1.) Find the expected counts  2.) Find the chi-square statistic  3.) Use degrees of freedom = (number of rows – 1)(number of columns – 1) and Table C to find the P-value.

 Back to the example – here is what we have found so far:  H 0 : There is no difference in distribution of responses of patients with major depression when there is Saint- John’s-wort, Zoloft, or Placebo  H a : There is a difference in distribution of responses of subjects with major depression when there is Saint- John’s-wort, Zoloft, or Placebo  Chi square statistic = 8.72  (a) Verify that the conditions for the test are satisfied.  (b) Calculate the P-value for this test.  (c) Interpret the P-value in context.  (d) What is your conclusion?

 (a) Verify that the conditions for the test are satisfied. › Random: The treatments were randomly assigned. › Large Sample Size: The expected counts (30.4, 29.3, 31.2, 18.4, 17.7, 18.9, 64.2, 61.9, 65.9) are all at least 5. › Independent: Knowing the response of one patient should not provide any additional information about the response of any other patient. (NOT sampling without replacement, so don’t have to check the 10% rule)

 (b) Calculate the P-value for this test. › Df = (3-1)(3-1) = 4 › Using Table C, in row 4, our chi square statistic of 8.72 falls between.05 and › Or Using Calculator: X 2 cdf(8.72, 1000, 4) =  (c) Interpret the P-value in context. › Assuming that the treatments were equally effective, the probability of observing a difference in the distributions of responses among the three treatment groups as large as or larger than the one in the study is about 7%.  (d) What is your conclusion?

› Since the P-value is > than 0.05, we fail to reject the null hypothesis. › We do NOT have convincing evidence that there is a difference in the distributions of responses for patients with moderately sever cases of depression when taking Saint-John’s-wort, Zoloft, or a placebo.

 Put Observed into Matrix A › 2 nd Matrix  Edit  option 1: A › Choose the size of the matrix by the size of the two-way table without the total column and row  type in observed counts  Do not need to put in expected counts  calculator will calculate these for you!  STAT  TESTS  choose C: X 2 -Test  Choose Calculate or Draw  To see the Expected Counts, go to the Matrix Menu, choose B and hit enter.

 A random sample of 200 children (ages 9-17) from the United Kingdom who filled out a CensusAtSchool survey were asked what was their superpower preference. A random sample of 215 U.S. children (ages 9 -17) was selected from the same survey. Here are the results: U.K.U.S.TOTAL Fly Freeze Time Invisibility Superstrength Telepathy TOTAL

 (a) Construct an appropriate graph to compare the distribution of superpower preference for U.K. and U.S. children.  (b) Do these data provide convincing evidence that the distribution of superpower preference differs among U.S. and U.K. children? › (STATE, PLAN, DO, CONCLUDE!)

 (a) Draw a bar graph or segmented bar graph that compares the conditional distributions (in proportions) of superpower preference for the children in each country’s sample.

 (b) STATE: We want to perform a test of the following hypotheses with a significance level = › H 0 : There is no difference in the distributions of superpower preference for U.S. and U.K. children. › H a : There is a difference in the distributions of superpower preference for U.S. and U.K. children.

 PLAN: If conditions are met, we will perform a chi- square test for homogeneity. › Random: The data are from separate random samples of U.K. and U.S. children › Large Sample Size: The expected counts (see below) are all at least 5. › Independent: The sample were independently selected. Also, since there are at least 10(200) = 2000 children in the U.K. and at least 10(215) = 2150 children in the United States, both samples are less than 10% of their populations. U.K.U.S.TOTAL Fly Freeze Time Invisibility Superstrength Telepathy TOTAL

 (b) DO: › Test statistic: › P-value: Using (5-1)(2-1) = 4 degrees of freedom, P-value = X2cdf(6.29, 1000, 4) =  CONCLUDE: › Because the P-value is greater than 0.05, we fail to reject the null hypothesis. We do NOT have convincing evidence that there is a difference in the distributions of superpower preference for U.S. and U.K. schoolchildren.

 Assigned reading: p. 696 – 713  BEGIN HW problems:  p. 724 #28, 30, 32, 33, 35, 36, 37, 39, 41, 43, 44, 46, 47, 49, 52,  Check answers to odd problems.