Chi-Square Tests Chi-Square Tests Chapter1414 Chi-Square Test for Independence Chi-Square Tests for Goodness-of-Fit Copyright © 2010 by The McGraw-Hill.

Slides:



Advertisements
Similar presentations
Prepared by Lloyd R. Jaisingh
Advertisements

CHI-SQUARE(X2) DISTRIBUTION
15- 1 Chapter Fifteen McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
Hypothesis Testing Steps in Hypothesis Testing:
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Chapter 12 Goodness-of-Fit Tests and Contingency Analysis
11 Analysis of Variance Chapter Overview of ANOVA One-Factor ANOVA
Hypothesis Testing IV Chi Square.
Chapter Ten Comparing Proportions and Chi-Square Tests McGraw-Hill/Irwin Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.
Chapter 14 Analysis of Categorical Data
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter Goals After completing this chapter, you should be able to:
Chapter 16 Chi Squared Tests.
Irwin/McGraw-Hill © The McGraw-Hill Companies, Inc., 2000 LIND MASON MARCHAL 1-1 Chapter Thirteen Nonparametric Methods: Chi-Square Applications GOALS.
Ch 15 - Chi-square Nonparametric Methods: Chi-Square Applications
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Aaker, Kumar, Day Seventh Edition Instructor’s Presentation Slides
Chi-Square and F Distributions Chapter 11 Understandable Statistics Ninth Edition By Brase and Brase Prepared by Yixun Shi Bloomsburg University of Pennsylvania.
Chapter 9 Hypothesis Testing.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
BCOR 1020 Business Statistics
Chi-Square Tests and the F-Distribution
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
Cross Tabulation and Chi-Square Testing. Cross-Tabulation While a frequency distribution describes one variable at a time, a cross-tabulation describes.
Aaker, Kumar, Day Ninth Edition Instructor’s Presentation Slides
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.
15 Chi-Square Tests Chi-Square Test for Independence
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
Bivariate Regression (Part 1) Chapter1212 Visual Displays and Correlation Analysis Bivariate Regression Regression Terminology Ordinary Least Squares Formulas.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
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 16 – Categorical Data Analysis Math 22 Introductory Statistics.
Copyright © 2009 Cengage Learning 15.1 Chapter 16 Chi-Squared Tests.
Two Way Tables and the Chi-Square Test ● Here we study relationships between two categorical variables. – The data can be displayed in a two way table.
Week 10 Nov 3-7 Two Mini-Lectures QMM 510 Fall 2014.
Chapter Chi-Square Tests and the F-Distribution 1 of © 2012 Pearson Education, Inc. All rights reserved.
A Course In Business Statistics 4th © 2006 Prentice-Hall, Inc. Chap 9-1 A Course In Business Statistics 4 th Edition Chapter 9 Estimation and Hypothesis.
Chapter 10 Chi-Square Tests and the F- Distribution 1 Larson/Farber 4th ed.
Slide 26-1 Copyright © 2004 Pearson Education, Inc.
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 16 Chi-Squared Tests.
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests Business Statistics: A First Course Fifth Edition.
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.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
© Copyright McGraw-Hill CHAPTER 11 Other Chi-Square Tests.
Chapter Outline Goodness of Fit test Test of Independence.
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
11.2 Tests Using Contingency Tables When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using.
© Copyright McGraw-Hill 2004
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
1 Chi-square Test Dr. T. T. Kachwala. Using the Chi-Square Test 2 The following are the two Applications: 1. Chi square as a test of Independence 2.Chi.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Comparing Counts Chapter 26. Goodness-of-Fit A test of whether the distribution of counts in one categorical variable matches the distribution predicted.
+ Section 11.1 Chi-Square Goodness-of-Fit Tests. + Introduction In the previous chapter, we discussed inference procedures for comparing the proportion.
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-Två Test Kapitel 6. Introduction Two statistical techniques are presented, to analyze nominal data. –A goodness-of-fit test for the multinomial experiment.
Section 10.2 Objectives Use a contingency table to find expected frequencies Use a chi-square distribution to test whether two variables are independent.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
Section 10.1 Goodness of Fit © 2012 Pearson Education, Inc. All rights reserved. 1 of 91.
Chi Square Test of Homogeneity. Are the different types of M&M’s distributed the same across the different colors? PlainPeanutPeanut Butter Crispy Brown7447.
10 Chapter Chi-Square Tests and the F-Distribution Chapter 10
Two-Sample Hypothesis Testing
Chapter 11 Chi-Square Tests.
Elementary Statistics: Picturing The World
15 Chi-Square Tests Chi-Square Test for Independence
Presentation transcript:

Chi-Square Tests Chi-Square Tests Chapter1414 Chi-Square Test for Independence Chi-Square Tests for Goodness-of-Fit Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin

Chi-Square Test for Independence Chi-Square Test Chi-Square Test In a test of independence for an r x c contingency table, the hypotheses are H 0 : Variable A is independent of variable B H 1 : Variable A is not independent of variable BIn a test of independence for an r x c contingency table, the hypotheses are H 0 : Variable A is independent of variable B H 1 : Variable A is not independent of variable B Use the chi-square test for independence to test these hypotheses.Use the chi-square test for independence to test these hypotheses. This non-parametric test is based on frequencies.This non-parametric test is based on frequencies. The n data pairs are classified into c columns and r rows and then the observed frequency f jk is compared with the expected frequency e jk.The n data pairs are classified into c columns and r rows and then the observed frequency f jk is compared with the expected frequency e jk. 14-2

The critical value comes from the chi-square probability distribution with degrees of freedom.The critical value comes from the chi-square probability distribution with degrees of freedom. = degrees of freedom = (r – 1)(c – 1) where r = number of rows in the table c = number of columns in the table = degrees of freedom = (r – 1)(c – 1) where r = number of rows in the table c = number of columns in the table Appendix E contains critical values for right-tail areas of the chi- square distribution.Appendix E contains critical values for right-tail areas of the chi- square distribution. The mean of a chi-square distribution is with variance 2.The mean of a chi-square distribution is with variance 2. Chi-Square Distribution Chi-Square Distribution Chi-Square Test for Independence 14-3

Assuming that H 0 is true, the expected frequency of row j and column k is:Assuming that H 0 is true, the expected frequency of row j and column k is: e jk = R j C k /n where R j = total for row j (j = 1, 2, …, r) C k = total for column k (k = 1, 2, …, c) n = sample size Expected Frequencies Expected Frequencies Chi-Square Test for Independence Steps in Testing the Hypotheses Steps in Testing the Hypotheses Step 1: State the Hypotheses H 0 : Variable A is independent of variable B H 1 : Variable A is not independent of variable B 14-4

Chi-Square Test for Independence Step 2: Specify the Decision RuleStep 2: Specify the Decision Rule Calculate = (r – 1)(c – 1) For a given , look up the right-tail critical value (  2 R ) from Appendix E or by using Excel. Reject H 0 if  2 R > test statistic. Steps in Testing the Hypotheses Steps in Testing the Hypotheses Step 3: Calculate the Expected FrequenciesStep 3: Calculate the Expected Frequencies e jk = R j C k /n 14-5

Chi-Square Test for Independence Step 4: Calculate the Test StatisticStep 4: Calculate the Test Statistic The chi-square test statistic is Step 5: Make the DecisionStep 5: Make the Decision Reject H 0 if  2 R > test statistic or if the p-value test statistic or if the p-value < . Steps in Testing the Hypotheses Steps in Testing the Hypotheses calc 14-6

Chi-Square Test for Independence The chi-square test is unreliable if the expected frequencies are too small.The chi-square test is unreliable if the expected frequencies are too small. Rules of thumb:Rules of thumb: Cochran’s Rule requires that e jk > 5 for all cells. Cochran’s Rule requires that e jk > 5 for all cells. Up to 20% of the cells may have e jk < 5 Up to 20% of the cells may have e jk < 5 Small Expected Frequencies Small Expected Frequencies Most agree that a chi-square test is infeasible if e jk < 1 in any cell.Most agree that a chi-square test is infeasible if e jk < 1 in any cell. If this happens, try combining adjacent rows or columns to enlarge the expected frequencies.If this happens, try combining adjacent rows or columns to enlarge the expected frequencies. 14-7

Chi-Square Test for Goodness-of-Fit Why Do a Chi-Square Test on Numerical Data? Why Do a Chi-Square Test on Numerical Data? The researcher may believe there’s a relationship between X and Y, but doesn’t want to use regression.The researcher may believe there’s a relationship between X and Y, but doesn’t want to use regression. There are outliers or anomalies that prevent us from assuming that the data came from a normal population.There are outliers or anomalies that prevent us from assuming that the data came from a normal population. The researcher has numerical data for one variable but not the other.The researcher has numerical data for one variable but not the other. Purpose of the Test Purpose of the Test The goodness-of-fit (GOF) test helps you decide whether your sample resembles a particular kind of population.The goodness-of-fit (GOF) test helps you decide whether your sample resembles a particular kind of population. The chi-square test will be used because it is versatile and easy to understand.The chi-square test will be used because it is versatile and easy to understand. Goodness-of-fit tests may lack power in small samples. As a guideline, a chi-square goodness-of-fit test should be avoided if n < 25.Goodness-of-fit tests may lack power in small samples. As a guideline, a chi-square goodness-of-fit test should be avoided if n <

A multinomial distribution is defined by any k probabilities  1,  2, …,  k that sum to unity.A multinomial distribution is defined by any k probabilities  1,  2, …,  k that sum to unity. For example, consider the following “official” proportions of M&M colors. The hypotheses areFor example, consider the following “official” proportions of M&M colors. The hypotheses are H 0 :  1 =.13,  2 =.13,  3 =.24,  4 =.20,  5 =.16,  6 =.14 H 1 : At least one of the  j differs from the hypothesized value Multinomial GOF Test Multinomial GOF Test Chi-Square Test for Goodness-of-Fit 14-9

Hypotheses for GOF Hypotheses for GOF The hypotheses are:The hypotheses are: H 0 : The population follows a _____ distribution H 1 : The population does not follow a ______ distribution H 0 : The population follows a _____ distribution H 1 : The population does not follow a ______ distribution The blank may contain the name of any theoretical distribution (e.g., uniform, Poisson, normal).The blank may contain the name of any theoretical distribution (e.g., uniform, Poisson, normal). Chi-Square Test for Goodness-of-Fit 14-10

Assuming n observations, the observations are grouped into c classes and then the chi-square test statistic is found using:Assuming n observations, the observations are grouped into c classes and then the chi-square test statistic is found using: Test Statistic and Degrees of Freedom for GOF Test Statistic and Degrees of Freedom for GOF where f j = the observed frequency of observations in class j e j = the expected frequency in class j if H 0 were true calc Chi-Square Test for Goodness-of-Fit 14-11

Uniform Goodness-of-Fit Test The uniform goodness-of-fit test is a special case of the multinomial in which every value has the same chance of occurrence.The uniform goodness-of-fit test is a special case of the multinomial in which every value has the same chance of occurrence. The chi-square test for a uniform distribution compares all c groups simultaneously.The chi-square test for a uniform distribution compares all c groups simultaneously. The hypotheses are:The hypotheses are: H 0 :  1 =  2 = …,  c = 1/c H 1 : Not all  j are equal Uniform Distribution Uniform Distribution 14-12

Uniform Goodness-of-Fit Test The test can be performed on data that are already tabulated into groups.The test can be performed on data that are already tabulated into groups. Calculate the expected frequency e j for each cell.Calculate the expected frequency e j for each cell. The degrees of freedom are = c – 1 since there are no parameters for the uniform distribution.The degrees of freedom are = c – 1 since there are no parameters for the uniform distribution. Obtain the critical value  2  from Appendix E for the desired level of significance .Obtain the critical value  2  from Appendix E for the desired level of significance . The p-value can be obtained from Excel.The p-value can be obtained from Excel. Reject H 0 if p-value < .Reject H 0 if p-value < . Uniform GOF Test: Grouped Data Uniform GOF Test: Grouped Data 14-13

Uniform Goodness-of-Fit Test First form c bins of equal width (X max – X min )/c and create a frequency distribution.First form c bins of equal width (X max – X min )/c and create a frequency distribution. Calculate the observed frequency f j for each bin.Calculate the observed frequency f j for each bin. Define e j = n/c and perform the chi-square calculations.Define e j = n/c and perform the chi-square calculations. The degrees of freedom are = c – 1 since there are no parameters for the uniform distribution.The degrees of freedom are = c – 1 since there are no parameters for the uniform distribution. Obtain the critical value from Appendix E for a given significance level  and make the decision.Obtain the critical value from Appendix E for a given significance level  and make the decision. Uniform GOF Test: Raw Data Uniform GOF Test: Raw Data 14-14

14-15 Uniform Goodness-of-Fit Test Calculate the mean and standard deviation of the uniform distribution as:Calculate the mean and standard deviation of the uniform distribution as:  = (a + b)/2 If the data are not skewed and the sample size is large (n > 30), then the mean is approximately normally distributed.If the data are not skewed and the sample size is large (n > 30), then the mean is approximately normally distributed. So, test the hypothesized uniform mean usingSo, test the hypothesized uniform mean using Uniform GOF Test: Raw Data Uniform GOF Test: Raw Data  = [(b – a + 1)2 – 1)/