12-1Chapter12TestsofGoodnessofFitandIndependenceLearningObjectives1.Knowhowtoconductagoodnessoffittest.2.Knowhowtousesampledatatotestforindependenceoftwovariables.3.Understandtheroleofthechi-squaredistributioninconductingtestsofgoodnessoffitandindependence.4.Beabletoconductagoodnessoffittestforcaseswherethepopulationishypothesizedtohaveeitheramultinomial,aPoisson,oranormalprobabilitydistribution.5.Foratestofindependence,beabletosetupacontingencytable,determinetheobservedandexpectedfrequencies,anddetermineifthetwovariablesareindependent.Chapter1212-2Solutions:1.Expectedfrequencies:e1=200(.40)=80,e2=200(.40)=80e3=200(.20)=40Actualfrequencies:f1=60,f2=120,f3=202=(60-80)280+(120-80)280+(20-40)240=40080+160080+40040=5+20+10=35.012=9.21034withk-1=3-1=2degreesoffreedomSince2=359.21034rejectthenullhypothesis.Thepopulationproportionsarenotasstatedinthenullhypothesis.2.Expectedfrequencies:e1=300(.25)=75,e2=300(.25)=75e3=300(.25)=75,e4=300(.25)=75Actualfrequencies:f1=85,f2=95,f3=50,f4=702=(85-75)275+(95-75)275+(50-75)275+(70-75)275=10075+40075+62575+2575=115075=15.33.052=7.81473withk-1=4-1=3degreesoffreedomSince2=15.337.81473rejectH0Weconcludethattheproportionsarenotallequal.3.H0=pABC=.29,pCBS=.28,pNBC=.25,pIND=.18Ha=TheproportionsarenotpABC=.29,pCBS=.28,pNBC=.25,pIND=.18TestsofGoodnessofFitandIndependence12-3Expectedfrequencies:300(.29)=87,300(.28)=84300(.25)=75,300(.18)=54e1=87,e2=84,e3=75,e4=54Actualfrequencies:f1=95,f2=70,f3=89,f4=46.052=7.81(3degreesoffreedom)2=(95-87)287+(70-84)284+(89-75)275+(46-54)254=6.87DonotrejectH0;thereisnosignificantchangeintheviewingaudienceproportions.4.ObservedExpectedHypothesizedFrequencyFrequencyCategoryProportion(fi)(ei)(fi-ei)2/eiBrown0.30177151.84.18Yellow0.20135101.211.29Red0.2079101.24.87Orange0.104150.61.82Green0.103650.64.21Blue0.103850.63.14Totals:50629.51.052=11.07(5degreesoffreedom)Since29.5111.07,weconcludethatthepercentagefiguresreportedbythecompanyhavechanged.5.ObservedExpectedHypothesizedFrequencyFrequencyCategoryProportion(fi)(ei)(fi-ei)2/eiFullService1/3264249.330.86Discount1/3255249.330.13Both1/3229249.331.66Totals:7482.652.10=4.61(2degreesoffreedom)Since2.654.61,thereisnosignificantdifferenceinpreferenceamongthethreeservicechoices.Chapter1212-46.ObservedExpectedHypothesizedFrequencyFrequencyCategoryProportion(fi)(ei)(fi-ei)2/eiNewsandOpinion1/62019.17.04GeneralEditorial1/61519.17.91FamilyOriented1/63019.176.12Business/Financial1/62219.17.42FemaleOriented1/61619.17.52African-American1/61219.172.68Totals:11510.69.102=9.24(5degreesoffreedom)Since10.699.24,weconcludethatthereisadifferenceintheproportionofadswithguiltappealsamongthesixtypesofmagazines.7.Expectedfrequencies:ei=(1/3)(135)=452=(43-45)245+(53-45)245+(39-45)245=2.31With2degreesoffreedom,.052=5.99DonotrejectH0;thereisnojustificationforconcludingadifferenceinpreferenceexists.8.H0:p1=.03,p2=.28,p3=.45,p4=.24df=32.01=11.34RejectH0if211.34RatingObservedExpected(fi-ei)2/eiExcellent24.03(400)=1212.00Good124.28(400)=1121.29Fair172.45(400)=180.36Poor80.24(400)=962.674004002=16.31RejectH0;concludethattheratingsdiffer.Acomparisonofobservedandexpectedfrequenciesshowtelephoneserviceisslightlybetterwithmoreexcellentandgoodratings.9.H0=ThecolumnvariableisindependentoftherowvariableHa=ThecolumnvariableisnotindependentoftherowvariableExpectedFrequencies:ABCP28.539.945.6Q21.530.134.4TestsofGoodnessofFitandIndependence12-52=(20-28.5)228.5+(44-39.9)239.9+(50-45.6)245.6+(30-21.5)221.5+(26-30.1)230.1+(30-34.4)234.4=7.86.0252=7.37776with(2-1)(3-1)=2degreesoffreedomSince2=7.867.37776RejectH0Concludethatthecolumnvariableisnotindependentoftherowvariable.10.H0=ThecolumnvariableisindependentoftherowvariableHa=ThecolumnvariableisnotindependentoftherowvariableExpectedFrequencies:ABCP17.500030.625021.8750Q28.750050.312535.9375R13.750024.062517.18752=(20-17.5000)217.5000+(30-30.6250)230.6250++(30-17.1875)217.1875=19.78.052=9.48773with(3-1)(3-1)=4degreesoffreedomSince2=19.789.48773RejectH0Concludethatthecolumnvariableisnotindependentofftherowvariable.11.H0:TypeofticketpurchasedisindependentofthetypeofflightHa:Typeofticketpurchasedisnotindependentofthetypeofflight.ExpectedFrequencies:e11=35.59e12=15.41e21=150.73e22=65.27e31=455.68e32=197.32ObservedExpectedFrequencyFrequencyTicketFlight(fi)(ei)(fi-ei)2/eiFirstDomestic2935.591.22FirstInternational2215.412.82BusinessDomestic95150.7320.61BusinessInternational12165.2747.59FullFareDomestic518455.688.52FullFareInternational135197.3219.68Totals:920100.43Chapter1212-6.052=5.99with(3-1)(2-1)=2degreesoffreedomSince100.435.99,weconcludethatthetypeofticketpurchasedisnotindependentofthetypeofflight.12.a.ObservedFrequency(fij)DomesticEuropeanAsianTotalSame1255568248Different140105107352Total265160175600ExpectedFrequency(eij)DomesticEuropeanAsianTotalSame109.5366.1372.33248Different155.4793.87102.67352Total265160175600ChiSquare(fij-eij)2/eijDomesticEuropeanAsianTotalSame2.181.870.264.32Different1.541.320.183.042=7.36Degreesoffreedom=2.052=5.99RejectH0;concludebrandloy