《introduction_to_stochastic_processes》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
IntroductiontoStochasticProcesses-LectureNotes(with33illustrations)GordanŽitkovićDepartmentofMathematicsTheUniversityofTexasatAustin Contents1Probabilityreview41.1Randomvariables..........................................41.2Countablesets.............................................51.3Discreterandomvariables.....................................51.4Expectation..............................................71.5Eventsandprobability........................................81.6Dependenceandindependence..................................91.7Conditionalprobability.......................................101.8Examples................................................122Mathematicain15min152.1BasicSyntax..............................................152.2NumericalApproximation.....................................162.3ExpressionManipulation......................................162.4ListsandFunctions.........................................172.5LinearAlgebra............................................192.6PredefinedConstants........................................202.7Calculus................................................202.8SolvingEquations..........................................222.9Graphics................................................222.10ProbabilityDistributionsandSimulation............................232.11HelpCommands...........................................242.12CommonMistakes..........................................253StochasticProcesses263.1Thecanonicalprobabilityspace.................................273.2ConstructingtheRandomWalk.................................283.3Simulation...............................................293.3.1Randomnumbergeneration...............................293.3.2SimulationofRandomVariables............................303.4MonteCarloIntegration......................................334TheSimpleRandomWalk354.1Construction..............................................354.2Themaximum............................................361 CONTENTS5Generatingfunctions405.1Definitionandfirstproperties...................................405.2Convolutionandmoments.....................................425.3RandomsumsandWald’sidentity................................446Randomwalks-advancedmethods486.1Stoppingtimes............................................486.2Wald’sidentityII...........................................506.3ThedistributionofthefirsthittingtimeT1..........................526.3.1Arecursiveformula....................................526.3.2Generating-functionapproach..............................536.3.3Doweactuallyhit1soonerorlater?.........................556.3.4Expectedtimeuntilwehit1?..............................557Branchingprocesses567.1Abitofhistory............................................567.2Amathematicalmodel.......................................567.3Constructionandsimulationofbranchingprocesses....................577.4Agenerating-functionapproach.................................587.5Extinctionprobability........................................618MarkovChains638.1TheMarkovproperty........................................638.2Examples................................................648.3Chapman-Kolmogorovrelations.................................709The“Stochastics”package749.1Installation...............................................749.2BuildingChains............................................749.3Gettinginformationaboutachain................................759.4Simulation...............................................769.5Plots...................................................769.6Examples................................................7710ClassificationofStates7910.1TheCommunicationRelation...................................7910.2Classes.................................................8110.3Transienceandrecurrence....................................8310.4Examples................................................8411MoreonTransienceandrecurrence8611.1Acriterionforrecurrence.....................................8611.2Classproperties...........................................8811.3Acanonicaldecomposition....................................89LastUpdated:December24,20102IntrotoStochasticProcesses:LectureNotes CONTENTS12Absorptionandreward9212.1Absorption...............................................9212.2Expectedreward...........................................9513StationaryandLimitingDistributions9813.1Stationaryandlimitingdistributions...............................9813.2Limitingdistributions........................................10414SolvedProblems10714.1Probabilityreview..........................................10714.2RandomWalks............................................11114.3Generatingfunctions........................................11414.4Randomwalks-advancedmethods...............................12014.5Branchingprocesses........................................12214.6Markovchains-classificationofstates.............................13314.7Markovchains-absorptionandreward............................14214.8Markovchains-stationaryandlimitingdistributions....................14814.9Markovchains-variousmultiple-choiceproblems.....................156LastUpdated:December24,20103IntrotoStochasticProcesses:LectureNotes Chapter1ProbabilityreviewTheprobableiswhatusuallyhappens.—AristotleItisatruthverycertainthatwhenitisnotinourpowertodetermine.whatistrueweoughttofollowwhatismostprobable—Descartes-“DiscourseonMethod”Itisremarkablethatasciencewhichbeganwiththeconsiderationofgamesofchanceshouldhavebecomethemostimportantobjectofhumanknowledge.—PierreSimonLaplace-“ThéorieAnalytiquedesProbabilités,1812”Anyonewhoconsidersarithmeticmethodsofproducingrandomdigitsis,ofcourse,inastateofsin.—JohnvonNeumann-quotein“ConicSections”byD.MacHaleIsayuntoyou:amanmusthavechaosyetwithinhimtobeabletogivebirthtoadancingstar:Isayuntoyou:yehavechaosyetwithinyou...—FriedrichNietzsche-“ThusSpakeZarathustra”1.1RandomvariablesProbabilityisaboutrandomvariables.Insteadofgivingaprecisedefinition,letusjustmetionthatarandomvariablecanbethoughtofasanuncertain,numerical(i.e.,withvaluesinR)quantity.WhileitistruethatwedonotknowwithcertaintywhatvaluearandomvariableXwilltake,weusuallyknowhowtocomputetheprobabilitythatitsvaluewillbeinsomesomesubsetofR.Forexample,wemightbeinterestedinP[X7],P[X2[2;3:1]]orP[X2f1;2;3g].ThecollectionofallsuchprobabilitiesiscalledthedistributionofX.Onehastobeverycarefulnottoconfusetherandomvariableitselfanditsdistribution.Thispointisparticularlyimportantwhenseveralrandomvariablesappearatthesametime.WhentworandomvariablesXandYhavethesamedistribution,i.e.,whenP[X2A]=P[Y2A]foranysetA,wesaythatXandYareequally(d)distributedandwriteX=Y.4 CHAPTER1.PROBABILITYREVIEW1.2CountablesetsAlmostallrandomvariablesinthiscoursewilltakeonlycountablymanyvalues,soitisprobablyagoodideatoreviewbreiflywhatthewordcountablemeans.Asyoumightknow,thecountableinfinityisoneofmanydifferentinfinitiesweencounterinmathematics.Simply,asetiscountableifithasthesamenumberofelementsasthesetN=f1;2;:::gofnaturalnumbers.Moreprecisely,wesaythatasetAiscountableifthereexistsafunctionf:N!Awhichisbijective(one-to-oneandonto).Youcanthinkfasthecorrespondencethat“proves”thatthereexactlyasmanyelementsofAasthereareelementsofN.Alternatively,youcanviewfasanorderingofA;itarrangesAintoaparticularorderA=fa1;a2;:::g,wherea1=f(1),a2=f(2),etc.Infinitiesarefunny,however,asthefollowingexampleshowsExample1.1.1.Nitselfiscountable;justusef(n)=n.2.N0=f0;1;2;3;:::giscountable;usef(n)=n 1.YoucanseeherewhyIthinkthatinfinitiesarefunny;thesetN0andthesetN-whichisitspropersubset-havethesamesize.3.Z=f:::; 2; 1;0;1;2;3;:::giscountable;nowthefunctionfisabitmorecomplicated;(2k+1;k0f(k)= 2k;k<0:YoucouldthinkthatZismorethan“twice-as-large”asN,butitisnot.Itisthesamesize.4.Itgetsevenweirder.ThesetNN=f(m;n):m2N;n2Ngofallpairsofnaturalnumbersisalsocountable.Ileaveittoyoutoconstructthefunctionf.5.AsimilarargumentshowsthatthesetQofallrationalnumbers(fractions)isalsocountable.6.Theset[0;1]ofallrealnumbersbetween0and1isnotcountable;thisfactwasfirstprovenbyGeorgCantorwhousedaneattrickcalledthediagonalargument.1.3DiscreterandomvariablesArandomvariableissaidtobediscreteifittakesatmostcountablymanyvalues.Moreprecisely,XissaidtobediscreteifthereexistsafiniteorcountablesetSRsuchthatP[X2S]=1,i.e.,ifweknowwithcertaintythattheonlyvaluesXcantakearethoseinS.ThesmallestsetSwiththatpropertyiscalledthesupportofX.IfwewanttostressthatthesupportcorrespondstotherandomvariableX,wewriteX.Somesupportsappearmoreoftenthentheothers:1.IfXtakesonlythevalues1;2;3;:::,wesaythatXisN-valued.2.Ifweallow0(inadditiontoN),sothatP[X2N0]=1,wesaythatXisN0-valuedLastUpdated:December24,20105IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEW3.Sometimes,itisconvenienttoallowdiscreterandomvariablestotakethevalue+1.Thisismostlythecasewhenwemodelthewaitingtimeuntilthefirstoccurenceofaneventwhichmayormaynoteverhappen.Ifitneverhappens,wewillbewaitingforever,andthewaitingtimewillbe+1.Inthosecases-whenS=f1;2;3;:::;+1g=N[f+1g-wesaythattherandomvariableisextendedN-valued.ThesameappliestothecaseofN0(insteadofN),andwetalkabouttheextendedN0-valuedrandomvariables.Sometimestheadjective“extended”isleftout,andwetalkaboutN0-valuedrandomvariables,eventhoughweallowthemtotakethevalue+1.Thissoundsmoreconfusingthatitactuallyis.4.Occasionally,wewantourrandomvariablestotakevalueswhicharenotnecessarilynum-bers(thinkaboutHandTasthepossibleoutcomesofacointoss,orthesuitofarandomlychosenplayingcard).Isthecollectionofallpossiblevalues(likefH;Tgorf~;•;|;}g)iscountable,westillcallsuchrandomvariablesdiscrete.WewillseemoreofthatwhenwestarttalkingaboutMarkovchains.Discreterandomvariablesareveryniceduetothefollowingfact:inordertobeabletocomputeanyconceivableprobabilityinvolvingadiscreterandomvariableX,itisenoughtoknowhowtocomputetheprobabilitiesP[X=x],forallx2S.Indeed,ifweareinterestedinfiguringouthowmuchP[X2B]is,forsomesetBR(B=[3;6],orB=[ 2;1)),wesimplypickallx2SwhicharealsoinBandsumtheirprobabilities.Inmathematicalnotation,wehaveXP[X2B]=P[X=x]:x2SBForthisreason,thedistributionofanydiscreterandomvariableXisusuallydescribedviaatablex1x2x3:::X;p1p2p3:::wherethetoprowlistsalltheelementsofS(thesupportofX)andthebottomrowliststheirprobabilities(pi=P[X=xi],i2N).WhentherandomvariableisN-valued(orN0-valued),thesituationisevensimplerbecauseweknowwhatx1;x2;:::areandweidentifythedistributionofXwiththesequencep1;p2;:::(orp0;p1;p2;:::intheN0-valuedcase),whichwecalltheprobabilitymassfunction(pmf)oftherandomvariableX.WhatabouttheextendedN0-valuedcase?ItisassimplebecausewecancomputetheprobabilityP[X=+1],ifweknowalltheprobabilitiespi=P[X=i],i2N0.Indeed,weusethefactthatP[X=0]+P[X=1]++P[X=1]=1;P1sothatP[X=1]=1 i=1pi,wherepi=P[X=i].Inotherwords,ifyouaregivenaP1probabilitymassfunction(p0;p1;:::),yousimplyneedtocomputethesumi=1pi.Ifithappenstobeequalto1,youcansafelyconcludethatXnevertakesthevalue+1.Otherwise,theprobabilityof+1ispositive.TherandomvariablesforwhichS=f0;1gareespeciallyuseful.Theyarecalledindicators.Thenamecomesfromthefactthatyoushouldthinkofsuchvariablesassignallights;ifX=1aneventofinteresthashappened,andifX=0ithasnothappened.Inotherwords,Xindicatestheoccurenceofanevent.Thenotationweuseisquitesuggestive;forexample,ifYistheoutcomeofacoin-toss,andwewanttoknowwhetherHeads(H)occurred,wewriteX=1fY=Hg:LastUpdated:December24,20106IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEWExample1.2.SupposethattwodicearethrownsothatY1andY2arethenumbersobtained(bothY1andY2arediscreterandomvariableswithS=f1;2;3;4;5;6g).Ifweareinterestedintheprobabilitythetheirsumisatleast9,weproceedasfollows.WedefinetherandomvariableZ-thesumofY1andY2-byZ=Y1+Y2.Anotherrandomvariable,letuscallitX,isdefinedbyX=1fZ9g,i.e.,(1;Z9;X=0;Z<9:Withsuchaset-up,Xsignalswhethertheeventofinteresthashappened,andwecanstateouroriginalproblemintermsofX:“ComputeP[X=1]!”.Canyoucomputeit?1.4ExpectationForadiscreterandomvariableXwithsupport,wedefinetheexpectationE[X]ofXbyXE[X]=xP[X=x];x2Paslongasthe(possibly)infinitesumxP[X=x]absolutelyconverges.Whenthesumdoesx2notconverge,orifitconvergesonlyconditionally,wesaythattheexpectationofXisnotdefined.WhentherandomvariableinquestionisN0-valued,theexpressionabovesimplifiestoX1E[X]=ipi;i=0wherepi=P[X=i],fori2N0.Unlikeinthegeneralcase,theabsoluteconvergenceofthedefiningseriescanfailinessentiallyoneway,i.e.,whenXnlimipi=+1:n!1i=0Inthatcase,theexpectationdoesnotformallyexist.WestillwriteE[X]=+1,butreallymeanthatthedefiningsumdivergestowardsinfinity.Onceweknowwhattheexpectationis,wecaneasilydefineseveralmorecommonterms:Definition1.3.LetXbeadiscreterandomvariable.•IftheexpectationE[X]exists,wesaythatXisintegrable.•IfE[X2]<1(i.e.,ifX2isintegrable),Xiscalledsquare-integrable.m•IfE[jXj]<1,forsomem>0,wesaythatXhasafinitem-thmoment.m•IfXhasafinitem-thmoment,theexpectationE[jX E[X]j]existsandwecallitthem-thcentralmoment.ItcanbeshownthattheexpectationEpossessesthefollowingproperties,whereXandYarebothassumedtobeintegrable:LastUpdated:December24,20107IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEW1.E[X+Y]=E[X]+E[Y],for;2R(linearityofexpectation).2.E[X]E[Y]ifP[XY]=1(monotonicityofexpectation).Definition1.4.LetXbeasquare-integrablerandomvariable.WedefinethevarianceVar[X]byVar[X]=E[(X m)2];wherem=E[X]:pThesquare-rootVar[X]iscalledthestandarddeviationofX.Remark1.5.Eachsquare-integrablerandomvariableisautomaticallyintegrable.Also,ifthem-thmomentexists,thenalllowermomentsalsoexist.Westillneedtodefinewhathappenswithrandomvariablesthattakethevalue+1,butthatisveryeasy.WestipulatethatE[X]doesnotexist,(i.e.,E[X]=+1)aslongasP[X=+1]>0.Simplyput,theexpectationofarandomvariableisinfiniteifthereisapositivechance(nomatterhowsmall)thatitwilltakethevalue+1.1.5EventsandprobabilityProbabilityisusuallyfirstexplainedintermsofthesamplespaceorprobabilityspace(whichwedenotebyinthesenotes)andvarioussubsetsofwhicharecalledevents1Eventstypicallycontainallelementaryevents,i.e.,elementsoftheprobabilityspace,usuallydenotedby!.Forexample,ifweareinterestedinthelikelihoodofgettinganoddnumberasasumofoutcomesoftwodicethrows,webuildaprobabilityspace=f(1;1);(1;2);:::;(6;1);(2;1);(2;2);:::;(2;6);:::;(6;1);(6;2);:::;(6;6)ganddefinetheeventAwhichcontainsofallpairs(k;l)2suchthatk+lisanoddnumber,i.e.,A=f(1;2);(1;4);(1;6);(2;1);(2;3);:::;(6;1);(6;3);(6;5)g:Onecanthinkofeventsasverysimplerandomvariables.Indeed,if,foraneventA,wedefinetherandomvariable1Aby(1;Ahappened,1A=0;Adidnothappen,wegettheindicatorrandomvariablementionedabove.Conversely,foranyindicatorrandomvariableX,wedefinetheindicatedeventAasthesetofallelementaryeventsatwhichXtakesthevalue1.Whatdoesallthishavetodowithprobability?Theanalogygoesonestepfurther.IfweapplythenotionofexpectationtotheindicatorrandomvariableX=1A,wegettheprobabilityofA:E[1A]=P[A]:Indeed,1Atakesthevalue1onA,andthevalue0onthecomplementAc=nA.Therefore,E[1A]=1P[A]+0P[Ac]=P[A].1Whenisinfinite,notallofitssubsetscanbeconsideredevents,duetoverystrangetechnicalreasons.Wewilldisregardthatfactfortherestofthecourse.Ifyoufeelcuriousastowhythatisthecase,googleBanach-Tarskiparadox,andtrytofindaconnection.LastUpdated:December24,20108IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEW1.6DependenceandindependenceOneofthemaindifferencesbetweenrandomvariablesand(deterministicornon-random)quan-titiesisthatintheformercasethewholeismorethanthesumofitsparts.WhatdoImeanbythat?Whentworandomvariables,sayXandY,areconsideredinthesamesetting,youmustspecifymorethanjusttheirdistributions,ifyouwanttocomputeprobabilitiesthatinvolvebothofthem.Herearetwoexamples.1.Wethrowtwodice,anddenotetheoutcomeonthefirstonebyXandthesecondonebyY.2.Wethrowtwodice,anddenotetheoutcomeofthefirstonebyX,setY=6 Xandforgetabouttheseconddie.Inbothcases,bothXandYhavethesamedistribution!123456X;Y111111666666Thepairs(X;Y)are,however,verydifferentinthetwoexamples.Inthefirstone,ifthevalueofXisrevealed,itwillnotaffectourviewofthevalueofY.Indeed,thedicearenot“connected”inanyway(theyareindependentinthelanguageofprobability).Inthesecondcase,theknowledgeofXallowsustosaywhatYiswithoutanydoubt-itis6 X.Thisexampleshowsthatwhenmorethanonerandomvariableisconsidered,oneneedstoobtainexternalinformationabouttheirrelationship-noteverythingcanbededucedonlybylookingattheirdistributions(pmfs,or...).Oneofthemostcommonformsofrelationshiptworandomvariablescanhaveistheoneofexample(1)above,i.e.,norelationshipatall.Moreformally,wesaythattwo(discrete)randomvariablesXandYareindependentifP[X=xandY=y]=P[X=x]P[Y=y];forallxandyintherespectivesupportsXandYofXandY.Thesameconceptcanbeappliedtoevents,andwesaythattwoeventsAandBareindependentifP[AB]=P[A]P[B]:Thenotionofindependenceiscentraltoprobabilitytheory(andthiscourse)becauseitisrelativelyeasytospotinreallife.Ifthereisnophysicalmechanismthattiestwoevents(likethetwodicewethrow),weareinclinedtodeclarethemindependent2.Oneofthemostimportanttasksinprobabilisticmodellingistheidentificationofthe(smallnumberof)independentrandomvariableswhichserveasbuildingblocksforabigcomplexsystem.Youwillseemanyexamplesofthatasweproceedthroughthecourse.2Actually,trueindependencedoesnotexistinreality,save,perhapsafewquantum-theoreticphenomena.Evenwithapparentlyindependentrandomvariables,dependencecansneakinthemostslyofways.Hereisafunnyexample:arecentsurveyhasfoundalargecorrelationbetweenthesaleofdiapersandthesaleofsix-packsofbeeracrossmanyWalmartstoresthroughoutthecountry.Atfirstthesetwoappearindependent,butIamsureyoucancomeupwithmanyanamusingstorywhytheyshould,actually,bequitedependent.LastUpdated:December24,20109IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEW1.7ConditionalprobabilityWhentworandomvariablesarenotindependent,westillwanttoknowhowtheknowledgeoftheexactvalueofoneoftheaffectsourguessesaboutthevalueoftheother.Thatiswhattheconditionalprobabilityisfor.Westartwiththedefinition,andwestateitforeventsfirst:fortwoeventsA,BsuchthatP[B]>0,theconditionalprobabilityP[AjB]ofAgivenBisdefinedas:P[AB]P[AjB]=:P[B]TheconditionalprobabilityisnotdefinedwhenP[B]=0(otherwise,wewouldbecomputing0-why?).Everystatementinthesequelwhichinvolvesconditionalprobabilitywillbeassumed0toholdonlywhenP[B]=0,withoutexplicitmention.Theconditionalprobabilitycalculationsoftenuseoneofthefollowingtwoformulas.Bothofthemusethefamiliarconceptofpartition.Ifyouforgotwhatitis,hereisadefinition:acollectionA1;A2;:::;Anofeventsiscalledapartitionofifa)A1[A2[:::An=andb)AiAj=;forallpairsi;j=1;:::;nwithi6=j.So,letA1;:::;Anbeapartitionof,andletBbeanevent.1.TheLawofTotalProbability.XnP[B]=P[BjAi]P[Ai]:i=12.Bayesformula.Fork=1;:::;n,wehaveP[BjAk]P[Ak]P[AkjB]=Pn:i=1P[BjAi]P[Ai]Eventhoughtheformulasabovearestatedforfinitepartitions,theyremaintruewhenthenumberofAk’siscountablyinfinite.Thefinitesumshavetobereplacedbyinfiniteseries,however.Randomvariablescanbesubstitutedforeventsinthedefinitionofconditionalprobabilityasfollows:fortworandomvariablesXandY,theconditionalprobabiltythatX=x,givenY=y(withxandyinrespectivesupportsXandY)isgivenbyP[X=xandY=y]P[X=xjY=y]=:P[Y=y]Theformulaaboveproducesadifferentprobabilitydistributionforeachy.ThisiscalledtheconditionaldistributionofX,givenY=y.Wegiveasimpleexampletoillustratethisconcept.LetXbethenumberofheadsobtainedwhentwocoinsarethrown,andletYbetheindicatoroftheeventthatthesecondcoinshowsheads.ThedistributionofXisBinomial:!012X111;424or,inthemorecompactnotationwhichweusewhenthesupportisclearfromthecontextX(1;1;1).TherandomvariableYhastheBernoullidistributionY=(1;1).Whathappens42422LastUpdated:December24,201010IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEWtothedistributionofX,whenwearetoldthatY=0,i.e.,thatthesecondcoinshowsheads.Inthatcasewehave8>>P[X=0;Y=0]=P[thepatternisTT]=1=4=1;x=0
>P[Y=0]P[Y=0]1=22:P[X=2;Y=0]P[well,thereisnosuchpattern]0===0;x=2P[Y=0]P[Y=0]1=2Thus,theconditionaldistributionofX,givenY=0,is(1;1;0).Asimilarcalculationcanbeused22togettheconditionaldistributionofX,butnowgiventhatY=1,is(0;1;1).Themoralofthe22storyisthattheadditionalinformationcontainedinYcanalterourviewsabouttheunknownvalueofXusingtheconceptofconditionalprobability.Onefinalremarkabouttherelationshipbetweenindependenceandconditionalprobability:supposethattherandomvariablesXandYareindependent.ThentheknowledgeofYshouldnotaffecthowwethinkaboutX;indeed,thenP[X=x;Y=y]P[X=x]P[Y=y]P[X=xjY=y]===P[X=x]:P[Y=y]P[Y=y]Theconditionaldistributiondoesnotdependony,andcoincideswiththeunconditionalone.ThenotionofindependencefortworandomvariablescaneasilybegeneralizedtolargercollectionsDefinition1.6.RandomvariablesX1;X2;:::;XnaresaidtobeindependentifP[X1=x1;X2=x2;:::Xn=xn]=P[X1=x1]P[X2=x2]:::P[Xn=xn]forallx1;x2;:::;xn.Aninfinitecollectionofrandomvariablesissaidtobeindependentifallofitsfinitesubcol-lectionsareindependent.Independenceisoftenusedinthefollowingway:Proposition1.7.LetX1;:::;Xnbeindependentrandomvariables.Then1.g1(X1),...,gn(Xn)arealsoindependentfor(practically)allfunctionsg1;:::;gn,2.ifX1,...,XnareintegrablethentheproductX1:::XnisintegrableandE[X1:::Xn]=E[X1]:::E[Xn];and3.ifX1,...,Xnaresquare-integrable,thenVar[X1++Xn]=Var[X1]++Var[Xn]:EquivalentlyCov[Xi;Xj]=E[(X1 E[X1])(X2 E[X2])]=0;foralli6=j2f1;2;:::;ng.Remark1.8.Thelaststatementsaysthatindependentrandomvariablesareuncorrelated.Theconverseisnottrue.Thereareuncorrelatedrandomvariableswhicharenotindependent.LastUpdated:December24,201011IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEWWhenseveralrandomvariables(X1;X2;:::Xn)areconsideredinthesamesetting,weof-tengroupthemtogetherintoarandomvector.ThedistributionoftherandomvectorX=(X1;:::;Xn)isthecollectionofallprobabilitiesoftheformP[X1=x1;X2=x2;:::;Xn=xn];whenx1;x2;:::;xnrangethroughallnumbersintheappropriatesupports.Unlikeinthecaseofasinglerandomvariable,writingdownthedistributionsofrandomvectorsintablesisabitmoredifficult.Inthetwo-dimensionalcase,onewouldneedanentirematrix,andinthehigherdimensionssomesortofahologramwouldbetheonlyhope.ThedistributionsofthecomponentsX1;:::;XnoftherandomvectorXarecalledthemarginaldistributionsoftherandomvariablesX1;:::;Xn.WhenwewanttostressthefactthattherandomvariablesX1;:::;Xnareapartofthesamerandomvector,wecallthedistributionofXthejointdistributionofX1;:::;Xn.Itisimportanttonotethat,unlessrandomvariablesX1;:::;Xnareaprioriknowntobeindependent,thejointdistributionholdsmoreinformationaboutXthanallmarginaldistributionstogether.1.8ExamplesHereisashortlistofsomeofthemostimportantdiscreterandomvariables.Youwilllearnaboutgeneratingfunctionssoon.Example1.9.Bernoulli.Success(1)offailure(0)withprobabilityp(ifsuccessisencodedby1,failureby 1andp=1,wecallitthecointoss).20.7.parameters:p2(0;1)(q=1 p)0.6.notation:b(p).support:f0;1g0.5.pmf:p0=pandp1=q=1 p0.4.generatingfunction:ps+q0.3.mean:pp.standarddeviation:pq0.2.figure:themassfunctionaBernoullidistribu-0.1tionwithp=1=3.0.0Binomial.Thenumberofsuccessesinnrepeti--0.50.00.51.0LastUpdated:December24,201012IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEWtionsofaBernoullitrialwithsuccessprobabilityp.0.30.parameters:n2N,p2(0;1)(q=1 p).notation:b(n;p)0.25.support:f0;1;:::;ng 0.20.pmf:p=npkqn k,k=0;:::;nkk.generatingfunction:(ps+q)n0.15.mean:npp0.10.standarddeviation:npq.figure:massfunctionsofthreebinomialdis-0.05tributionswithn=50andp=0:05(blue),p=0:5(purple)andp=0:8(yellow).01020304050Poisson.Thenumberofspellingmistakesonemakeswhiletypingasinglepage..parameters:>00.4.notation:p(n;p).support:N00.3 k.pmf:pk=ek!,k2N0.generatingfunction:e(s 1)0.2.mean:p.standarddeviation:0.1.figure:massfunctionsoftwoPoissondistribu-tionswithparameters=0:9(blue)and=100510152025(purple).Geometric.ThenumberofrepetitionsofaBernoullitrialwithparameterpuntilthefirstsuccess.0.30.parameters:p2(0;1),q=1 p.notation:g(p)0.25.support:N00.20.pmf:pk=pqk 1,k2N0p.generatingfunction:0.151 qsq.mean:pp0.10q.standarddeviation:p0.05.figure:massfunctionsoftwoGeometricdistri-butionswithparametersp=0:1(blue)andp=0:4051015202530(purple).LastUpdated:December24,201013IntrotoStochasticProcesses:LectureNotes CHAPTER1.PROBABILITYREVIEWNegativeBinomial.Thenumberoffailuresittakestoobtainrsuccessesinrepeatedindepen-dentBernoullitrialswithsuccessprobabilityp.0.30.parameters:r2N,p2(0;1)(q=1 p).notation:g(n;p)0.25.support:N 00.20.pmf:p= rprqk,k=2Nkk0rp0.15.generatingfunction:1 qsq.mean:r0.10ppqr.standarddeviation:p0.05.figure:massfunctionsoftwonegativebino-mialdistributionswithr=100;p=0:6(blue)and020406080100r=25;p=0:9(purple).LastUpdated:December24,201014IntrotoStochasticProcesses:LectureNotes Chapter2Mathematicain15minMathematicaisaglorifiedcalculator.Hereishowtouseit1.2.1BasicSyntax•Symbols+,-,/,^,*areallsupportedbyMathematica.Multiplicationcanberepre-sentedbyaspacebetweenvariables.ax+banda*x+bareidentical.•Warning:Mathematicaiscase-sensitive.Forexample,thecommandtoexitisQuitandnotquitorQUIT.•Bracketsareusedaroundfunctionarguments.WriteSin[x],notSin(x)orSin{x}.•Parentheses()grouptermsformathoperations:(Sin[x]+Cos[y])*(Tan[z]+z^2).•Ifyouendanexpressionwitha;(semi-colon)itwillbeexecuted,butitsoutputwillnotbeshown.Thisisusefulforsimulations,e.g.•Braces{}areusedforlists:In[1]:=A=81,2,3