2
OutlineOutline
conditional probability & Binomial
recursive relationships
examples of similar random phenomena
4
A former Mid-Term Question A former Mid-Term Question (Compared to (Compared to Example 3.4 in Ross ))
three types of cakes, chocolate, mango, and strawberry in a bakery
each customer choosing chocolate, mango, and strawberry w.p. 1/2, 1/3, and 1/6, respectively, independent of everything else
profit from each piece of chocolate, mango, and strawberry cake ~ $3, $2, and $1, respectively
4 cream cakes sold on a particular day (a). Let Xc be the number of chocolate cream cakes sold on
that day. Find the distribution of Xc. (b). Find the expected total profit of the day from the 4
cream cakes. (c). Given that no chocolate cream cake is sold on that day,
find the variance of the total profit of the day.
5
A former Mid-Term Question A former Mid-Term Question (Compared to Example 3.4 in Ross )(Compared to Example 3.4 in Ross )
(a). Xc = the number of chocolate cream cakes sold on that day
Xc ~ Bin(4, 1/2)
(b). E(total profit of the day)
= E(3Xc+ 2Xm + Xs)
= 3E(Xc) + 2E(Xm) + E(Xs)
= 6+(8/3)+(2/3) = 28/3.
6
A former Mid-Term Question A former Mid-Term Question (Compared to Example 3.4 in Ross )(Compared to Example 3.4 in Ross )
(c). Given that no chocolate cream cake is sold on that day, find the variance of the total profit of the day.
given Xc = 0, each cake is of mango of probability 2/3 and of strawberry of probability 1/3.
(Xm|Xc = 0) ~ Bin(4, 2/3) and (Xs|Xc = 0) ~ Bin(4, 1/3). V(Xm|Xc = 0) = V(Xs|Xc = 0) = 8/9 the total profit = (Y|Xc = 0) = 2(Xm|Xc = 0) + (Xs|Xc = 0)
(Xm|Xc = 0) + (Xs|Xc = 0) = 4
(Y|Xc = 0) = 4 + (Xm|Xc = 0) V(Y) = V(4+Xm|Xc = 0) = V(Xm|Xc = 0) = 8/9
8
Two Innocent EquationsTwo Innocent Equations
A and B : two events
P(A) = P(A|B)P(B) + P(A|Bc)P(Bc)
generalization: jBj = and BiBj = for i j
P(A) =
useful recursive equations finding probabilities and expectations by these equations
( | ) ( )j j jP A B P B
9
Recursive RelationshipRecursive Relationship
a special property in some random phenomena: changing back to oneself, or to something related
flipping a coin until getting the first head
flipping a coin until getting the first head
first flip = T
first flip = H
THE END
flipping a coin until getting the first head
one flip +
10
Recursive RelationshipRecursive Relationship
random phenomenon
type 1 outcome
simple type 1 problem.
...
type k outcome simple type
k problemtype k+1 outcome
difficult type k+1 problem
random phenomenon
type 1 outcome
simple type 1 analysis.
...
type k outcome simple type
k analysis
type k+1 outcome type k+1 problem
being related to the original random
phenomenon
the problem may become easy if the type k+1 problem is related to the original random
phenomenon
11
More Recursive RelationshipsMore Recursive Relationships
random phenomenon
A
type 1 outcome
simple type 1 problem
type 2 outcome
difficult problem related
to random phenomenon B
random phenomenon
B
type 1’ outcome
simple type 1’ problem
type 2’ outcome
difficult problem related
to random phenomenon A
12
About Recursive RelationshipsAbout Recursive Relationships
more forms, possibly involving more than 2 random phenomena
identifying the relationships among random phenomena being an art, not necessarily science
13
Examples of Recursive RelationshipsExamples of Recursive Relationships(The identification of a similar structure is an art.)(The identification of a similar structure is an art.)
14
Exercise 3.1.2 of NotesExercise 3.1.2 of Notes n contractors bidding for m projects (n m) one project for each contractor all projects being equally profitable random independent bids by contractors Ai = project i, i m, is bid (by at least one contractor) (a). Find (b). Find P(A1) (c). Find (d). Find P(A2| A1)
1( )cP A
2 1( | )cP A A
15
Exercise 3.1.2 of NotesExercise 3.1.2 of Notes
Ai = the project i, i m is bid (by at least one contractor)
(a).
(b). P( A1) =
(c).
(d). to find P(A2| A1), note that
1( )cP A
random bids by n contractors on m projects (n m),
one project for each contractor
11 ( )cP A
2 1( | )cP A A
(none of the contractors bids on project 1)P n1(1 )nm
=
2 11 ( | )c cP A A 11
1 (1 )nm
2 2 1 1 2 1 1( ) ( | ) ( ) ( | ) ( )c cP A P A A P A P A A P A
16
EE((XX) = ) = EE[[EE((XX||YY)])]
.
suppose that By = {Y = y}
.
define indicator variable
E(1A) = P(A)
( ) ( | ) ( )y y yP A P A B P B
( | ) ( )( )
( | ) ( )
y
Y
P A Y y P Y yP A
P A Y y f y dy
1, if occurs,
10, . .A
A
o w
17
EE((XX) = ) = EE[[EE((XX||YY)])]( | ) ( )
( )( | ) ( )
y
Y
P A Y y P Y yP A
P A Y y f y dy
let X = 1A
.
the expressions being true in general E(X) = E[E(X|Y)]
P(A) = E[P(A|Y)]
( | ) ( )( )
( | ) ( )
y
Y
E X Y y P Y yE X
E X Y y f y dy
18
EE((XX) = ) = EE[[EE((XX||YY)] )]
discrete X and Y
E(X|Y = y) = x xP(X = x|Y = y)
E[E(X|Y)] = y E(X|Y = y)P(Y = y)
( , )
( )xxP X x Y y
P Y y
( , )( )
( )y xxP X x Y y
P Y yP Y y
( , )y x xP X x Y y
( , )x y xP X x Y y ( )x xP X x ( )E X
19
c.f. c.f. Example 3.11 of Ross(Expectation of a Random Sum)(Expectation of a Random Sum)
a tailor-shop equally likely to sell 0, 1, or 2 suits per day
net profit from a sold suit $300 to $800 dollars
customer arrivals and prices all being independent
mean profit per day = ? P(net profit in a day 7) = ?
20
c.f. Example 3.11 of Rossc.f. Example 3.11 of Ross(Expectation of a Random Sum)(Expectation of a Random Sum)
N = number of suits sold in a day equally likely to be 0, 1, 2
Xj = profit from the jth sold suit, j = 1, 2, 3
uniform 3 to 8 (hundreds)
all random variables being independent with each other
S = total profit in a day, 1
N
jj
S X
21
c.f. Example 3.11 of Rossc.f. Example 3.11 of Ross(Expectation of a Random Sum)(Expectation of a Random Sum)
.
hard to find E(S) from the distribution of S
finding E(S) without using its distribution
1
N
jj
S X
1 1( ) ( ) |
N N
j jj j
E S E X E E X N
1| 0 0
N
jj
E X N
1
1| 1 ( ) 5.5
N
jj
E X N E X
1 21
| 2 ( ) 11N
jj
E X N E X X
22
c.f. Example 3.11 of Rossc.f. Example 3.11 of Ross(Expectation of a Random Sum)(Expectation of a Random Sum)
E(S) = (0+5.5+11)/3 = 5.5
another way
( ) [ ( | )] [5.5 ] 5.5 ( ) 5.5E S E E S N E N E N
1 1| ( ) 5.5
N n
j j jj j
E X N n E X nE X n
23
c.f. Example 3.11 of Rossc.f. Example 3.11 of Ross(Expectation of a Random Sum)(Expectation of a Random Sum)
to find P(S > 7)
P(S > 7) = E[P(S > 7|N)]
( 7 | 0) 0P S N 1
1 5( 7 | 1) ( 7)P S N P X
491 2 50
( 7 | 2) ( 7)P S N P X X
4
4
49 591 1 1 13 3 5 3 50 150
( 7) [ ( 7 | )] (0)P S E P S N
3
8
3 8
24
Example 3.12 of Ross Example 3.12 of Ross
X ~ geo (p)
E(X) = E(X|X=1)P(X=1) + E(X|X>1)P(X>1)
E(X|X = 1) = 1
E(X|X > 1) = 1 + E(X)
E(X) = (1)p + (1 + E(X))(1p), i.e. E(X) = 1/p
flipping a coin until getting the first head
first flip = T
first flip = H
THE END
flipping a coin until getting the first head
one flip
+
25
Example 3.4.3 of NotesExample 3.4.3 of Notes
find E(X) for X = max{Y, Z}, where Y & Z ~ i.i.d. unif[0,1]
E(X) = E[E(X|Y)]
21122
( | )] [max( , )] yyE X Y y E y Z y zdz
21 22 3
( ) [ ( | )] ( )YE X E E X Y E
( | ) ( )( )
( | ) ( )
y
Y
E X Y y P Y yE X
E X Y y f y dy
26
Example 3.13 of RossExample 3.13 of Ross
A miner is trapped in a mine containing three doors. The first door leads to a tunnel that takes him to safety after two hours of travel. The second door leads to a tunnel that returns him to the mine after three hours of travel. The third door leads to a tunnel that returns him to his mine after five hours. Assuming that the miner is at all times equally likely to choose any one of the doors, what is the expected length of time until the miner reaches safety?
27
Example 3.13 of RossExample 3.13 of Ross
every time equally likely to choose one of the three doors 2 hr
3 hr5 hr
X = time taken
Y = door initially chosen
E[X|Y = 1] = 2
E[X|Y = 2] = 3 + E[X]
E[X|Y = 3] = 5 + E[X]
E[X] = (2+3 +E[X]+5+E[X])/3 E[X] = 10
28
Example 3.13 of RossExample 3.13 of Ross
29
Example 3.5.4 of NotesExample 3.5.4 of Notes Comparing Two Exp Random Variables Comparing Two Exp Random Variables
X ~ exp() and Y ~ exp(), independent
P(X > Y) = E[P(X > Y|Y)]
P(X > Y|Y = y) = P(X > y) = ey
P(X > Y) = E[P(X > Y|Y)] = E[eY]
= = 0y ye e dy
30
Example 3.5.3 of NotesExample 3.5.3 of Notes Random Partition of Poisson Random Partition of Poisson
Z ~ Poisson() each item being type 1 w.p. p, 0 < p < 1, and
type 2 o.w., independent of everything else X = number of type 1 items in Z P(X = k) = E[P(X = k|Z)] = ( | ) ( )
m kP X k Z m P Z m
!(1 )
!( )! !
mk m k
m k
m ep p
k m k m
(1 )
! ( )!
k mm k
m k
e pp
k m k
0
( )(1 )
! !
k nn
n k
e pp
k n
(1 )( )
!
kpe p
ek
( )
!
p ke p
k
31
Ex. #4 of WS#10Ex. #4 of WS#10
#1. (Solve Exercise #4 of Worksheet #10 by conditioning, not direct computation.) Let X and Y be two independent random variables ~ geo(p).
(a). Find P(X = Y). (b). Find P(X > Y). (c). Find P(min(X, Y) > k) for k {1, 2, …}. (d). From (c) or otherwise, Find E[min(X, Y)]. (e). Show that max(X, Y) + min(X, Y) = X + Y.
Hence find E[max(X, Y)].
32
Ex. #4 of WS#10Ex. #4 of WS#10
(a). different ways to solve the problem
by computation:
P(X = Y) = =
= =
= p/(2-p)
1( )
kP X Y k
1( , )
kP X k Y k
1( ) ( )
kP X k P Y k
1 1
1(1 ) (1 )k k
kp p p p
33
Ex. #4 of WS#10Ex. #4 of WS#10
by conditioning:
P(X = Y|X = 1, Y = 1) = 1
P(X = Y|X = 1, Y > 1) = 0
P(X = Y|X > 1, Y = 1) = 0
P(X = Y|X > 1, Y > 1) = P(X = Y)
P(X = Y) = P(X = 1, Y = 1)(1) + P(X > 1, Y > 1)P(X = Y)
P(X = Y) = p2 + (1p)2 P(X = Y)
i.e., P(X = Y) = p/(2p)
34
Ex. #4 of WS#10Ex. #4 of WS#10
(b) P(X > Y)
by symmetry
P(X > Y) + P(X = Y) + P(X < Y) = 1
P(X > Y) = P(X < Y)
P(X > Y) = =1 ( )
2
P X Y 1
2
p
p
35
Ex. #4 of WS#10Ex. #4 of WS#10
by direct computation
P(X > Y) = 1
2 1( , )
i
i jP X i Y j
1
2 1( ) ( )
i
i jP X i P Y j
1 1 1
2 1(1 ) (1 )
i i j
i jp p p p
12 1 1
2 1(1 ) (1 )
ii j
i jp p p
12 1
2
1 (1 )(1 )
ii
i
pp p
p
1 2 2
2(1 ) (1 )i i
ip p p
2
2
1 (1 )
(1 ) 1 (1 )
p pp
p p
1
2
p
p
36
Ex. #4 of WS#10Ex. #4 of WS#10
by conditioning
P(X > Y) = E[P(X > Y|Y)]
P(X > Y|Y = y) = P(X > y) = (1-p)y
E[P(X > Y|Y)] = E[(1-p)Y] 1
1(1 ) (1 )y y
yp p p p
2
(1 )
1 (1 )
p p
p
1
2
p
p
37
Ex. #4 of WS#10Ex. #4 of WS#10 yet another way of conditioning
P(X > Y|X = 1, Y = 1) = 0 P(X > Y|X = 1, Y > 1) = 0 P(X > Y|X > 1, Y = 1) = 1 P(X > Y|X > 1, Y > 1) = P(X > Y)
P(X > Y)
= P(X > 1, Y = 1) + P(X > 1, Y > 1)P(X > Y)
= (1-p)p + (1-p)2P(X > Y) P(X > Y) = (1p)/(2p)
38
Ex. #5 of WS#10Ex. #5 of WS#10
In the sea battle of Cape of No Return, two cruisers of country Landpower (unluckily) ran into two battleships of country Seapower. With artilleries of shorter range, the two cruisers had no choice other than receiving rounds of bombardment by the two battleships. Suppose that in each round of bombardment, a battleship only aimed at one cruiser, and it sank the cruiser with probability p in a round, 0 < p < 1, independent of everything else. The two battleships fired simultaneously in each round.
39
Ex. #5 of WS#10Ex. #5 of WS#10
(b) Now suppose that initially the two battleships aimed at a different cruiser. They helped the other battleship only if its targeted cruiser was sunk before the other one.
(i) What is the probability that the two cruisers were sunk at the same time (with the same number of rounds of bombardment).
40
Ex. #5 of WS#10Ex. #5 of WS#10
(b). (i). Let Ni be the number of rounds taken to sink the ith cruiser. Ni ~ Geo (p); N1 and N2 are independent.
ps = P(2 cruisers sunk at the same round) = P(N1 = N2)
discussed before
41
Stochastic ModelingStochastic Modeling
given a problem statement formulate the problem by
defining events, random variables, etc.
understand the stochastic mechanism
deduce means (including probabilities, variances, etc.) identifying special structure and
properties of the stochastic mechanism
In the sea battle of Cape of No Return, two cruisers of country Landpower (unluckily) ran into two battleships of country Seapower. With artilleries of shorter range, the two cruisers had no choice other than receiving rounds of bombardment by the two battleships. Suppose that in each round of bombardment, a battleship only aimed at one cruiser, and it sank the cruiser with probability p in a round, 0 < p < 1, independent of everything else. The two battleships fired simultaneously in each round.
(b) Now suppose that initially the two battleships aimed at a different cruiser. They helped the other battleship only if its targeted cruiser was sunk before the other one.
(i) What is the probability that the two cruisers were sunk at the same time (with the same number of rounds of bombardment).
42
Examples of Ross in Chapter 3Examples of Ross in Chapter 3
Examples 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.11, 2.12, 3.13
Top Related