### Similar presentations

10 - 2 Copyright © 2014 Pearson Education, Inc. All rights reserved Learning Objectives  Distinguish between tests of homogeneity and tests of independence.  Understand when it is appropriate to use a chi- square statistic to test whether two categorical variables are associated; know how to perform this test and interpret the results.

10 - 3 Copyright © 2014 Pearson Education, Inc. All rights reserved Learning Objectives Continued  Understand how random assignment is used to allow cause and-effect inference, and understand how random sampling is used to allow generalization to a larger population.  Be prepared to apply knowledge about collecting and analyzing data to critically evaluate abstracts in the science literature.

10 - 5 Copyright © 2014 Pearson Education, Inc. All rights reserved Ingredients for Hypothesis Tests Involving Categorical Variables  Data  Expected Counts  Chi-Square Statistics  Chi-Square Distribution

10 - 6 Copyright © 2014 Pearson Education, Inc. All rights reserved Data  Is Political Affiliation associated with Music Preference?  Two Way Table DemocratRepublican Pop7052 Classic Rock3457 Other2116

10 - 7 Copyright © 2014 Pearson Education, Inc. All rights reserved Finding Expected Counts   If they are independent, then the number of Republicans who listen to Pop would be  There are six expected counts to compute. DemocratRepublican Pop8552 Classic Rock3457 Other2116

10 - 8 Copyright © 2014 Pearson Education, Inc. All rights reserved Finding Expected Counts  Each of the expected counts is shown in the parentheses.  Computers can easily find the expected counts. DemocratRepublican Pop85 (69.75)52 (68.50) Classic Rock34 (46.33)57 (44.67) Other21 (23.93)16 (23.07) Survey of 250 People

10 - 9 Copyright © 2014 Pearson Education, Inc. All rights reserved The Chi-Square Test Statistic  Test Statistic:   Computer is easier than by hand   2 ≈ 14.2 DemocratRepublican Pop85 (69.75)52 (68.50) Classic Rock34 (46.33)57 (44.67) Other21 (23.93)16 (23.07)

10 - 11 Copyright © 2014 Pearson Education, Inc. All rights reserved The Chi-Square Distribution   2 ≈ 14.2  DF = (Rows – 1)(Columns – 1) = (3-1)(2-1) = 2  p-value = 0.0008 DemocratRepublican Pop85 (69.75)52 (68.50) Classic Rock34 (46.33)57 (44.67) Other21 (23.93)16 (23.07) Survey of 250 People

10 - 12 Copyright © 2014 Pearson Education, Inc. All rights reserved Using the  2  All expected counts must be 5 or higher.  Data is qualitative.  Can be used to test if two variables are independent or associated.  Can be used to test if two populations follow the same distribution.

10 - 14 Copyright © 2014 Pearson Education, Inc. All rights reserved Test for Independence  One sample two categorical variables.  Answers whether there is an association between two categorical variables.  Random, independent collection.  All expected counts greater than 5.  H 0 : The two variables are independent.  H a : There is an association between the two variables.

10 - 15 Copyright © 2014 Pearson Education, Inc. All rights reserved Is type of business associated with US region? A random sample of 558 businesses was studied ManufacturingRetailFinancial East479267 Central234018 North192814 South394047 West254316 1. Hypothesize  H 0 : business type and region are independent  H a : Business type and region are associated

10 - 16 Copyright © 2014 Pearson Education, Inc. All rights reserved 2. Prepare   = 0.05,  2 test for independence, all expected counts greater then 5.  Stat →Tables→Contingency→with summary

10 - 19 Copyright © 2014 Pearson Education, Inc. All rights reserved 4. Interpret  P-value = 0.0263 < 0.05 =   Reject H 0  Accept H a  There is statistically significant evidence to support the claim that business type and region are associated.

10 - 20 Copyright © 2014 Pearson Education, Inc. All rights reserved Test for Homogeneity  Two samples, one categorical question.  Tests if the two populations are associated. Is the distribution for the first population the same as for the second population?  Differs from Test for Independence in that there are two samples and one variable instead of one sample and two variables.

10 - 21 Copyright © 2014 Pearson Education, Inc. All rights reserved Do freshmen and sophomores have different opinions about spending a year abroad? Is spending a year abroad a good idea? Strongly Agree AgreeDisagreeStrongly Disagree Freshmen4533187 Sophomores3228206 1. Hypothesize  H 0 : The distributions of opinions for freshmen and sophomores are the same.  H a : The distributions of opinions for freshmen and sophomores are not the same.

10 - 22 Copyright © 2014 Pearson Education, Inc. All rights reserved 2. Prepare   = 0.05   2 test for homogeneity  All expected counts are greater than 5.

10 - 24 Copyright © 2014 Pearson Education, Inc. All rights reserved 4. Interpret  P-value = 0.7367 > 0.05 =   There is statistically insignificant evidence to conclude that the distributions of opinions for freshmen and sophomores are not the same.

10 - 25 Copyright © 2014 Pearson Education, Inc. All rights reserved Comparing Test for Independence and Difference Between Proportions  For testing two variables each with two possible outcomes, the test for independence will give the same result as a two tailed test for the difference between proportions.  To show one answer occurs with higher probability for one group than another only the one tailed test for a difference between proportions can be used.

10 - 27 Copyright © 2014 Pearson Education, Inc. All rights reserved Is Oil Amount Associated With Successful Popcorn?  Success means at least half the kernels popped in 75 seconds or less.  H 0 : The quality of popcorn and the amount of oil are independent.  H a : The quality of popcorn and the amount of oil are associated.

10 - 28 Copyright © 2014 Pearson Education, Inc. All rights reserved Is Oil Amount Associated With Successful Popcorn?  All expected counts at least 5.  p-value = 0.006 is very small.  Reject H 0, Accept H a  There is statistically significant evidence to support the claim that oil amount and popcorn success are associated.

10 - 30 Copyright © 2014 Pearson Education, Inc. All rights reserved Obesity and Relationship  In a study reported in the medical journal Obesity the research subjects were categorized in terms of whether or not they were obese and whether they were dating, cohabiting, or married.  Test the hypothesis that the variables Relationship Status and Obesity are associated, using a significance level of 0.05.

10 - 31 Copyright © 2014 Pearson Education, Inc. All rights reserved 1. Hypothesize  Calculate the row, column and grand totals.  H 0 : Relationship status and obesity are independent.  H a : Relationship status and obesity are associated. DatingCohabitatingMarriedTotal Obese81103147331 Not Obese359326277962 Total4404294241293

10 - 32 Copyright © 2014 Pearson Education, Inc. All rights reserved 2. Prepare  We choose the chi-square test for independence because the data were from one random sample in which the people were classified two different ways. Find the smallest expected value and report it. Is it more than 5?  The smallest expected value is 108.5.  Since it is much bigger than 5, the  2 -test can be used.

10 - 34 Copyright © 2014 Pearson Education, Inc. All rights reserved 4. Interpret  p-value < 0.001  p-value < 0.001 < 0.05 = .  Reject H 0. Accept H a.  There is statistically significant evidence to conclude that relationship status and obesity are associated.

10 - 35 Copyright © 2014 Pearson Education, Inc. All rights reserved Causality  Can we conclude from these data that living with someone is making some people obese and that marrying is making even more people obese?  No. We can only conclude that obesity and relationship status are associated.  Can we conclude that obesity affects your relationship status?  No. Cause and effect cannot be concluded based on just looking at the data. A control study would have to be done if possible.

10 - 36 Copyright © 2014 Pearson Education, Inc. All rights reserved Percentages  Find and compare the percentages obese in the three relationship statuses.  In StatCrunch, select Column Percent.  We see that the percent obese (34.67%) for the married category is much higher than the percent obese for the dating category (18.41%). The obesity percent (24.01%) for cohabitating couples is in the middle.