Example: bankruptcy

1 Basic ANOVA concepts - Calvin University

Math143 ANOVA1 AnalysisofVariance( ANOVA )Recall,whenwewa ntedtocompare twopopulationmeans, 'sexpandthistocomparek 3 ,wecangraphicallygetanideaofwhatis goingonbylookingatside-by-sideboxplots.( , , , ) , weare consideringa quantitativeresponsevariableasit relatestooneormore explanatoryvariables, tthissetting:(i)Whichacademicdepartmenti nthesciencesgivesoutthelowestaveragegrad es?(Explanatoryvari-able:department; Responsevariable:studentGPA's forindividualcourses)(ii)Whichkindofprom otionalcampaignleadstogreateststore incomeatChristmastime?(Explanatoryvariab le:promotiontype; Responsevariable:dailystore income)(iii)Howdothetypeofcareerandmarit alstatusofa personrelatetothetotalcostinannualclaims she/heislikelytomakeonherhealthinsurance .(Explanatoryvariables:careerandmaritals tatus;Responsevariable:healthinsurancepa youts)Eachvalueoftheexplanatoryvariable( orvalue-pair, if there is more thanoneexplanatoryvariable)repre-sentsa ' , ,there are twofactors(explanatoryvariables):aspirin (valuesare takingit or nottakingit )andbetacarotene(valuesagainare takingit or nottakingit ),andthisdividesthesubjectsintofourgroup scorrespondingtothefourcellsofFigure ( ).

treatments is large relative to the variation within treatments, and we reject the null hypothesis of equal means. If F is small, the variability between treatments is small relative to the variation within treatments, and we do not reject the null hypothesis of equal means. (In this case, the sample data is consistent with

Tags:

  Relative, Hypothesis

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of 1 Basic ANOVA concepts - Calvin University

1 Math143 ANOVA1 AnalysisofVariance( ANOVA )Recall,whenwewa ntedtocompare twopopulationmeans, 'sexpandthistocomparek 3 ,wecangraphicallygetanideaofwhatis goingonbylookingatside-by-sideboxplots.( , , , ) , weare consideringa quantitativeresponsevariableasit relatestooneormore explanatoryvariables, tthissetting:(i)Whichacademicdepartmenti nthesciencesgivesoutthelowestaveragegrad es?(Explanatoryvari-able:department; Responsevariable:studentGPA's forindividualcourses)(ii)Whichkindofprom otionalcampaignleadstogreateststore incomeatChristmastime?(Explanatoryvariab le:promotiontype; Responsevariable:dailystore income)(iii)Howdothetypeofcareerandmarit alstatusofa personrelatetothetotalcostinannualclaims she/heislikelytomakeonherhealthinsurance .(Explanatoryvariables:careerandmaritals tatus;Responsevariable:healthinsurancepa youts)Eachvalueoftheexplanatoryvariable( orvalue-pair, if there is more thanoneexplanatoryvariable)repre-sentsa ' , ,there are twofactors(explanatoryvariables):aspirin (valuesare takingit or nottakingit )andbetacarotene(valuesagainare takingit or nottakingit ),andthisdividesthesubjectsintofourgroup scorrespondingtothefourcellsofFigure ( ).

2 Hadtheresponsevariableforthisstudybeenqu antitative likesystolicbloodpres-sure level ratherthancategorical,it wouldhavebeenanappropriatescenarioinwhic htoapply(2-way) : The(population)meansofallgroupsundercons iderationare : The(pop.)meansare notallequal.(Note:Thisis differentthansaying theyare all unequal !) (a) (b)( ) , (a)are muchlessconvincingthatthepopulationmeans forthethreepopulationsare differentthanif thevariationsare (b).Thereasonis becausetheratioofvariationbetweengroupst ovariationwithingroupsis (a)thanit is (b).Math143 , ANOVA hassomeunderlyingassumptionswhichshouldb einplaceinordertomaketheresultsofcalcula tionscompletelytrustworthy. Theyinclude:(i)Subjectsare chosenviaa simplerandomsample.(ii)Withineachgroup/p opulation,theresponsevariableis normallydistributed.(iii)Whilethepopulat ionmeansmaybedifferentfromonegrouptothen ext,thepopulationstandarddeviationis , ANOVA is somewhatrobust( ,resultsremainfairlytrustworthydespitemi ldviolationsoftheseassumptions).Assumpti ons(ii)and(iii)are closeenoughtobeingtrueif,aftergatheringS RSsamplesfromeachgroup,you:(ii)lookatnor malquantileplotsforeachgroupand,ineachca se,seethatthedatapointsfallclosetoaline.

3 (iii)computethestandard deviationsforeachgroupsample, nomore is justoneexplanatoryvariable, is a thenumberofgroups/populations/valuesofth eexplanatoryvariable/levelsoftreatmentni = thesamplesizetakenfromgroupixi j= thejthresponsesampledfromtheithgroup/pop ulation. xi= thesamplemeanofresponsesfromtheithgroup= 1nini j=1xi jsi= thesamplestandard deviationfromtheithgroup=1ni 1ni j=1(xi j xi)2n= the(total)sample,irrespectiveofgroups= ki=1ni. x= themeanofallresponses,irrespectiveofgrou ps=1n i jxi (ratherthanksamplesfromtheindividualgrou ps/populations),onemightmeasurethetotala mountofvariabilityamongobservationsbysum mingthesquaresofthedifferencesbetweeneac hxi jand x:SST(standsforsumof squarestotal)=k i=1ni j=1(xi j x) ANOVA3 (speci cally, variationaroundtheoverallmean x)SSG:=k i=1ni( xi x)2, (speci cally, variationofobservationsabouttheirgroupme an xi)SSE:=k i=1ni j=1(xi j xi)2=k i=1(ni 1) is thecasethatSST=SSG+ thevariabilitybetweengroups/treatmentsis largerelativetothevariabilitywithingroup s/treatments,thenthedatasuggestthattheme ansofthepopulationsfromwhichthedatawere drawnare signi ,infact,howtheFstatisticiscomputed:it isa measure ofthevariabilitybetweentreat-mentsdivide dbya measure ,thevariabilitybetweentreatmentsislarger elativetothevariationwithintreatments, small,thevariabilitybetweentreatmentsis smallrelativetothevariationwithintreatme nts,andwedonotrejectthenullhypothesisofe qualmeans.

4 (Inthiscase,thesampledataisconsistentwit hthehypothesisthatpopulationmeansare equalbetweengroups.)To computethisratio(theFstatistic)is dif weare calledanANOVA table:SourceSSdfMSFM odel/GroupSSGk 1 MSG=SSGk 1 MSGMSER esidual/ErrorSSEn kMSE=SSEn kTotalSSTn 1 Whatare thesethings? Thesource(ofvariability)columntellsusSS= SumofSquares(sumofsquareddeviations):SST measuresvariationofthedataaroundtheovera llmean xSSGmeasuresvariationofthegroupmeansarou ndtheoverallmeanSSEmeasuresthevariationo feachobservationarounditsgroupmean xi Degreesoffreedomk 1forSSG,sinceit measuresthevariationofthekgroupmeansabou ttheoverallmeann kforSSE,sinceit measuresthevariationofthenobservationsab outkgroupmeansn 1forSST, sinceit measuresthevariationofallnobservationsab outtheoverallmeanMath143 ANOVA4 MS=MeanSquare=SS/df:Thisis likea standard forsamplestan-dard deviation( ).Itsnumeratorwasa sumofsquareddeviations(justlikeourSSform ulas),andit is interestingtonotethatanotherformulaforMS EisMSE=(n1 1)s21+ (n2 1)s22+ + (nk 1)s2k(n1 1) + (n2 1) + + (nk 1),whichmayremindyouofthepooledsampleest imateforthepopulationvariancefor2-sample pro-cedures(whenwebelievethetwopopulatio nshavethesamevariance).

5 Infact,thequantityMSEisalsocalleds2p. TheFstatistic=MSG/MSEI fthenullhypothesisistrue,theFstatisticha sanFdistributionwithk 1 andn kdegreesoffreedominthenumerator/denomina torrespectively. If thealternatehypothesisis true, rejectH0infavorofHaif theFstatisticis suf ,wedeterminewhethertheFstatisticis largeby ndinga , alwaysthesame( ),thetestissingle-tailed(likethechi-squa redtest).Neverthless,toreadthecorrectP-v aluefromthetablerequiresknowledgeofthenu mberofdegreesoffreedomassociatedwithboth thenumerator(MSG)anddenominator(MSE) thenumeratordf,anddowntheleftsideare theFvalues,andtheP-values(theprobability ofgettinganFstatisticlargerthanthatifthe nullhypothesisis true)are : DetermineP(F3,6> )= (F2,20>5)= : A rmwishestocompare fourprogramsfortrainingworkerstoperforma randomlyassignedtothetrainingprograms,wi th5 ,a testis performedperminuteis VarianceSourceSSdfMSFProb> 'stestfor equalvariances:chi2(3)= >chi2= ANOVA5 Statagivesusa lineatthebottom theoneaboutBartlett'stest whichreinforcesourbeliefthatthevari-ance sare : Inanexperimenttoinvestigatetheperformanc eofsixdifferenttypesofsparkplugsintended foruseona two-strokemotorcycle,tenplugsofeachbrand were testedandthenumberofdrivingmiles(atacons tantspeed)untilplugfailure , , : Onemore thingyouwilloften ndonanANOVA tableisR2(thecoef cientofdetermination).

6 Itindicatestheratioofthevariabilitybetwe engroupmeansinthesampletotheoverallsampl evariability,meaningthatit hasa cance,one- ( ) teststatistic(here it isFdfnumer., dfdenom.), anduseit todeterminea probabilityofgettinga sampleasextremeormore decisionrule:Atthe levelofsigni cance,rejectH0ifP(Fk 1,n k>Fcomputed)< . DonotrejectH0ifP> .IfP> , statethisasourconclusionalongwiththerele vantinformation(F-value,df-numerator, df-denominator,P-value).Ideally, a personconductingthestudywillhavesomeprec onceivedhypotheses(more specializedthantheH0,HawestatedforANOVA, andoneswhichsheheldbefore evercollecting/lookingatthedata) thecase,shemaygoaheadandexplore them(evenif ANOVA didnotindicateanoveralldifferenceingroup means),oftenemployingthemethodofcontrast s. We willnotlearnthismethodasa class,butif youwishtoknowmore, someinformationis ,it is,generallyspeaking,inappro-priatetocon tinuesearchingforevidenceofa differenceinmeansif ourF-valuefromANOVA wasnotsigni ,however,P< , thenweknowthatatleasttwomeansare notequal,andthedooris ,wefollowupa signi cantF-statisticwithpairwisecomparisonsof themeans,toseewhichare signi (assumed)commonstandard deviationofallgroups( ):ti j= xi xjspq1=ni+1= determineif thisti jis statisticallysigni cant,wecouldjustgotoTableDwithn kdegreesoffreedom(thedfassociatedwithsp) .

7 However, dependingonthenumberkofgroups,wemightbed oingmanycomparisons,andrecallthatstatist icalsigni cancecanoccursimplybychance(that,infact, isbuiltintotheinterpretationoftheP-value ),andit becomesmore andmore weare goingtoconductmanytests,andwanttheoveral lprobabilityofrejectinganyofthenullhypot heses(equalmeansbetweengrouppairs)inthep rocesstobenomorethan , thenwemustadjustthesigni cancelevelforeachindividualcomparisontob emuchsmallerthan . There are a numberofdifferentapproacheswhichhavebeen proposedforchoosingtheindividual-testMat h143 2-wayANOVA6signi cancelevelsoastogetanoverallfamilysigni canceof , is availablethatcancarryoutthedetailsandrep orttheresultstous,weare mostlikelyagreeabletousingwhicheverpropo sal(s) doingmultiplecomparisonsisa ,amongothers,theBonferroniapproachforpai rwisecomparisons,whichis anapproachmentionedinourtext, : Recallourdatafroma statisticallysigni nextstep,weuseBonferronimultiplecomparis ons,providinghere theresultsasreportedbyStataComparisonof post-testby program(Bonferroni)Row Mean-|Col Mean|123---------+---------------------- -----------2 |-3| |3 |.

8 | |4 | | therowlabeled`2'meetsthecolumnlabeled`1' ,weare toldthatthesamplemeanresponseforProgram2 was3 lowerthanthemeanresponseforProgram1 (Row Mean- Col Mean= -3), Thus,thisdifferenceis notstatisticallysigni cantatthe5%leveltoconcludethemeanrespons efromProgram1 is cant(atsigni cancelevel5%)meanresponses?Program3 is di erentfromprogram2, withprogram3 is di erentfromprogram1, withprogram1 is di erentfromprogram3, withprogram3 , programs1 and3 are themostsuccessful,withnostatistically-si gni ,otherfactors,suchashowmuchit willcostthecompanytoimplementthetwopro-g rams, :SometimesinsteadofgivingP-values,a software packagewillgeneratecon ,there isnostatisticallysigni populationmeanswhenthepopulationsare classi edaccordingtotwo(categorical) mightliketolookatSAT scoresofstudentswhoare maleorfemale( rstfactor)andeitherhaveorhavenothada preparatorycourse(secondfactor). 'sdietontherat' ,mediumandlowamountsofeachmineral(butoth erwiseidentical) speci edtimeonthediet,thebloodpressure wilbeMath143 are usuallyhavea smallertotalsamplesize,sinceyou're studyingtwothingsatonce[ratdietexample,p .]

9 800] removessomeoftherandomvariability(someof therandomvariabilityisnowexplainedbythes econdfactor, soyoucanmore easily ndsigni cantdifferences) wecanlookatinteractionsbetweenfactors(as igni cantinteractionmeanstheeffectofonevariab lechangesdependingontheleveloftheotherfa ctor).Examplesof(potential)interaction. Radon(high/medium/low) Butif youare exposedtoradonandsmoke, , can'ttalkabouttheeffectofradonwithouttal kingaboutwhetherornotthepersonis a smoker. ageofperson(0-10,11-20,21+)andeffectofpe sticides(low/high) genderandeffectofdifferentlegaldrugs(dif ferentstandard doses)Two-wayANOVA tableBelowis theoutlineofa two-wayANOVA table,withfactorsAandB,havingIandJgroups , 1 SSAMSAMSA/MSEBJ 1 SSBMSBMSB/MSEA B(I 1)(J 1)SSABMSABMSAB/MSEE rrorn I JSSEMSET otaln 1 SSTMath143 A are threedifferentvaluesofF, ' Jgroupshasa normaldistributionwithpotentiallydiffere ntmeans( i j), butwitha commonstandard deviation( ). Thatis,xi jk= i j|{z}groupmean+ i jk|{z}residual,where i jk N(0, )Asusual,wewillusetwo-wayANOVA providedit isreasonabletoassumenormalgroupdistribut ionsandtheratioofthelargestgroupstandard deviationtothesmallestgroupstandard deviationis considerwhethertheclassifyingbydiagnosis (anxiety, depression,CDFS/Courtreferred)andpriorab use(yes/no)isrelatedtomeanBC(BeingCautio us) tablewhere eachcellcontainshemeanBCscore forpeoplewhowere is *D * 2-wayANOVA9 ThetablehasthreeP-values,correspondingto threetestsofsigni : ThemeanBCscore is thesamefor eachof : ThemeanBCscore is notthesamefor all isnotsigni canttorejectthenullhypothesis.

10 (F= ,d f1=2,d f2=62,P= ) : Thereis nomaine ectdueto : Thereis a maine ectdueto signi canttoconcludea maineffectexists.(F= ,d f1=1,d f2=62,P= ) : Thereis no interactione : Thereis an interactione ectbetweenthetwo isnotsigni canttorejectthenullhypothesis.(F= ,d f1=2,d f2=62,P= )Whena maineffecthasbeenfoundforjustonevariable withoutvariableinteractions,wemightcombi nedataacrossdiagnosesandperformoneoftheo thertestsweknowthatis applicable.(Two-sampletorOne-wayANOVAare bothoptionshere,sincethecombiningofinfor mationleavesuswithjusttwogroups.)Butwemi ghtalsoperforma simplertask:Drawa considerwhetherthemeanBSI(Belonging/Soci alInterest)is thesameafterclassifyingpeopleonthebasiso fwhetherornotthey' *D X * cant,let' re ectedineachcategory(informationthatis notprovidedhere) isa signi cantdifferenceinmeanBSIbetweenthosewhoha veeverbeenabusedandthosenotabusedonlyfor thosewhohavea DCFS/CourtReferreddisorder. There isnostatisticallysigni cantdifferencebetweenthesetwogroupsforth osewitha DepressiveorAnxietydisorder(thoughit'spr ettycloseforthosewithanAnxietydisorder).


Related search queries