Dan Piett STAT 211-019 West Virginia University Lecture 12.

Slides:



Advertisements
Similar presentations
Chi Squared Tests. Introduction Two statistical techniques are presented. Both are used to analyze nominal data. –A goodness-of-fit test for a multinomial.
Advertisements

Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Chapter 10 Chi-Square Tests and the F- Distribution 1 Larson/Farber 4th ed.
Discrete (Categorical) Data Analysis
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.
Making Inferences for Associations Between Categorical Variables: Chi Square Chapter 12 Reading Assignment pp ; 485.
12.The Chi-square Test and the Analysis of the Contingency Tables 12.1Contingency Table 12.2A Words of Caution about Chi-Square Test.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
Chi-Square Tests and the F-Distribution
Quiz 10  Goodness-of-fit test  Test of independence.
1 1 Slide IS 310 – Business Statistics IS 310 Business Statistics CSU Long Beach.
Presentation 12 Chi-Square test.
Goodness of Fit Multinomials. Multinomial Proportions Thus far we have discussed proportions for situations where the result for the qualitative variable.
Copyright © Cengage Learning. All rights reserved. 11 Applications of Chi-Square.
GOODNESS OF FIT TEST & CONTINGENCY TABLE
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics, A First Course 4 th Edition.
Goodness-of-Fit Tests and Categorical Data Analysis
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.7.
Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 10 Inferring Population Means.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on Categorical Data 12.
Section 10.1 Goodness of Fit. Section 10.1 Objectives Use the chi-square distribution to test whether a frequency distribution fits a claimed distribution.
Chapter 11: Applications of Chi-Square. Count or Frequency Data Many problems for which the data is categorized and the results shown by way of counts.
Chi-square test or c2 test
10.1: Multinomial Experiments Multinomial experiment A probability experiment consisting of a fixed number of trials in which there are more than two possible.
Copyright © 2009 Cengage Learning 15.1 Chapter 16 Chi-Squared Tests.
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Chapter 26 Chi-Square Testing
Chapter 13: Categorical Data Analysis Statistics.
Dan Piett STAT West Virginia University Lecture 11.
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Introduction Many experiments result in measurements that are qualitative or categorical rather than quantitative. Humans classified by ethnic origin Hair.
Dan Piett STAT West Virginia University Lecture 10.
Chapter 10 Chi-Square Tests and the F-Distribution
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 16 Chi-Squared Tests.
Dan Piett STAT West Virginia University Lecture 5.
GOODNESS OF FIT Larson/Farber 4th ed 1 Section 10.1.
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.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
AP Statistics Section 14.. The main objective of Chapter 14 is to test claims about qualitative data consisting of frequency counts for different categories.
Copyright © 2010 Pearson Education, Inc. Slide
Section 10.2 Independence. Section 10.2 Objectives Use a chi-square distribution to test whether two variables are independent Use a contingency table.
Introduction to Probability and Statistics Thirteenth Edition Chapter 13 Analysis of Categorical Data.
Test of Goodness of Fit Lecture 43 Section 14.1 – 14.3 Fri, Apr 8, 2005.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
Chapter Outline Goodness of Fit test Test of Independence.
Remember Playing perfect black jack – the probability of winning a hand is.498 What is the probability that you will win 8 of the next 10 games of blackjack?
1 Chapter 10. Section 10.1 and 10.2 Triola, Elementary Statistics, Eighth Edition. Copyright Addison Wesley Longman M ARIO F. T RIOLA E IGHTH E DITION.
Copyright © Cengage Learning. All rights reserved. Chi-Square and F Distributions 10.
© Copyright McGraw-Hill 2004
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Statistics 300: Elementary Statistics Section 11-2.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
1 Outline 1.Count data 2.Properties of the multinomial experiment 3.Testing the null hypothesis 4.Examples.
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.
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 &
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
Goodness-of-Fit and Contingency Tables Chapter 11.
Section 10.1 Goodness of Fit © 2012 Pearson Education, Inc. All rights reserved. 1 of 91.
Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.
Presentation 12 Chi-Square test.
Chi-square test or c2 test
Chapter 12 Tests with Qualitative Data
Qualitative data – tests of association
Chapter 11 Goodness-of-Fit and Contingency Tables
Chapter 13: Categorical Data Analysis
Overview and Chi-Square
Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007
Presentation transcript:

Dan Piett STAT West Virginia University Lecture 12

Last Week Hypothesis Tests on a difference in means Hypothesis Tests on a difference in proportions The 2-sided alternative

Overview Chi-Squared Goodness of Fit Test Chi-Squared Test of Independence

Section 12.1 Chi-Squared Goodness of Fit Test

Multinomial Data Previously we have looked at data coming from a binomial distribution 2 Outcomes (Success, Failure) Example: Flipping a coin (Heads, Tails) Suppose we are interested in data with more than 2 outcomes Example: Rolling a die 6 Outcomes (1, 2, 3, 4, 5, 6) We obtain multinomial data from a multinomial experiment

Multinomial Experiments Multinomial Experiments follow these properties 1. Fixed number of trials, n 2. Each trial results in exactly one of K possible outcomes 3. Probability p i, is the probability of getting outcome i on a single trial p 1 + p 2 + p 3 + … + p K = 1 4. Trials are independent

Finding Expected Frequencies Remembering back to the binomial distribution Expected Value = n*p For our multinomial distribution we will have K expected counts Each Expected Count; E i = n*p i Example: Rolling a fair 6-sided die 600 times (p i = 1/6) Outcome Probability1/6 Expected Counts 100

Observed Frequencies When we do our multinomial experiment, we will not always get exactly our expected counts. Example: We expected 100 4’s on our dice experiment. Suppose we only get is our Observed Frequency; O i Our Observed Frequencies (Counts) are our actual data Suppose on our 600 dice throws, these are our observed counts Outcome Expected Counts 100 Observed Counts

Chi-Squared Goodness of Fit Test So the question to be asked when looking at a table like this is “are our observed counts far enough from our expected counts to determine that the expected counts are wrong?” This is what the Chi-Squared Goodness of Fit Test attempts to answer. Note that our test will follow the 7 step procedure Outcome Expected Counts 100 Observed Counts

Chi-Square Goodness of Fit Test 1. H 0 : p 1 = # 1, p 2 = # 2, … p K = # k 2. H A : At least one p i ≠ # i 3. Alpha is.05 if not specified 4. Test Statistic = 5. P-value will come from the Chi-Squared Table with df = k-1 P(Test Statistic > Chi Squared Tabled Value) There is only 1 alternative hypothesis 6. Our decision rule will be to reject H 0 if p-value < alpha 7. We have (do not have) enough evidence at the.05 level to conclude that the at least one of our probabilities is incorrect. We require that our expected counts at each cell are at least 5 and that our sample is independent and random.

Example: For Fall 2013, 99 STAT 211 students were given a choice of 3 section times (A,B,C) to take the final exam. The data that follows shows the number of students who selected each section. Does the data indicate that the students exhibit a preference, or indicate that all sections are equally likely to be chosen. Use alpha=.05 (Hint: If all 3 are equally likely, all p i ’s will be 1/3) Observed Counts: A – 40 B – 30 C – 29

Section 12.2 Chi-Squared Test for Independence

Association of Categorical Variables Thus far, all of our confidence intervals and hypothesis tests have been done on numeric variables. We will now shift our attention to categorical variables Ex: Eye Color, Class Rank The question we wish to answer is, “is there an association between two categorical variables?” Ex: Is there an association between Eye Color and Hair Color? We will use a Chi Squared Test to answer this question, but first we need to discuss contingency tables.

Contingency Tables (Observed) We can organize categorical data in a contingency table, with r rows and c columns. This is known as an r x c (r by c) contingency table. Note that the contingency tables contains observed counts Example: Some Possible Values for Hair Color vs. Eye Color Hair x EyeBrownBlueGreen Black90208 Brown65229 Blonde337512

Contingency Tables (Expected) Much like the goodness of fit test, we will need to calculate our expected counts. The formula for the expected counts is So for the previous example We now have Observed and Expected counts, so we can do a Chi- Squared Test for independence Hair x EyeBrownBlueGreenTotal Black110 (81.1)20 (45.6)8 (11.3)138 Brown65 (??)22 (??)9 (??)96 Blonde33 (??)75 (??)12 (??)120 Total

Chi-Squared Test for Independence 1. H 0 : Variable 1 and Variable 2 are independent 2. H A : Variable 1 and Variable 2 are not independent (dependent) 3. Alpha is.05 if not specified 4. Test Statistic = 5. P-value will come from the Chi-Squared Table with df = (r-1)(c-1) P(Test Statistic > Chi Squared Tabled Value) There is only 1 alternative hypothesis 6. Our decision rule will be to reject H 0 if p-value < alpha 7. We have (do not have) enough evidence at the.05 level to conclude that the variables are dependent. We require that our expected counts at each cell are at least 5 and that our sample is independent and random.

Example Does “test failure” reduce academic aspirations and thereby contribute to a decision to drop out of school? A survey of 283 students is randomly selected from schools with low graduation rates. The contingency table below reports the results to the question “Do tests required for graduation discourage students from staying in school?” Does there appear to be a relationship between the schools’ location and the students’ responses? Response x School UrbanSuburbanRural Yes No Unsure452531