Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Associations Between Categorical Variables.

Similar presentations


Presentation on theme: "Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Associations Between Categorical Variables."— Presentation transcript:

1 Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Associations Between Categorical Variables

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.

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.

4 Copyright © 2014 Pearson Education, Inc. All rights reserved 10.1 The Basic Ingredients for Testing with Categorical Variables

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

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

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

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

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 Copyright © 2014 Pearson Education, Inc. All rights reserved The Chi-Square Distribution  Degrees of Freedom = (Rows – 1)(Columns – 1)

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 = DemocratRepublican Pop85 (69.75)52 (68.50) Classic Rock34 (46.33)57 (44.67) Other21 (23.93)16 (23.07) Survey of 250 People

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.

13 Copyright © 2014 Pearson Education, Inc. All rights reserved 10.2 Chi-Square Tests for Associations between Categorical Variables

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.

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 East Central North South West Hypothesize  H 0 : business type and region are independent  H a : Business type and region are associated

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

17 Copyright © 2014 Pearson Education, Inc. All rights reserved 3. Compute to Compare

18 Copyright © 2014 Pearson Education, Inc. All rights reserved 3. Compute to Compare   2 ≈  P-value =

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

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.

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 Freshmen Sophomores 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.

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

23 Copyright © 2014 Pearson Education, Inc. All rights reserved 3. Compute to Compare  Stat →Tables→Contingency→with summary

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

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.

26 Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Case Study

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.

28 Copyright © 2014 Pearson Education, Inc. All rights reserved Is Oil Amount Associated With Successful Popcorn?  All expected counts at least 5.  p-value = 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.

29 Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Guided Exercise

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.

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 Obese Not Obese Total

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  Since it is much bigger than 5, the  2 -test can be used.

33 Copyright © 2014 Pearson Education, Inc. All rights reserved 3. Compute to Compare   2 ≈  p-value < 0.001

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

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.

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.


Download ppt "Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 10 Associations Between Categorical Variables."

Similar presentations


Ads by Google