Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Inferring Population Means.

Similar presentations


Presentation on theme: "Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Inferring Population Means."— Presentation transcript:

1 Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Inferring Population Means

2 1 - 2 Copyright © 2013 Pearson Education, Inc.. All rights reserved. Learning Objectives  Understand when a goodness-of-fit test is needed and appropriate, and know how to perform the test and interpret results.  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 © 2013 Pearson Education, Inc. All rights reserved 10.1 The Basic Ingredients for Testing with Categorical Variables

4 1 - 4 Volunteers Representative of Student Body? WhiteAsianHispanicOther 34%32%13%21% Copyright © 2013 Pearson Education, Inc.. All rights reserved. Ethnicities for UCLA Student Body WhiteAsianHispanicOther 1501204585 Random Sample of 400 UCLA Volunteers  Is the ethnic distribution of volunteers the same as the ethnic distribution for the student body?

5 1 - 5 What Would We Expect? WhiteAsianHispanicOther 34%32%13%21% Copyright © 2013 Pearson Education, Inc.. All rights reserved. Ethnicities for UCLA Student Body WhiteAsianHispanicOther Observed1501204585 Random Sample of 400 UCLA Volunteers  0.34 x 400 = 136  0.13 x 400 = 52  0.32 x 400 = 128  0.21 x 400 = 84 Expected1361285284

6 1 - 6 Questions on Goodness of Fit  The observed counts are not the same as the expected counts.  Are they far enough from expected to conclude that the distribution of all UCLA volunteers differs from the student body distribution? Copyright © 2013 Pearson Education, Inc.. All rights reserved. WhiteAsianHispanicOther Observed1501204585 Expected1361285284 Random Sample of 400 UCLA Volunteers

7 1 - 7  2 Test Statistic   2 measures how far the observed is from the expected.     2 = 0.12 + 0.47 + 0.94 + 0.01 = 1.54 Copyright © 2013 Pearson Education, Inc.. All rights reserved. WhiteAsianHispanicOther Observed1501204585 Expected1361285284 Random Sample of 400 UCLA Volunteers

8 1 - 8 Political Affiliation and Music Preference  Is Political Affiliation associated with Music Preference?  Copyright © 2013 Pearson Education, Inc.. All rights reserved. DemocratRepublican Pop7052 Classic Rock3457 Other2116 Survey of 250 People

9 1 - 9 Finding Expected Counts   If they are independent, then the number of Republicans who listen to Pop would be Copyright © 2013 Pearson Education, Inc.. All rights reserved. DemocratRepublican Pop8552 Classic Rock3457 Other2116 Survey of 250 People

10 1 - 10 Finding Expected Counts  Same test statistic:  Computer is easier than by hand   2 ≈ 14.2  DF = (Rows – 1)(Columns – 1) = (3-1)(2-1) = 2  p-value = 0.0008 Copyright © 2013 Pearson Education, Inc.. All rights reserved. DemocratRepublican Pop85 (69.75)52 (68.50) Classic Rock34 (46.33)57 (44.67) Other21 (23.93)16 (23.07) Survey of 250 People

11 1 - 11 Using the  2  All expected counts must be 5 or higher.  Data is qualitative.  Can be used to test if an unknown distribution is the same as a known distribution.  Can be used to test if two variables are independent or associated. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

12 Copyright © 2013 Pearson Education, Inc. All rights reserved 10.2 The Chi-Square Test for Goodness of Fit

13 1 - 13 Chi-Square Test for Goodness of Fit  Used to see if an unknown distribution is different from a given distribution.  Always the same null and alternative hypotheses:  H 0 : The population distribution of the variable is the same as the proposed distribution.  H a : The population distributions are different.  Uses a  2 test statistic.  The rest follows the standard procedure. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

14 1 - 14 Chi-Square Test for Goodness of Fit  To find the expected count:  Percent of the population times the sample size  for uniform distribution  Uses a  2 test statistic.  The degrees of freedom (DF):  numbers of categories – 1  All expected counts must be greater than 5.  The rest follows the standard procedure. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

15 1 - 15 Goodness of Fit: Rolling a Die  You are playing a game that involves rolling a die and suspect that the die is not fair. 1. Hypothesize  H 0 : The die is fair. (1,2,3,4,5, and 6 are equally likely to occur)  H a : The die is not fair.  You roll it 300 times and get: Copyright © 2013 Pearson Education, Inc.. All rights reserved.

16 1 - 16 Goodness of Fit: Rolling a Die 2. Prepare  Use  = 0.01,  2 Statistic, all expected counts are greater than 5.  If all numbers our equally likely to occur, then we would expect to get 50 of each value, 300/6 = 50. Copyright © 2013 Pearson Education, Inc.. All rights reserved. Outcome123456 Observed354569524356 Expected50

17 1 - 17 3. Compute to Compare  Stat → Goodness-of-fit → Chi-Square test Copyright © 2013 Pearson Education, Inc.. All rights reserved.

18 1 - 18 4. Interpret  P-Value = 0.0156 > 0.01 =   Fail to reject H 0  There is insufficient evidence to support the claim that the die is not fair. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

19 1 - 19 Facts about Goodness of Fit  The test statistic  2 will always be non- negative.  If  2 is close to 0, then we will fail to reject H 0.  If  2 is large, then we will reject H 0.  Can conclude that the unknown distribution differs from the known.  Cannot conclude that the unknown distribution is the same as the known. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

20 1 - 20 Counts Must Be Used  If proportions are given instead of counts  Multiply each proportion by the sample size to obtain the count.  If percents are given instead of counts  Convert the percents to decimals by dividing by 100. Then multiply each percent by the sample size to obtain the count. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

21 Copyright © 2013 Pearson Education, Inc. All rights reserved 10.3 Chi-Square Tests for Associations between Categorical Variables

22 1 - 22 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 Copyright © 2013 Pearson Education, Inc.. All rights reserved.

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

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

25 1 - 25 3. Compute to Compare Copyright © 2013 Pearson Education, Inc.. All rights reserved.

26 1 - 26 3. Compute to Compare   2 ≈ 17.38  P-value = 0.0263 Copyright © 2013 Pearson Education, Inc.. All rights reserved.

27 1 - 27 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

28 1 - 28 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 Goodness of Fit in that there are two samples instead of one sample and one known population.  Differs from Test for Independence in that there are two samples and one variable instead of one sample and two variables. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

29 1 - 29 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 Copyright © 2013 Pearson Education, Inc.. All rights reserved. 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.

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

31 1 - 31 3. Compute to Compare Copyright © 2013 Pearson Education, Inc.. All rights reserved.  Stat →Tables→Contingency→with summary

32 1 - 32 4. Interpret Copyright © 2013 Pearson Education, Inc.. All rights reserved.  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.

33 1 - 33 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

34 Copyright © 2013 Pearson Education, Inc. All rights reserved 10.4 Hypothesis Tests When Sample Sizes Are Small

35 1 - 35 Small Sample Sizes: Consolidation  Were hospitalization rates from the swine flu different for different ages?  With expected counts less than 5, the  2 test cannot be used.  Instead, consolidate into just young, middle and old. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

36 1 - 36 Small Sample Sizes: Consolidation  Were hospitalization rates from the swine flu different for different ages? Copyright © 2013 Pearson Education, Inc.. All rights reserved. Age Category Under 1515 – 2930 and OlderTotals Yes1691035 No239241104584 Totals255250114

37 1 - 37 Small Sample Sizes: Consolidation  Were hospitalization rates from the swine flu different for different ages?  Now the sample sizes are large enough.  p-value = 0.12 is large. Copyright © 2013 Pearson Education, Inc.. All rights reserved. Age Category Under 1515 – 2930 and OlderTotals Yes1691035 No239241104584 Totals255250114

38 1 - 38 Were hospitalization rates from the swine flu different for different ages?  Fail to reject the null hypothesis. There is insignificant evidence to make a conclusion about whether hospitalization rates from the swine flu were different for different ages.  Problems with this approach:  Grouping infants and young teens may not make sense.  Grouping middle aged people with senior citizens may not make sense. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

39 1 - 39 Fisher’s Exact Test  Used to compare two proportions (or more proportions with advanced techniques).  Can be used with small sample sizes.  Too advanced without the use of technology such as StatCrunch.  For larger sample sizes use a test for independence, homogeneity, or difference between proportions. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

40 Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Case Study

41 1 - 41 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

42 1 - 42 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

43 Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Guided Exercise 1

44 1 - 44 Are Humans Like Random Number Generators?  38 students were asked to pick a “random” number from 1 to 5.  Test the hypothesis that humans are not like random number generators. Use a significance level of 0.05, and assume the data were collected from a random sample of students. Copyright © 2013 Pearson Education, Inc.. All rights reserved. IntegerOneTwoThreeFourFive Frequency3514115

45 1 - 45 Are Humans Like Random Number Generators? 1. Hypothesize  H 0 : Humans are like random number generators and produce numbers in equal quantities.  H a : Humans do not produce numbers in equal quantities. 2. Prepare  Why are all Expected = 7.6?  38/5 = 7.6  Use the  2 statistic. Copyright © 2013 Pearson Education, Inc.. All rights reserved. IntegerOneTwoThreeFourFive Freq.3514115

46 1 - 46 3. Compute to Compare  p-value = 0.0217 Copyright © 2013 Pearson Education, Inc.. All rights reserved.

47 1 - 47 4. Interpret  p-value = 0.0217 < 0.05 =   Reject H 0. Accept H a.  Conclusion: Humans have been shown to be different from random number generators. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

48 Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Guided Exercise 2

49 1 - 49 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

50 1 - 50 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved. DatingCohabitatingMarriedTotal Obese81103147331 Not Obese359326277962 Total4404294241293

51 1 - 51 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

52 1 - 52 3. Compute to Compare   2 ≈ 30.83  p-value < 0.001 Copyright © 2013 Pearson Education, Inc.. All rights reserved.

53 1 - 53 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

54 1 - 54 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.

55 1 - 55 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. Copyright © 2013 Pearson Education, Inc.. All rights reserved.


Download ppt "Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Inferring Population Means."

Similar presentations


Ads by Google