1、Chi-Square TestsChapter 11ObjectivesIn this chapter,you learn:nHow and when to use the chi-square test for contingency tablesContingency TablesContingency TablesnUseful in situations comparing multiple population proportionsnUsed to classify sample observations according to two or more characteristi
2、csnAlso called a cross-classification table.DCOVALeft-Handed vs.Gender Dominant Hand:Left vs.Right Gender:Male vs.Femalen 2 categories for each variable,so this is called a 2 x 2 tablen Suppose we examine a sample of 300 childrenContingency Table ExampleDCOVAContingency Table ExampleSample results o
3、rganized in a contingency table:(continued)GenderHand PreferenceLeftRightFemale12108120Male2415618036264300120 Females,12 were left handed180 Males,24 were left handedsample size=n=300:DCOVA 2 Test for the Difference Between Two ProportionsnIf H0 is true,then the proportion of left-handed females sh
4、ould be the same as the proportion of left-handed malesnThe two proportions above should be the same as the proportion of left-handed people overallH0:1=2 (Proportion of females who are left handed is equal to the proportion of males who are left handed)H1:1 2 (The two proportions are not the same)D
5、COVAThe Chi-Square Test Statisticnwhere:fo=observed frequency in a particular cellfe=expected frequency in a particular cell if H0 is true (Assumed:each cell in the contingency table has expectedfrequency of at least 5)cells 22)(alleeoSTATfffThe Chi-square test statistic is:freedom of degree 1 has c
6、ase 2x 2 thefor 2STATDCOVADecision Rule 2 22Decision Rule:If ,reject H0,otherwise,do not reject H0The test statistic approximately follows a chi-squared distribution with one degree of freedom0 Reject H0Do not reject H02STAT22STAT DCOVAComputing the Overall ProportionHere:120 Females,12 were left ha
7、nded180 Males,24 were left handedi.e.,based on all 300 children the proportion of left handers is 0.12,that is,12%nXnnXXp212112.0300361801202412pThe overall proportion is:DCOVAFinding Expected FrequenciesnTo obtain the expected frequency for left handed females,multiply the average proportion left h
8、anded(p)by the total number of femalesnTo obtain the expected frequency for left handed males,multiply the average proportion left handed (p)by the total number of malesIf the two proportions are equal,then P(Left Handed|Female)=P(Left Handed|Male)=.12i.e.,we would expect(.12)(120)=14.4 females to b
9、e left handed(.12)(180)=21.6 males to be left handedDCOVAObserved vs.Expected FrequenciesGenderHand PreferenceLeftRightFemaleObserved=12Expected=14.4Observed=108Expected=105.6120MaleObserved=24Expected=21.6Observed=156Expected=158.418036264300DCOVAGenderHand PreferenceLeftRightFemaleObserved=12Expec
10、ted=14.4Observed=108Expected=105.6120MaleObserved=24Expected=21.6Observed=156Expected=158.4180362643000.7576158.4158.4)(15621.621.6)(24105.6105.6)(10814.414.4)(12f)f(f2222cells alle2eo2STATThe Chi-Square Test StatisticThe test statistic is:DCOVADecision RuleDecision Rule:If 3.841,reject H0,otherwise
11、,do not reject H03.841 d.f.1 with ;0.7576 is statistic test The205.02STATHere,=0.7576 12.592,reject H0,otherwise,do not reject H012.592 d.f.6 with ;7090 is statistictest The20502 .STAT.Here,=0.709 =12.592,so do not reject H0 Conclusion:there is not sufficient evidence that meal plan and class standing are related at =0.05 2 220.05=12.5920 0.05Reject H0Do not reject H02STAT2STAT2050.DCOVAChapter SummaryIn this chapter we discussed:nHow and when to use the chi-square test for contingency tables