Documente Academic
Documente Profesional
Documente Cultură
ACaseStudyonBenefitsandUsage
ATIStudent
Table of Contents: 1. Concept of ANOVA 2. Case Study on ANOVA
ANOVAstandsforanalysisofVariance,isasetoftechniquesforstudyingcauseandeffectof one or more factors (independent variables) on a single dependent variable. The Analysis of Variancetechniqueisusedwhentheindependentvariablesareofnominalscale(categorical) andthedependentvariableismetric(continuous).Theapplicationareasinmarketingresearch forexperimentsusingANOVAastheanalyticalmethodarewide. Terminologyused: Treatment Various objects of comparisons in an experiment are termed as treatment. For example, in a field experimentation different fertilizer, various types of crops or differentmethodsofcultivationaretreatment. Factors Factors are also commonly known as "treatments", a term which comes from agriculture where design of experiments was first developed. The independent variables are called factors. For example, various types of crops and different fertilizeraretwoindependentvariables. Levels of treatment - Treatmentsareadministeredtoexperimentalunitsby'level',wherelevel implies amount or magnitude. For example, if the experimental units were given 5mg, 10mg, 15mg of a medication, those amounts would be three levels of the treatment. 'Level' is also used for categorical variables, such as Drugs A, B, and C, where the three are different kinds of drug, not different amounts of the same thing. MaineffectsThemaineffectinvolvestheindependentvariablesoneatatime.Intheabove exampleDrugAisamaineffect. InteractioneffectsAninteractionisthevariationamongthedifferencesbetweenmeansfor differentlevelsofonefactoroverdifferentlevelsoftheotherfactor.Forexample,a cholesterol reduction clinic has two diets A and B, and one exercise regime. Main effectofdietBandmaineffectofexerciseplusrepresentsaninteractioneffects. InordertoperformanANOVAtest,therearethreebasicassumptionstobefulfilled:
Eachpopulationfromwhichasampleistakenisassumedtobenormal.
Eachsampleisrandomlyselectedandindependent. Thepopulationsareassumedtohaveequalstandarddeviations(orvariances).
TherearetwotypesofANOVA:OnewayANOVAandTwowayANOVA OnewayANOVA:ThistypeofANOVAisusedwhenthereisonlyonecategoricalindependent variable,andonedependent(metric)variable. Themathematicalmodelthatdescribestherelationshipbetweenresponseandtreatmentfor theonewayANOVAisgivenby = Where + + ) on the ith treatment (i = 1, 2.a
levels)(aistheleveloffactorAand
isthenumberofobservationintreatmenti)
isMean(Y)orexpectedvalueE(Y)atTreatmenti istheithtreatmenteffect represents the net effect of countless unmeasured variables and causes which, in our model,arechalkedupto"randomerror". TwowayANOVA:TwoWayAnalysisofVarianceisawayofstudyingtheeffectsoftwofactors separately(theirmaineffects)and(sometimes)together(theirinteractioneffect). TwowayANOVAmodelisgivenby = + + + + ,i=1,2..a,j=1,2.bandk=1,2r,whereaisthelevelof
istheeffectduetothejthleveloffactorB istheeffectduetoanyinteractionbetweentheithlevelofAandthejthlevelofB arerandomerrors. COMPUTATIONALFORMULASOFANOVA: Before we look at applying a simple oneway ANOVA, make sure we are comfortable with conceptslikethesumofsquares,meansumofsquares,Ftestetc. OneWayANOVA Leta=no.oflevelsoftheindependentvariable=no.ofgroups N=totalno.ofobservationsintheexperiment n1=no.ofobservationsingroup1,etc. H0:1=2=3=...=a ANOVAanalyzessamplevariancestodrawinferencesaboutpopulationmeans.Sample variancescanalwaysbecalculatedasSS/dfandthesesamplevariancesarecalledmean squares(MS): STEP1ComputeCM,thecorrectionforthemean CM= STEP 2 Compute the total SS. The total SS = sum of squares of all observations CM =
CM,Degreesoffreedomoftotal,
=N1
(The degrees of freedom of an estimate is the number of independent scores that go into the estimate minus the number of parametersestimatedas intermediatesteps in theestimation oftheparameteritself)
STEP3ComputeSST,thetreatmentsumofsquares(orBetweensumofsquares) Firstwecomputethetotal(sum)foreachtreatment. =
,, =
, where
..
observation for each treatment or groups. = STEP4ComputeSSE,theerrorsumofsquares(orWithinsumofsquares) Hereweutilizethepropertythatthetreatmentsumofsquaresplustheerrorsumofsquares equalsthetotalsumofsquares. Hence, = CM.Degreesoffreedomoftreatment, =a1
.Degreesoffreedomoferror,
=Na
= = /
STEP6Finally,computeFratioas
F=
NoticethateachMeanSquareisjusttheSumofSquaresdividedbyitsdegreesoffreedom, and the F value is the ratio of the mean squares. Do not put the largest variance in the numerator, always divide the between variance by the within variance. If the between varianceissmallerthanthewithinvariance,thenthemeansarereallyclosetoeachotherand wewillfailtorejecttheclaimthattheyareallequal.
STEP7Decisionrule ThedecisionwillbetorejectthenullhypothesisiftheteststatisticisgreaterthantheFcritical valuewitha1numeratorandNadenominatordegreesoffreedom. If the decision is to reject the null, then at least one of the means is different. However, the ANOVAdoesnottellwherethedifferencelies.Forthis,weneedanotherpairwisetestsuchas Tukeystest,DuncanstestorScheffestest. TableofOnewayANOVA Source of variation Treatment SS df a-1 MS F
/
. .
Error Total
N-a N-1
TwoWayANOVA LetA=No.oflevelsoffactorA B=No.oflevelsoffactorB n = sample size of each treatment (remember all treatment groups must have the same samplesizeforatwowayANOVA) N=totalsamplesize=A*B*n : = =.=
i.e.themeaneffectsoffactorAareequal
=.=
i.e.themeaneffectsoffactorBareequal : = =.=
i.e.themeaninteractioneffectsareequal STEP1ComputeCM,thecorrectionforthemean CM= STEP2 Compute the total SS. The total SS = sum of squares of all observations CM =
CM,Degreesoffreedomoftotal,
=N1
STEP3ComputeSST,thetreatmentsumofsquares =( where factorA =A1 The B sum of squares is found inthe same way, using the sums at each of the levels of B, squaring them, dividing by the number of scores in each sum and subtracting the correction factor. =( where + + ................ )CM, =B1, + + ................ )(forasmanylevelsoffactorAasyouhave)CM,
arethesumofsquaresofallobservationsoflevels1,2.Aof
arethesumsquaresofallobservationsoflevels1,2BoffactorB
The A x B interaction is found by squaring each group sum, dividing by sample size of each treatmenti.e.n,addingallthoseup,subtractingSS(A),subtractingSS(B)andaddingtheCM =( Where + + ................ + )
+CM,
aresumofsquaresofallobservationsofinteractioneffectsA*B
=(A1)*(B1) STEP4ComputeSSE,theerrorsumofsquares TheWithinsubjectssumofsquaresisfoundjustasintheonewayanova,bysubtraction.Since thebetweensubjectssumofsquaresismadeupofthe , and ,thesumofthose threeisthe Hence STEP5Computemeansumofsquares = = = = / / / / = . , =A*B*(n1)
STEP6Computetheteststatistics
= =
/ /
STEP7Decisionrule Thedecisionwillbetorejectthenullhypothesisif isgreaterthantheFcriticalvalue(whichcanbefoundintheFTable)withA1numerator and A*B*(n1) denominator degrees of freedom or if the significance value of 0.05
is less than
isgreaterthantheFcriticalvaluewithB1numeratorandA*B*(n1)denominatordegrees offreedomorifthesignificancevalueof
islessthan0.05
A1 B1
MainEffectB
InteractionEffect
(A1)*(B1)
Within
A*B*(n1)
Total
(A*B*n)1
The design of the experiment is the most critical when performing any experiment to be analyzedthroughthetechniqueofANOVA.Therearefourmajortypesofdesigns.Thesefour majortypesandtheirshortdescriptionaregivenbelow: 1. CompletelyRandomisedDesigninaOnewayANOVA(singlefactor) 2. RandomisedBlockDesign(singleblockingfactor) 3. LatinSquareDesign(twoblockingFactors) 4. FactorialDesignwithtwoormorefactors. CompletelyRandomisedDesign(CRD): Thisparticulardesignisusedwhenthereisonlyonecategoricalindependentvariable,andone dependent (metric) variable. Each category of an independent variable is called a level. The independent variable may be different levels of prices, or different pack sizes, or different productcolours,andtheeffect(dependentvariable)couldbethesalesoftheproduct.Inthis typeofdesign,werandomlyallocatethevarioussamplingelementstothedifferentlevelsof theindependentvariable,andmeasuretheresultingdependentvariable.Thenweconductan Ftest under the ANOVA to test the null hypothesis that the mean values of the dependent variablearenotsignificantlydifferentfromeachother,atdifferentlevelsoftheindependent variable. RandomisedBlockDesign(RBD): This type of design is used, if there is an additional variable (called the block) which has an impactontherelationshipbetweentheindependentanddependentvariables.Thisvariableis accountedforinthedesignofarandomisedblockdesignbyexplicitlychangingthelevelsofthe block and testing if that has an impact on the relationship between the independent and dependent variables. An example of this is the day of the week having an impact on the relationship between type of display in a store (independent variable) and sales (dependent variable). LatinSquareDesign(LSD): The Latin Square Design is an extension of the Randomised Block Design. It consists of one independent variable (factor) and two blocks, instead of one. It has no special significance in
marketingresearch,sothemoregeneralcaseofafactorialdesignisbetterwhereanynumber offactorscanbetestedsimultaneouslyfortheireffectsonthedependentvariable. FactorialDesignwithtwoormorefactors: Thistypeofdesignisemployedwhenwehavetwoormoreindependentvariablesorfactors. Themajoradvantageofthisdesignisthatmultiplefactorscanbesimultaneouslytested.There aretwokindsofeffectsthatwecantest.OneiscalledtheMaineffectsandthesecondiscalled theInteractioneffects.Theinteractioneffectsshouldfirstbelookedattoseeiftheyare significant.Ifyes,theanalysismaystopthere.Ifnot,wemustalsolookattheresultsofthe individualfactorFtests(calledthemaineffects)tocheckifthefactorsindividuallyhavean effectonthedependentvariable.Ifanyofthemaineffectsarestatisticallysignificant,thereare furtherpairwisetestsuchasTukeystest,DuncanstestandScheffestesttofindoutwhich levelsofeachfactorhaveasignificantimpactonthedepende
CASESTUDYON ONEWAYANOVA
Casestudy HerewewilldiscussaboutCompletelyRandomiseddesign(OnewayANOVA). INTRODUCTION: A car manufacturer XYZ Co. wants to launch three different types of car of same segment and same model. Now the manufacturer wants to test which of these three types of car is preferred by its target population, before they launch it. A sample of 30 respondentsisselectedfromthetargetpopulationinthenearbyareaofthecity.Atrandom, these30respondentsareassignedtothe3typesofcar.Eachtypeofcaristhusshownto10of therespondents.Therespondentsareaskedtoratetheirlikingforthecarshowntothemona 5PointScaleoffrom4to8(4=notlikedatall,8=likedalot). DESCRIPTIONOFDATA:Table1showstheinputdataforthe30respondents.Incolumn1,the casenumberisgiven,column2,thetypesiscoded(1,2,3)indicatingthreedifferenttypesof car. The third column, rating is the rating given by the respondents. Thus, ten respondents haveratedeachcar.Pleasenotethatthese30respondentswererandomlyassignedtoeachof thethreecars.Thisrandomassignmentiscalledacompletelyrandomiseddesign. TheinputdatainTable1isnowusedforperformingaOnewayANOVA,becausewehaveonly 1categoricalfactor(car)at3levels1,2,3,and1dependentvariableRating.
representsthejthobservation(j=1,2.30)ontheithtreatment(i=1,2,3)
typesofcarbeingmanufacturedbyXYZCo.
Case no. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Types 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3
Rating 4 4 4 4 5 4 5 4 5 5 6 7 6 8 8 8 8 7 7 6 5 5 5 5 6 6 5
AlternateHypothesis,
28 29 30
3 3 3
8 5 5
Thereisasignificantdifferenceintheratingsbetweenthevarious
=((4+4+..8+5+5)^2)/30
/30
=963.3333
Then,the total SS = sum of squares of all observations CM =
CM
+ + + )CM
=(
=1018963.3333
=54.6667 =301=29
Therefore,thetreatmentsumofsquaresisgivenby SST=
CM
=(
)963.33333
=303=27
MST=SST/
=36.8667/2 =18.4333
Andthemeansquaresoferrorisgivenby
MSE=SSE/
=18.4333/0.6593
=27.95888 Decisionrule: With =0.05levelofsignificance,werejectthenullhypothesis, ifthecalculatedvalueof FisgreatertabulatedvalueofForifthesignificancevalueofFislessthan0.05otherwisedo notreject .
OnewayANOVATable(computeroutput) Source of variation Main effect Types Error Total Conclusion:Asthesig.valueofFis0.000<0.05,thenullhypothesisisrejectedandwe concludethatthetypesofcarthatXYZCo.providesitscustomershaveadirectimpactontheir ratingorpurchasingbehavior. Sumof Squares DF 36.8667 17.8 54.6667 Mean Sumof Square 2 18.4333 27 0.6593 29 1.885
F 27.9588
SigF 0.0000