《十六章 方差协方差分析.ppt》由会员分享,可在线阅读,更多相关《十六章 方差协方差分析.ppt(61页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、赵冬阳攀枝花学院经济与管理学院市场营销博士ChapterSixteen:AnalysisofVarianceandCovariance方差协方差分析教学目的讨论方差分析技术的范畴,及其与t检验和回归分析的关系。描述单因子方差分析,包括总方差分解、效果测量、显著性检验和结构测量。描述n因子方差分析,以及每个因子总效应、交互效应和主效应的显著性检验。描述协方差分析,并介绍如何估计未来控制的自变量的影响。讨论用于市场营销的特殊方差分析技术,比如重复测量方差分析、非定量方差分析和多变量方差分析。2011/4/5ZHAODongyangPanzhihuaUniversity2ChapterOutline
2、教学内容1.概要2.统计方法之间的关系3.单因子方差分析4.与单因子方差分析有关的统计量5.进行单因子方差分析6.演示数据7.单因子方差分析的演示性应用8.方差分析的假设9.n因子方差分析10.n因子方差分析演示性应用11.协方差分析12.结果解释13.重复测量的ANOVA14.非定量方差分析15.多变量方差分析16.小结2011/4/5ZHAODongyangPanzhihuaUniversity3百货商店项目在百货商店顾客调查项目中,一些定类的自变量有两个以上的类别。例如:对百货商店的熟悉程度被分为高、中、低。这些自变量对定量因变量的作用可以通过方差分析来考察,从中得到一些有用的信息,并指
3、导进一步的数据分析和解释。例如,把熟悉程度分为三类时,其作用可能是不显著,而分为两类时(高、低)则作用显著。这些信息,加上频数分布,表明把熟悉程度只分为两个类别更恰当。2011/4/5ZHAODongyangPanzhihuaUniversity4实例:电子购物的风险用方差分析对电子购物的偏好进行分析时,检验了购买具有不同社会和经济产品之间的差异。在一项22的实验设计中,经济和社会风险被分为两个水平(高、低),对电子购物的偏好作为因变量。结果显示社会风险和经济风险具有显著的交互效应。对高社会风险的产品(比如时装),无论经济风向如何,电子购物都是不被接受的,但社会风险低时,低经济风险的产品比搞经
4、济风险的产品更适合电子购物。尽管如此,2002年的在线购物人数与2001年相比仍有显著增加。增加的原因可能是由于对更低价格的追求、因特网的便利和对在线购物的安全感有所增加。网站的改善、订购和送货手续的简化,以及更安全的支付系统使网上购物的人数上升,同时降低了以往与网上购物相关联的风险。2011/4/5ZHAODongyangPanzhihuaUniversity5实例:电子购物的风险(续)在百货商店的例子中,当熟悉程度有三类时,t检验不适用于分析组均值的总差异,所以使用了方差分析。电子购物的研究则涉及两个具有两种状态的因子(自变量)的情况下进行均值的比较。在电子购物例子中,t检验不适用,因为每
5、个因子的作用与其他因子不是相互独立的(换句话说,交互效应是显著的),而方差分析在这些研究中提供了有意义的结论。方差分析与t检验和其他统计方法的关系将在下面讨论。2011/4/5ZHAODongyangPanzhihuaUniversity6RelationshipAmongTechniques统计方法之间的关系方差分析Analysisofvariance(ANOVA)一般在两组或两组以上的均值差异检验时使用。通常零假设为各组的均值相等。例如:假设想了解麦片的频繁使用者、不同使用者、少量食用者和非使用者对Total麦片的偏好(用9级利克特量表测量)是否存在差异,零假设为4组在对Total麦片的偏
6、好上不存在差异,这可以用方差分析进行检验。方差分析必须有一个定量(用定距或定比尺度测量)的因变量(对Total麦片的偏好),以及一个或多个自变量(产品使用:频繁使用者、不同使用者、少量食用者和非使用者)。自变量必须都是定类的(非定量),定类自变量称为因子(factors).2011/4/5ZHAODongyangPanzhihuaUniversity7RelationshipAmongTechniques统计方法之间的关系一个因子水平或类别的特定组合被称为一种处理(Treatment)。单因子方差分析(One-wayanalysisofvariance)只涉及一个定类变量或单一因子。频繁使用者
7、、不同使用者、少量食用者和非使用者偏好的差异可以通过单因子方差分析来检验。在单因子方差分析中,一个处理就相当于一种因子水平(如普通使用者就构成一种处理)。如果涉及两个或两个以上因子,就称为n因子方差分析(n-wayanalysisofvariance)。协方差分析如果自变量中既包含定类变量也包含定量变量,这种分析就称为协方差分析analysisofcovariance(ANCOVA)。例如,在考虑调查对象对营养的态度和对早餐重要性的认识的前提下,研究者想了解产品使用组和忠诚组的偏好时,就要采用协方差分析。前两个变量可以用9级Likert量表来衡量,定类自变量(产品使用量和品牌忠诚度)仍然作为因
8、子,定量的自变量(对营养的态度和对早餐重要性的认识)作为协变量(covariates)。2011/4/5ZHAODongyangPanzhihuaUniversity8RelationshipAmongstTest,AnalysisofVariance,AnalysisofCovariance,&RegressionFig.16.1OneIndependentOneorMoreMetricDependentVariabletTestBinaryVariableOne-WayAnalysisofVarianceOneFactorN-WayAnalysisofVarianceMorethanOne
9、FactorAnalysisofVarianceCategorical:FactorialAnalysisofCovarianceCategoricalandIntervalRegressionIntervalIndependentVariables2011/4/5ZHAODongyangPanzhihuaUniversity9RelationshipAmongstTest,AnalysisofVariance,AnalysisofCovariance,&Regressiont检验、方差分析、协方差分析和回归分析之间的关系2011/4/5ZHAODongyangPanzhihuaUnivers
10、ity10One-WayAnalysisofVariance单因子方差分析各个细分市场的产品消费者有差异吗?接触不同电视广告的组对品牌的评价有差异吗?顾客对商店的熟悉程度(高、中、低)对商店的偏好有什么影响?零售商、批发商、代理商对厂家的分销政策态度一致吗?消费者购买某品牌的目的如何随价格水平变化?市场营销研究者通常需要考察因变量在单一自变量或因子的各种状态下均值的差异。例如:2011/4/5ZHAODongyangPanzhihuaUniversity11StatisticsAssociatedwithOne-WayAnalysisofVariance与单因子方差分析有关的统计量用于测量X(
11、自变量或因子)对Y(因变量)is作用的强度。eta2()值在0和1之间变化。eta2(用于检验组均值相等的零假设,是X均方和误差均方之比。F统计量(Fstatistic)是平方和除以适当的自由度。均方(Meansquare)2011/4/5ZHAODongyangPanzhihuaUniversity12StatisticsAssociatedwithOne-WayAnalysisofVariance也表示为是与X组均值变差有关的Y变差。代表X组间的变差,或者Y的平方和中与X有关的部分。组间平方和)也指是Y变差中归因于X每组内的部分,是X无法解释的部分。组内平方和()是Y的总变差。总平方和)2
12、011/4/5ZHAODongyangPanzhihuaUniversity13进行单因子方差分析确定因变量和自变量总方差分解测量作用显著性检验结果解释2011/4/5ZHAODongyangPanzhihuaUniversity14确定因变量和自变量因变量以Y表示,自变量以X表示。X是定类变量,共有c类,在X的每个类别中有n个Y的观察值。表16-1所示。X的每个类别中的样本规模为n,总样本规模N=nc。为了简化,假设X的各类别中的样本(组规模)相等,但这不是必须的。2011/4/5ZHAODongyangPanzhihuaUniversity15ConductingOne-WayAnalys
13、isofVarianceDecomposetheTotalVariation总变差分解=+Y的总变差表示为,可以被分解为两部分是Y的变差中与X的组均值变差有关的部分,代表X的类别之间的变差,也就是说是Y的平方和中与自变量或因子X有关的部分。由于这个原因,也可以表示为。是Y的变差中与X的组内变差有关侧部分,不是由X引起的,因此也称为。这里下标between和within指的是X的类别2011/4/5ZHAODongyangPanzhihuaUniversity16ConductingOne-WayAnalysisofVarianceDecomposetheTotalVariation2011/4
14、/5ZHAODongyangPanzhihuaUniversity17DecompositionoftheTotalVariation:One-WayANOVA单因子方差分析IndependentVariableXTotalCategoriesSampleX1X2X3XcY1Y1Y1Y1Y1Y2Y2Y2Y2Y2:YnYnYnYnYNY1Y2Y3YcYWithinCategoryVariation=SSwithinBetweenCategoryVariation=SSbetweenTotalVariation=SSyCategoryMeanTable16.12011/4/5ZHAODongyan
15、gPanzhihuaUniversity18DecompositionoftheTotalVariation:One-WayANOVA单因子方差分析自变量X类别类别总样本 X1X2X3XcY1Y1Y1Y1Y1Y2Y2Y2Y2Y2:YnYnYnYnYNY1Y2Y3YcY组均值Table16.12011/4/5ZHAODongyangPanzhihuaUniversity19ConductingOne-WayAnalysisofVariance进行单因子方差分析2011/4/5ZHAODongyangPanzhihuaUniversity20ConductingOne-WayAnalysisofV
16、arianceTestSignificance显著性检验2011/4/5ZHAODongyangPanzhihuaUniversity21显著性检验2011/4/5ZHAODongyangPanzhihuaUniversity22ConductingOne-WayAnalysisofVarianceInterprettheResults结果解释Ifthenullhypothesisofequalcategorymeansisnotrejected,thentheindependentvariabledoesnothaveasignificanteffectonthedependentvaria
17、ble.Ontheotherhand,ifthenullhypothesisisrejected,thentheeffectoftheindependentvariableissignificant.Acomparisonofthecategorymeanvalueswillindicatethenatureoftheeffectoftheindependentvariable.如果组均值相等的零假设没有被拒绝,自变量就没有显著性作用。另一方面,如果零假设被拒绝,那么自变量的作用就是显著的。换句话说,因变量在自变量不同组中的均值各不相同。比较组均值能够显示出因变量作用的特点。2011/4/5Z
18、HAODongyangPanzhihuaUniversity23IllustrativeApplicationsofOne-WayAnalysisofVariance单因子方差分析的演示性应用2011/4/5ZHAODongyangPanzhihuaUniversity24EffectofPromotionandClienteleonSales表16-2赠券状态、店内促销、店铺销售额和客源排序2011/4/5ZHAODongyangPanzhihuaUniversity25IllustrativeApplicationsofOne-WayAnalysisofVarianceTable16.32
19、011/4/5ZHAODongyangPanzhihuaUniversity26IllustrativeApplicationsofOne-WayAnalysisofVariance2011/4/5ZHAODongyangPanzhihuaUniversity27IllustrativeApplicationsofOne-WayAnalysisofVariance2011/4/5ZHAODongyangPanzhihuaUniversity28IllustrativeApplicationsofOne-WayAnalysisofVariance2011/4/5ZHAODongyangPanzh
20、ihuaUniversity29IllustrativeApplicationsofOne-WayAnalysisofVariance现在来说明应用计算机程序进行方差分析,同一分析的结果见表16-4。2011/4/5ZHAODongyangPanzhihuaUniversity30One-WayANOVA:EffectofIn-StorePromotiononStoreSalesTable16.4Cell meansLevel of CountMeanPromotionHigh(1)108.300Medium(2)106.200Low(3)103.700TOTAL306.067Source o
21、f Sum ofdfMean F ratio F prob.VariationsquaressquareBetween groups106.067253.033 17.944 0.000(Promotion)Within groups79.800272.956(Error)TOTAL185.867296.4092011/4/5ZHAODongyangPanzhihuaUniversity31SPSSWindowsOne-wayANOVAcanbeefficientlyperformedusingtheprogramCOMPAREMEANSandthenOne-wayANOVA.Toselect
22、thisprocedureusingSPSSforWindows,click:AnalyzeCompareMeansOne-WayANOVAN-wayanalysisofvarianceandanalysisofcovariancecanbeperformedusingGENERALLINEARMODEL.ToselectthisprocedureusingSPSSforWindows,click:AnalyzeGeneralLinearModelUnivariate2011/4/5ZHAODongyangPanzhihuaUniversity32SPSSWindows:One-WayANOV
23、ASelectANALYZEfromtheSPSSmenubar.ClickCOMPAREMEANSandthenONE-WAYANOVA.Move“Salessales”intotheDEPENDENTLISTbox.Move“In-StorePromotionpromotion”totheFACTORbox.ClickOPTIONS.ClickDescriptive.ClickCONTINUE.ClickOK.2011/4/5ZHAODongyangPanzhihuaUniversity33AssumptionsinAnalysisofVarianceThesalientassumptio
24、nsinanalysisofvariancecanbesummarizedasfollows:1.Ordinarily,thecategoriesoftheindependentvariableareassumedtobefixed.Inferencesaremadeonlytothespecificcategoriesconsidered.Thisisreferredtoasthefixed-effectsmodel.2.Theerrortermisnormallydistributed,withazeromeanandaconstantvariance.Theerrorisnotrelat
25、edtoanyofthecategoriesofX.3.Theerrortermsareuncorrelated.Iftheerrortermsarecorrelated(i.e.,theobservationsarenotindependent),theFratiocanbeseriouslydistorted.2011/4/5ZHAODongyangPanzhihuaUniversity349.n因子方差分析10.n因子方差分析演示性应用11.协方差分析12.结果解释13.重复测量的ANOVA14.非定量方差分析15.多变量方差分析请感兴趣的同学自学!2011/4/5ZHAODongyan
26、gPanzhihuaUniversity35N-WayAnalysisofVarianceInmarketingresearch,oneisoftenconcernedwiththeeffectofmorethanonefactorsimultaneously.Forexample:Howdoadvertisinglevels(high,medium,andlow)interactwithpricelevels(high,medium,andlow)toinfluenceabrandssale?Doeducationallevels(lessthanhighschool,highschoolg
27、raduate,somecollege,andcollegegraduate)andage(lessthan35,35-55,morethan55)affectconsumptionofabrand?Whatistheeffectofconsumersfamiliaritywithadepartmentstore(high,medium,andlow)andstoreimage(positive,neutral,andnegative)onpreferenceforthestore?2011/4/5ZHAODongyangPanzhihuaUniversity36N-WayAnalysisof
28、VarianceConsiderthesimplecaseoftwofactorsX1andX2havingcategoriesc1andc2.Thetotalvariationinthiscaseispartitionedasfollows:SStotal=SSduetoX1+SSduetoX2+SSduetointeractionofX1andX2+SSwithinorThestrengthofthejointeffectoftwofactors,calledtheoveralleffect,ormultiple2,ismeasuredasfollows:multiple2=SSy=SSx
29、1+SSx2+SSx1x2+SSerrorh(SSx1+SSx2+SSx1x2)/SSyh2011/4/5ZHAODongyangPanzhihuaUniversity37N-WayAnalysisofVarianceThesignificanceoftheoveralleffectmaybetestedbyanFtest,asfollows:wheredfn=degreesoffreedomforthenumerator=(c1-1)+(c2-1)+(c1-1)(c2-1)=c1c2-1dfd=degreesoffreedomforthedenominator=N-c1c2MS=meansq
30、uareF=(SSx1+SSx2+SSx1x2)/dfnSSerror/dfd=SSx1,x2,x1x2/dfnSSerror/dfd=MSx1,x2,x1x2MSerror2011/4/5ZHAODongyangPanzhihuaUniversity38N-WayAnalysisofVarianceIftheoveralleffectissignificant,thenextstepistoexaminethesignificanceoftheinteractioneffect.Underthenullhypothesisofnointeraction,theappropriateFtest
31、is:Wheredfn=(c1-1)(c2-1)dfd=N-c1c22011/4/5ZHAODongyangPanzhihuaUniversity39N-WayAnalysisofVarianceThesignificanceofthemaineffectofeachfactormaybetestedasfollowsforX1:wheredfn=c1-1dfd=N-c1c2F=SSx1/dfnSSerror/dfd=MSx1MSerror2011/4/5ZHAODongyangPanzhihuaUniversity40Two-WayAnalysisofVarianceSource ofSum
32、 ofMean Sig.ofVariationsquares dfsquare F F Main Effects Promotion106.067 253.033 54.862 0.000 0.557 Coupon 53.333 153.333 55.172 0.000 0.280 Combined159.400 353.133 54.966 0.000Two-way 3.267 21.633 1.690 0.226interactionModel162.667 532.533 33.655 0.000Residual(error)23.200 240.967TOTAL185.867 296.
33、4092Table16.52011/4/5ZHAODongyangPanzhihuaUniversity41Two-WayAnalysisofVarianceTable16.5,cont.Cell MeansPromotionCoupon Count MeanHigh Yes 5 9.200High No 5 7.400Medium Yes 5 7.600Medium No 5 4.800Low Yes 5 5.400Low No 5 2.000TOTAL 30Factor Level MeansPromotionCoupon Count MeanHigh 10 8.300Medium 10
34、6.200Low 10 3.700 Yes 15 7.400 No 15 4.733Grand Mean 30 6.0672011/4/5ZHAODongyangPanzhihuaUniversity42AnalysisofCovarianceWhenexaminingthedifferencesinthemeanvaluesofthedependentvariablerelatedtotheeffectofthecontrolledindependentvariables,itisoftennecessarytotakeintoaccounttheinfluenceofuncontrolle
35、dindependentvariables.Forexample:Indetermininghowdifferentgroupsexposedtodifferentcommercialsevaluateabrand,itmaybenecessarytocontrolforpriorknowledge.Indetermininghowdifferentpricelevelswillaffectahouseholdscerealconsumption,itmaybeessentialtotakehouseholdsizeintoaccount.WeagainusethedataofTable16.
36、2toillustrateanalysisofcovariance.Supposethatwewantedtodeterminetheeffectofin-storepromotionandcouponingonsaleswhilecontrollingfortheeffectofclientele.TheresultsareshowninTable16.6.2011/4/5ZHAODongyangPanzhihuaUniversity43AnalysisofCovarianceSumofMeanSig.SourceofVariation Squares dfSquareFofFCovaria
37、nceClientele0.838 10.8380.8620.363MaineffectsPromotion106.067 253.03354.5460.000Coupon53.333 153.33354.8550.000Combined159.400 353.13354.6490.0002-WayInteractionPromotion*Coupon 3.267 21.6331.6800.208Model163.505 627.25128.0280.000Residual(Error)22.362 230.972TOTAL185.867 296.409CovariateRawCoeffici
38、entClientele-0.078Table16.62011/4/5ZHAODongyangPanzhihuaUniversity44IssuesinInterpretationImportantissuesinvolvedintheinterpretationofANOVAresultsincludeinteractions,relativeimportanceoffactors,andmultiplecomparisons.InteractionsThedifferentinteractionsthatcanarisewhenconductingANOVAontwoormorefacto
39、rsareshowninFigure16.3.RelativeImportanceofFactorsExperimentaldesignsareusuallybalanced,inthateachcellcontainsthesamenumberofrespondents.Thisresultsinanorthogonaldesigninwhichthefactorsareuncorrelated.Hence,itispossibletodetermineunambiguouslytherelativeimportanceofeachfactorinexplainingthevariation
40、inthedependentvariable.2011/4/5ZHAODongyangPanzhihuaUniversity45AClassificationofInteractionEffectsNoncrossover(Case3)Crossover(Case4)PossibleInteractionEffectsNoInteraction(Case1)InteractionOrdinal(Case2)DisordinalFig.16.32011/4/5ZHAODongyangPanzhihuaUniversity46PatternsofInteractionFig.16.4YXXX111
41、213Case1:NoInteractionX22X21XXX111213X22X21YCase2:OrdinalInteractionYXXX111213X22X21Case3:DisordinalInteraction:NoncrossoverYXXX111213X22X21Case4:DisordinalInteraction:Crossover2011/4/5ZHAODongyangPanzhihuaUniversity47IssuesinInterpretationThemostcommonlyusedmeasureinANOVAisomegasquared,.Thismeasure
42、indicateswhatproportionofthevariationinthedependentvariableisrelatedtoaparticularindependentvariableorfactor.TherelativecontributionofafactorXiscalculatedasfollows:Normally,isinterpretedonlyforstatisticallysignificanteffects.InTable16.5,associatedwiththelevelofin-storepromotioniscalculatedasfollows:
43、=0.557wx2=SSx-(dfxxMSerror)SStotal+MSerror wp2=106.067-(2 x 0.967)185.867+0.967=104.133186.834 w2 w2w22011/4/5ZHAODongyangPanzhihuaUniversity48IssuesinInterpretationNote,inTable16.5,thatSStotal =106.067+53.333+3.267+23.2=185.867Likewise,theassociatedwithcouponingis:=0.280Asaguidetointerpreting,alarg
44、eexperimentaleffectproducesanindexof0.15orgreater,amediumeffectproducesanindexofaround0.06,andasmalleffectproducesanindexof0.01.InTable16.5,whiletheeffectofpromotionandcouponingarebothlarge,theeffectofpromotionismuchlarger.w2 wc2=53.333-(1 x 0.967)185.867+0.967=52.366186.8342011/4/5ZHAODongyangPanzh
45、ihuaUniversity49IssuesinInterpretation-MultiplecomparisonsIfthenullhypothesisofequalmeansisrejected,wecanonlyconcludethatnotallofthegroupmeansareequal.Wemaywishtoexaminedifferencesamongspecificmeans.Thiscanbedonebyspecifyingappropriatecontrasts,orcomparisonsusedtodeterminewhichofthemeansarestatistic
46、allydifferent.Aprioricontrastsaredeterminedbeforeconductingtheanalysis,basedontheresearcherstheoreticalframework.Generally,aprioricontrastsareusedinlieuoftheANOVAFtest.Thecontrastsselectedareorthogonal(theyareindependentinastatisticalsense).2011/4/5ZHAODongyangPanzhihuaUniversity50IssuesinInterpreta
47、tion-MultipleComparisonsAposterioricontrastsaremadeaftertheanalysis.Thesearegenerallymultiplecomparisontests.Theyenabletheresearchertoconstructgeneralizedconfidenceintervalsthatcanbeusedtomakepairwisecomparisonsofalltreatmentmeans.Thesetests,listedinorderofdecreasingpower,includeleastsignificantdiff
48、erence,Duncansmultiplerangetest,Student-Newman-Keuls,Tukeysalternateprocedure,honestlysignificantdifference,modifiedleastsignificantdifference,andScheffestest.Ofthesetests,leastsignificantdifferenceisthemostpowerful,Scheffesthemostconservative.2011/4/5ZHAODongyangPanzhihuaUniversity51RepeatedMeasure
49、sANOVAOnewayofcontrollingthedifferencesbetweensubjectsisbyobservingeachsubjectundereachexperimentalcondition(seeTable16.7).Sincerepeatedmeasurementsareobtainedfromeachrespondent,thisdesignisreferredtoaswithin-subjectsdesignorrepeatedmeasuresanalysisofvariance.Repeatedmeasuresanalysisofvariancemaybet
50、houghtofasanextensionofthepaired-samplesttesttothecaseofmorethantworelatedsamples.2011/4/5ZHAODongyangPanzhihuaUniversity52DecompositionoftheTotalVariation:RepeatedMeasuresANOVAIndependentVariableXSubjectCategoriesTotalNo.SampleX1X2X3Xc1Y11Y12Y13Y1cY12Y21Y22Y23Y2cY2:nYn1Yn2Yn3YncYNY1Y2Y3YcYBetweenPe