Example: marketing

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 .

(ii) look at normal quantile plots for each group and, in each case, see that the data points fall close to a line. (iii) compute the standard deviations for each group sample, and see that the ratio of the largest to the ... meaning that it has a similar interpretation to that for R2 in linear regression. 2.4 Multiple Comparisons

Tags:

  Regression, Quantile

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 .

2 (Explanatoryvariables:careerandmaritalst atus;Responsevariable:healthinsurancepay outs)Eachvalueoftheexplanatoryvariable(o rvalue-pair, if there is more thanoneexplanatoryvariable)repre-sentsa ' , ,there are twofactors(explanatoryvariables):aspirin (valuesare takingit or nottakingit )andbetacarotene(valuesagainare takingit or nottakingit ),andthisdividesthesubjectsintofourgroup scorrespondingtothefourcellsofFigure ( ).Hadtheresponsevariableforthisstudybeen quantitative likesystolicbloodpres-sure level ratherthancategorical,it wouldhavebeenanappropriatescenarioinwhic htoapply(2-way) : The(population)meansofallgroupsundercons iderationare : The(pop.)meansare notallequal.(Note:Thisis differentthansaying theyare all unequal !)

3 (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.

4 (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.

5 It isa measure ofthevariabilitybetweentreat-mentsdivide dbya measure ,thevariabilitybetweentreatmentsislarger elativetothevariationwithintreatments, small,thevariabilitybetweentreatmentsis smallrelativetothevariationwithintreatme nts,andwedonotrejectthenullhypothesisofe qualmeans.(Inthiscase,thesampledataiscon sistentwiththehypothesisthatpopulationme ansare 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( ).

6 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).Infact,thequantit yMSEisalsocalleds2p. 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).

7 Neverthless,toreadthecorrectP-valuefromt hetablerequiresknowledgeofthenumberofdeg reesoffreedomassociatedwithboththenumera tor(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).

8 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.

9 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) .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.

10 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 |. | |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?


Related search queries