首页 优化营销平台流程

优化营销平台流程

举报
开通vip

优化营销平台流程优化营销平台流程SimulationNow,letussimulatealargenumberofrealisationsofstudentsusingthisrandommethodofansweringmultiplechoicequestions.WestillrequirethesameBinomialdistributionwithn=100anda=ThiscanbedoneonRusingthecommandrbinom.Forexample,let’ssimulate1000students.>...

优化营销平台流程
优化营销平台流程SimulationNow,letussimulatealargenumberofrealisationsofstudentsusingthisrandommethodofansweringmultiplechoicequestions.WestillrequirethesameBinomialdistributionwithn=100anda=ThiscanbedoneonRusingthecommandrbinom.Forexample,let’ssimulate1000students.>xsim=rbinom(1000,100,1/6)>xsim[1]18229171820211681811161613161425151617[21]1325112417161321101718101718191719151312[41]1511212319141925231920171715161413161714[61]242119818202216152019171315132122121212[81]111411121616172117161714917161712201617[101]1813151612151716172618142115102312161612[121]1718221718141922131721152116171616281617[141]1819161114181618181420131919222213171917[161]182011221925151517185151413181517152017[181]1614231716101216213016132214151617141618[201]1420161925141524221915172210201310151422[221]171216192017152114132111199212216131312[241]14131881418101610122118151716819171118[261]2317201612201116221716132220151520172214[281]1823182020161916151918171422152417151722[301]1822101924211614111420152111171620191314[321]1717191517131823161225131321191620271918[341]1824152313131415231319151119171215151714[361]1820171316141320181518161720141921121317[381]221719161418161812161315169151618221416[401]1417121621162113141918181619171717131711[421]1616131026122017111918121514142015151511[441]1823202313121822121613212214182117121916[461]171815222220151613121922162019191681512[481]2926191620151122152021141613171510131712[501]1820171413192311271917161720211520202119[521]211613211619139102012181413181922192118[541]617171919222318131217162116182119132219[561]2017181517151510181323171423221018111118[581]161714139121414212324191215171811141919[601]191617131315171817139191822171314221323[621]231919162414171817131612715171618221915[641]161818132018126151116191213111711151119[661]1716162112182019161418171614111717161717[681]171816181218182019131216141313615121914[701]201716142119152617201224131119211813916[721]916171615121121211319131316111715192219[741]1113141620151612181412142112232119102417[761]1719191518121414142012201221192021201718[781]1512162316161915121421251219202217162120[801]232417201719142220251012151671414182210[821]1522231812101418151518102111201520101316[841]161722191916820171321162516131714171921[861]1719142220181419172320181411161826242418[881]2116232014161513141112131416181716171320[901]228171716161422171818211511202118151921[921]1622141216201621111319142312121714152617[941]1814211714242112211320221120101616151913[961]161516179141112191716152114151415171516[981]1911151717171118211415171816112219161415Itmakessensenowtolookatpropertiesofthese1000simulationswhichhavebeenplacedinthevector“xsim”.>mean(xsim)[1]16.624>median(xsim)[1]17>sd(xsim)[1]3.778479>var(xsim)[1]14.2769>Nowcomparetheactualvaluesfromthesimulations,withthetheoreticalvaluesfromtheprobabilitydistribution.SIMULATIONTHEORETICALMEAN16.62416.66667VARIANCE14.276913.88889Afullsummaryoftheresultsofthesimulationisgivenwith:>table(xsim)xsim5678910111213141516171327102140577280821181181819202122232425262728293085836155462514962111>AHistogramcanalsobeplottedofthis:>hist(xsim)NoticethataBARPLOTofxsimdoesNOTproduceausefulgraph!>barplot(xsim)AbarplotoftheTABLEofxsimdoeswork,though.>barplot(table(xsim))PoissonDistributionThePoissondistributionisusedtomodelthenumberofeventsoccurringwithinagiventimeinterval.TheformulaforthePoissonprobabilitydensity(mass)functionisistheshapeparameterwhichindicatestheaveragenumberofeventsinthegiventimeinterval.Someeventsareratherrare-theydon'thappenthatoften.Forinstance,caraccidentsaretheexceptionratherthantherule.Still,overaperiodoftime,wecansaysomethingaboutthenatureofrareevents.Anexampleistheimprovementoftrafficsafety,wherethegovernmentwantstoknowwhetherseatbeltsreducethenumberofdeathincaraccidents.Here,thePoissondistributioncanbeausefultooltoanswerquestionsaboutbenefitsofseatbeltuse.OtherphenomenathatoftenfollowaPoissondistributionaredeathofinfants,thenumberofmisprintsinabook,thenumberofcustomersarriving,andthenumberofactivationsofaGeigercounter.ThedistributionwasderivedbytheFrenchmathematicianSiméonPoissonin1837,andthefirstapplicationwasthedescriptionofthenumberofdeathsbyhorsekickinginthePrussianarmy.ExampleArrivalsatabus-stopfollowaPoissondistributionwithanaverageof4.5everyquarterofanhour.Obtainabarplotofthedistribution(assumeamaximumof20arrivalsinaquarterofanhour)andcalculatetheprobabilityoffewerthan3arrivalsinaquarterofanhour.Theprobabilitiesof0upto2arrivalscanbecalculateddirectlyfromtheformulawith=4.5Sop(0)=0.01111Similarlyp(1)=0.04999andp(2)=0.11248Sotheprobabilityoffewerthan3arrivalsis0.01111+0.04999+0.11248=0.17358RCodeAswiththeBinomialdistribution,thecodesdpoisandppoiswilldothecalculationsforyou.>x=dpois(0:20,4.5)>x[1]1.110900e-024.999048e-021.124786e-011.687179e-011.898076e-01[6]1.708269e-011.281201e-018.236295e-024.632916e-022.316458e-02[11]1.042406e-024.264389e-031.599146e-035.535504e-041.779269e-04[16]5.337808e-051.501258e-053.973919e-069.934798e-072.352979e-07[21]5.294202e-08>>barplot(x,names=0:20)Nowcheckthatppoisgivesthesameanswer(ppoisisacumulativedistribution).>ppois(2,4.5)[1]0.1735781>Consideracollectionofgraphsfordifferentvaluesof=3=4=5=6=10Inthelastcase,theprobabilityof20arrivalsisnolongernegligible,sovaluesupto,say,30wouldhavetobeconsidered.PropertiesofPoissonThemeanandvariancearebothequalto.ThesumofindependentPoissonvariablesisafurtherPoissonvariablewithmeanequaltothesumoftheindividualmeans.Aswellascroppingupinthesituationsalreadymentioned,thePoissondistributionprovidesanapproximationfortheBinomialdistribution.Approximation:Ifnislargeandpissmall,thentheBinomialdistributionwithparametersnandp,(B(n;p)),iswellapproximatedbythePoissondistributionwithparameternp,i.e.bythePoissondistributionwiththesamemeanExampleBinomialsituation,n=100,p=0.075Calculatetheprobabilityoffewerthan10successes.>pbinom(9,100,0.075)[1]0.7832687>Thiswouldhavebeenverytrickywithmanualcalculationasthefactorialsareverylargeandtheprobabilitiesverysmall
本文档为【优化营销平台流程】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_072127
暂无简介~
格式:ppt
大小:1MB
软件:PowerPoint
页数:36
分类:
上传时间:2020-09-18
浏览量:0