Вы находитесь на странице: 1из 48

1

I E 5004: Engineering Probabilit y and


Simulat ion
Instructor: Dr.Kim,Sujin(Lecture16),A/Prof.NGSzu Hui (Lecture712)
TA:YuanJunandWeng Renrong
Textbook:SheldonRoss,AFirstCourseinProbability,8
th
Ed.
IntegratedVirtualLearningEnvironment:
http://ivle.nus.edu.sg
YouarestronglyencouragedtouseDiscussionForumforQ&A.TAswill
visittheforumtimetotimeandwillansweryourquestions.
2
Course Cont ent s
Lecture16(Lecturer:Kim,Sujin):Ch17
AxiomofProbability
ConditionalProbabilityandIndependence
DiscreteRandomVariables
ContinuousRandomVariables
JointlyDistributedRandomVariables
PropertiesofExpectation
3
Course Cont ent s
Lecture712(Lecturer:Ng,SzuHui):Ch810
LimitTheorems
PoissonProcesses
MarkovChains
Simulation
4
Homework Assignment s
WeeklyassignmentswillbegivenonMondayandduethe
nextMonday.ThehomeworkdropboxislocatedatE10716.
TheassignmentswillbereviewedbyTAs,butwillnotbe
includedingrading.
Midterm 20%,
Final 80%.
Test s and Grading
5
Exams
MidtermExam(September12,2009,Monday,7:30pm 9:00pm):
Coverage:firstfourlectures(Lecture14),Closedbooktest.
Extraofficehoursformidtermexam:
Instructor(Kim,Sujin):10September(Sat)10:00am 12:00pm
TA:10September(Sat)2:00pm4:00pm(EA0717),orbyappointment.
FinalExam(November29,2009,Tuesday,5:00pm):
ThefinalexamwillcoverALL subjectsandwillbeaclosedbooktest.
6
Thefieldof probabilityandstatisticsdealswiththecollection,presentation,
analysis,anduseofdatato
Makedecisions
Solveproblems
Designproductsandprocesses
St ochast ic (Probabilist ic) Met hod


7
I nvent ory cont rol and management
Goal:Maximizingtheexpectedprofit.
Decisions: Whentoplaceanorder.
Howmuchtoorder.
Decisionsinvolvingthesetwoissuesbecomecomplicatedwhendemand
isuncertain,andtheneedtotradeoffvariouscostsisconsidered.
8
1.BasicModel:aperiodicreview,singleproduct,singlelocation,
finitehorizonstochasticinventorymodelwithlostsalesand
zeroleadtimesMarkovChainModel
0
1
2
X
2
Observe demand D
1
Holding cost
Observe demand D
2
Holding cost
X
1
= unit to purchase
(fixed + ordering cost)
X
3
Observe inventory
level Y
1
Observe inventory
level Y
2
Observe inventory
level Y
0
9
(s,S)policyisoptimal
s
S
Y
n
: Inventory level
n
1
0
3
2 4
10
1.BasicModel
2.Aperiodicreview,severalproduct,severallocation,infinitehorizon
stochasticinventorymodelwithlostsalesandzeroleadtimes,discounted
cost:(s,S)policyisstilloptimal
3.Acontinuousreview,100,000products,1000locations,infinitehorizon
stochasticinventorymodelwithbackorderandnonzeroleadtime,
discountedcost,thecapacityofsystemisrandom.:Is(s,S)policystill
optimal?
What we will st udy in t his class
Inthefirstsixlectures,VERYBASICprobabilitytheorieswillbecovered(or
reviewed).
Theexampleproblemswillbeeitherabstractmathematicalproblemsor
verysimpleapplicationproblems.
Thenextsixlectureswillteachyoubasicmodelingskills.
Youmaybeabletoseehowtheprobabilitytheorycanbeappliedto
(simple)reallifeproblems.
Howtoidentifytheproperprobabilitymodelsanddeterminemodel
parametersshouldbediscussedinstatisticsclass.
11
Lect ure 1 (Monday, 15 August )
Ch1CombinatorialAnalysis
Ch2AxiomsofProbability
Ch3ConditionalProbabilityandIndependence
12
Example1(Ross,Ch2,Example5a): Rollingtwodies,whatisthe
probabilitythatthesumofthetwofacesisequalto7?
Example2(Ross,Ch2,Example5c): Acommitteeof5isselectedfroma
groupof5menand9women.Iftheselectionismaderandomly,whatis
theprobabilitythatthecommitteeconsistsof3menand2women?
Example3(Ross,Ch2,Example5i): Ifn peopleareinaroom,whatisthe
probabilitythatnotwoofthemcelebratetheirbirthdayonthesameday
oftheyear?
Howtocounttheoutcomesfromanexperiment?Ch1
Howtodeterminetheprobabilityofanevent?Ch2
13
Probabilit y Basics
Sample Spaces and Event s
Experiment: Anyprocesswhoseoutcomeisnotknowninadvance.
Ex)flipcoins,snowfallininchesduringwinterseason.
Samplespace(Sor):Thesetofallpossibleoutcomesofanexperiment.
Ex)Fliptwocoins:={HH,HT,TH,TT}(discrete)
Snowfall:=[0,1](continuous)
Event: Anysubsetofthesamplespace.
14
Set -Theory Review
Aset isacollectionofitems;eachsuchitemiscalledamemberoran
element oftheset.
IfasetAhasmembersx,y,andz,wecanwriteA={x,y,z}and,for
example, .
Thelargestsetistheuniverse oruniversalset,thesetcontainingall
relevantitems.
Thesmallestsetistheempty set(or,sometimes,thenullset),theset
containingnoitems;itisdenotedbyor,occasionally,by{}.
Thecardinalnumber ofasetA,denotedby|A| (or#(A)),isthenumber
ofmembersinA.AsetAisfinite ifisfinite;otherwiseAisinfinite.
15
.
Set -Theory Review
16
subset: A B intersection: A B =AB union: A B
Set -Theory Review
complement:A
c
difference :AB
17
Set -Theory Review
mutuallyexclusiveAandBpartitionofA:{A1,A2,A3,A4}
18
A1
A2
A3
A4
A
Set -Theory Review
DistributiveLaws: ForanysetsA,B,andC,
(A B)C=(AC) (BC)and
(AB) C=(A C)(B C).
DeMorgansLaws: ForanysetsAandB,
and
19
.
.
Mult iplicat ion Rule
SupposethatanexperimentE1 hasn1 outcomesandanexperimentE2 has
n2 possibleoutcomes.TheexperimentthatconsistsofperformingfirstE1
andthenE2 haspossibleoutcomes;thatis
(Example)Rollingtwodies.Thenumberofpossibleoutcomeis6*6=36.
20
Permut at ion
Supposethatn (ordered)positionsaretobefilledwithn different
elements.Thereare
n!=n(n 1)...(2)(1)
Forr n,ifr elementsareselectedfromasetofn differentelements,and
iftheorderofselectionisnoted,thenumberofpossibleordered
arrangementis
nPr =n (n 1)( n 2)...(n r+1)=n!/( n r)!.
Thisiscalledalengthr permutation ofn elements.
21
(Example)SamplingwithReplacementv.s.SamplingwithoutReplacement.
Youhaveasetofcardsnumberedfrom110.Youpicktwocardsandmakea
twodigitnumber.Countthenumberofoutcomes.
a)Withreplacementofthefirstcard.
b)Withoutreplacementofthefirstcard.
22
Combinat ion
Forr n,ifr elementsareselectedfromasetofn elements,andifthe
orderofselectiondoesnotmatter,thenumberofpossiblearrangementis
Thisiscalledalengthr combination ofn elements.
Note:nCr = nCnr .
Example:BinomialCoefficients
23
.
Example1(Ross,Ch2,Example5a): Rollingtwodies,whatisthe
probabilitythatthesumofthetwofacesisequalto7?
Example2(Ross,Ch2,Example5c): Acommitteeof5isselectedfroma
groupof5menand9women.Iftheselectionismaderandomly,whatis
theprobabilitythatthecommitteeconsistsof3menand2women?
24
Example1(Ross,Ch 2,Example5a): Rollingtwodies,whatisthe
probabilitythatthesumofthetwofacesisequalto7?
Solution:
|S|=36
|E|=|{(3,4),(4,3),(2,5),(5,2),(1,6),(6,2)}|=6
Example2(Ross,Ch 2,Example5c): Acommitteeof5isselectedfroma
groupof5menand9women.Iftheselectionismaderandomly,whatis
theprobabilitythatthecommitteeconsistsof3menand2women?
Solution:
|S|=14C5 and|E|=|M||F|=5C3*9C2.
Theprobabilityis|E|/|S|.
25
Example3(Ross,Ch2,Example5i): Ifn peopleareinaroom,whatisthe
probabilitythatnotwoofthemcelebratetheirbirthdayonthesameday
oftheyear?
26
Example3(Ross,Ch2,Example5i): Ifn peopleareinaroom,whatisthe
probabilitythatnotwoofthemcelebratetheirbirthdayonthesameday
oftheyear?
Solution
|S|=(365)
n
|E|=365Pn
Theprobabilityis|E|/|S|.
27
Axioms of Probabilit y
Theprobability ofaneventE,denotedbyP(E),isanumericalmeasureof
howlikelytheeventEistooccurwhentheexperimentisperformed.
Finitediscretesamplesapce:P(E)=|E|/|S|
AxiomsofProbability
Axiom1.P(S)=1.
Axiom2.ForeveryeventE,0P(E).
Axiom3.ForallmutuallyexclusiveeventsE1 andE2,
P(E1 E2)=P(E1)+P(E2).
28
Propert ies of Probabilit y
ForeveryeventE,P(E
C
)=1P(E).
IfE1 E2,thenP(E1)P(E2).
IfeventsE1,E2,...,En aremutuallyexclusive,then
ForanytwoeventsE1 andE2,P(E1 E2)=P(E1)+P(E2)P(E1 E2).
Moregenerally,foranythreeeventsE1,E2,andE3,
P(E1 E2 E3)=P(E1)+P(E2)+P(E3) P(E1 E2)P(E1E3)P(E2 E3)
+P(E1 E2 E3).
29
.
Condit ional Probabilit y
Thisisaversionoffamousgameshow.Therearethreedoors.Youknow
thatthereisaprizebehindoneofthem,andnothingisbehindtheother
two.Thegameshowhosttellsyouthatyoushallreceivewhateverisbehind
thedoorofyourchoice.However,beforeyouchoose,hepromisesthat
ratherthanimmediatelyopeningthedoorofyourchoicetorevealits
contents,hewillopenoneoftheothertwodoorstorevealthatitisempty.
Hewillthengiveyoutheoptiontoswitchyourchoice.
YouchooseDoor3.HeopensDoor2andrevealsthatitisempty.Younow
knowthattheprizeliesbehindeitherDoor3orDoor1.Shouldyouswitch
yourchoicetoDoor1?
30
Condit ional Probabilit y
Definition:TheconditionalprobabilityofaneventE1,giventhataneventB
hasoccurred,is
P(E1 |B)P(E1 B)/P(B)
IfP(B)=0,thenP(E1 |B)isundefined.
ThegiveneventBisassumedtohaveoccurred;thatis,theoutcomeis
inB.
ThegiveneventBbecomesthesamplespace.
P(E1)P(E1 |S)istheunconditionalormarginalprobabilityofE1 .
31
Condit ional Probabilit y
MultiplicationRule:ForanynonemptyeventsBandE1,
P(BE1)=P(B)P(E1 |B)=P(E1)P(B|E1).
BayesRule:ForanyeventsE1 andB, ifP(B)>0,then
LawofTotalProbability:ForanyeventsBandE1,
P(B)=P(BE1)+P(BE1
C
)=P(B|E1)P(E1)+P(B|E1
C
)P(E1
C
).
32
Condit ional Probabilit y
Moregenerally,ifeventsE1,E2,...,En partitionS,thenforanyeventB
Then
(Example)Supposethatwerollafoursideddiethenflipthatnumberof
coins.WhatistheprobabilitythatwewillgetexactlyoneHeads?
LetB =wegetexactlyoneHeadsandAi =aniappearsonthefirstroll.
33

34
Condit ional Probabilit y
Thisisaversionoffamousgameshow.Therearethreedoors.Youknow
thatthereisaprizebehindoneofthem,andnothingisbehindtheother
two.Thegameshowhosttellsyouthatyoushallreceivewhateverisbehind
thedoorofyourchoice.However,beforeyouchoose,hepromisesthat
ratherthanimmediatelyopeningthedoorofyourchoicetorevealits
contents,hewillopenoneoftheothertwodoorstorevealthatitisempty.
Hewillthengiveyoutheoptiontoswitchyourchoice.
YouchooseDoor3.HeopensDoor2andrevealsthatitisempty.Younow
knowthattheprizeliesbehindeitherDoor3orDoor1.Shouldyouswitch
yourchoicetoDoor1?
35
LetBk denotetheeventthattheprizeisbehindDoornumberk.
LetHj denotetheeventthatthehostopensDoornumberj.
36
Ans:Youshouldswitch!
LetBk denotetheeventthattheprizeisbehindDoornumberk.
LetHj denotetheeventthatthehostopensDoornumberj.
37
.
Independence
EventsAandBareindependent ifP(AB)=P(A)P(B).
Thefollowingfourstatementsareequivalent;thatis,eitherallarefalseor
allaretrue.
(1)EventsAandBareindependent.
(2)P(AB)=P(A)P(B)
(3)P(A|B)=P(A)
(4)P(B|A)=P(B)
38
Independence
Thefollowingfourstatementsareequivalent.
(1)EventsAandBareindependent.
(2)EventsA
C
andBareindependent.
(3)EventsAandB
C
areindependent.
(4)EventsA
C
andB
C
areindependent.
39
Independence
ExtendedMultiplicationRule:ForanynonemptyeventsA1,A2,...,An,
P(A1A2...An)
=P(A1)P(A2|A1)P(A3|A1A2)...P(An|A1...An1).
TheneventsA1,A2,...,Anare(jointly)independentifandonlyif
P(Ai1A2...Aik)=P(Ai1)P(Ai2)...P(Aik),
foreverysubsetAi1,Ai2,...,Aikofthenevents,fork=2,3,...,n.
Aweakerformofindependenceispairwiseindependence,whichrequires
onlythateverypairofeventsbeindependent.
40
Independence
Note:MutuallyExclusivevs.Independence
(Example)
RolltwodiceandletA =thefirstdieis4,B1=theseconddieis2andB2=
thesumoftwodiceis3.CheckifeventsA andB1andeventsA andB2are
independent.
41
Independence
Example:RolltwodiceandletA=thefirstdieis4,B1=theseconddieis2
andB2=thesumoftwodiceis3.CheckifeventsAandB1andeventsA
andB2areindependent.
P A B
1
= P 4,2 =
1
36
A and B
1
are not mutually exclusive.
P A P B
1
= P 4 P 2 =
1
6

1
6
= P A B
1
A and B
1
are independent.
P A B2 = P = u
A and B
2
are mutually exclusive.
P A P B2 = P 4 P 1,2 , 2,1 =
1
6

2
36
= u = P A B2
A and B
2
are note independent.
42
Example4(Ross,Ch3,Problems3.23):UrnI contains2whiteand4red
balls,whereasurnII contains1whiteballand1redball.Aballisrandomly
chosenfromurnI andputintournII,andaballisthenrandomlyselected
fromurnII.
a) WhatistheprobabilitythattheballselectedfromurnII iswhite?
b) Whatistheconditionalprobabilitythatthetransferredballwaswhite
giventhatawhiteballisselectedfromurnII?
43
44
A= A white ball is transferred from urn I to urn II
B= A white ball is chosen from urn II

45
Example5(Ross,Ch3,Example4f):Independenttrialsareperformed
continuously.Eachtrialresultsinasuccesswithprobabilityp andafailure
probability1p.
a) Whatistheprobabilitythatatleast1successoccursinthefirstn trials?
b) Whatistheprobabilitythatexactlyk successesoccursinthefirstn trials?
c) Whatistheprobabilitythatalltrialsresultsinsuccess?
46
Example5(Ross,Ch3,Example4f):
Solution:
(a) E
i
= failure on the ith trial.
Note that E
i
s are independent and P(E
i
) = 1-p, for all i.
P(at least 1 success)=1-P(no success)
= 1-P(E
1
E
2
E
n
) = 1-P(E
1
) P(E
2
) P(E
n
) =1- 1 - p
n
.
(b)
n
k
p
k
1 -p
n-k
.
(c) P lim
n
E
1
C
E
2
C
E
n
C
= lim
n
P E
1
C
E
2
C
E
n
c
= lim
n
P E
1
C
P E
2
C
P E
n
C
= lim
n
p
n
= _
u i p < 1
1 i p = 1
47
Pract ice Problems
Ch2Examples:5b,5d,5l.
Ch3Examples:2b,3a,3b,3c,4c,4g,5a.
48

Вам также может понравиться