page 3.7 Conditional Pobabiliity.7. Definition Let the event B F be such that P(B) > 0. Fo any event A F the conditional pobability of A given that B has occued, denoted by P(A B), is defined as P(A B) P(A B), (P(B) > 0) (.24) P(B) (note that P(B B) as it should). We ead P(A B) as the pobability of A given B o the pobability of A conditioned on B. Theoem If B F has P(B) > 0, and Q(A) P(A B), then (S, F, Q) is a pobability space. Poof We have that (i) Q(A) 0 fo all A F (fom (.24) and pobability axiom (a)). (ii) Q(S) P(S B)/P(B) P(B)/P(B). (iii) If A, A 2,... ae mutually exclusive events in F, so ae A B, A 2 B,.. : then Q( i A i ) i P(B) P(( A i ) B) by definition of Q i P(B) P( (A i B)) using distibutive law (.6) i P(A i B) by pobability axiom (.0) P(B) i Q(A i ). Thus Q satisfies the thee pobability axioms and (S, F, Q) is a pobability space. It follows that all the esults fo P(A) cay ove to P(A B): e.g. P(A B C) P(A C) + P(B C) P(A B C). We often think of the conditioning event C as a educed sample space..7.2 Multiplication Rule It follows fom the definition (.24) that, povided all stated conditioning events have positive pobability, P(A B) P(A B).P(B) P(B A).P(A) (.25) and moe geneally, by epeated application of this esult, that P(A A 2... A n ) P(A ).P(A 2 A ).P(A 3 A A 2 )...P(A n A A 2... A n ). (.26) (In fact, since A A A 2... A A 2... A n, it is sufficient, in view of (.3), to equie that this last event have positive pobability.)
page 4.7.3 Law of Total Pobability and Bayes Theoem Let H, H 2,..., H n F be a set of mutually exclusive and exhaustive events (i.e. a patition of the sample space S): thus n H j S and H i H j, i j. Suppose also that they ae all j possible events, i.e. P(H j ) > 0 fo j,..., n. Then fo any event A F ( ( )) n P(A) P(A S) P A H j ( j ) n P (A H j ) by (.6),{A H j } m.e. j n P(A H j ) by (.0). j Invoking (.25), this becomes n P(A) P(A H j )P(H j ). (.27) j This is the law of total pobability (also known as the completeness theoem o patition ule): it is of geat impotance in poviding the basis fo the solution of many poblems by conditioning. Futhemoe, fo any event A with P(A) > 0, we have (using (.24), (.25) and (.27)) P(H k A) P(H k A) P(A) P(A H k)p(h k ). (.28) n P(A H j )P(H j ) j This is the famous Bayes Rule..7.4 Independence Two events A, B F ae said to be independent if and only if Theoem If A and B( F) ae independent events, then P(A B) P(A).P(B). (.29) P(A B) P(A) if P(B) > 0, P(B A) P(B) if P(A) > 0; A and B ae independent events, A and B ae independent events, A and B ae independent events. Poof To pove the fist esult: P(A B) P(A B) P(B) P(A).P(B) P(B) P(A). if P(B) > 0 [(.24)] since A, B ae independent [by (.29)] The second esult is poved similaly.
page 5 To pove the thid esult, we obseve that A (A B) (A B) the union of two mutually exclusive events. So P(A) P(A B) + P(A B) P(A).P(B) + P(A B) by (.29) Hence P(A B) P(A) P(A).P(B) P(A).P(B) by (.2). So A and B ae independent events. The fouth and fifth esults ae poved similaly. Moe geneally, the events A, A 2,..., A n ae said to be mutually independent o completely independent if and only if P(A i A j ) P(A i ).P(A j ), i j, P(A i A j A k ) P(A i ).P(A j ).P(A k ), i j k,... P(A A 2... A n ) P(A ).P(A 2 )...P(A n ). (.30) Hence paiwise independence does not imply complete independence..8 Examples Many pobability examples involving events occuing at specified times o tials can be solved by means of the multiplication ule fo conditional o independent events, defining A i to be the elevant event at time o tial i. Example.6 Polya s un scheme. [The following model was poposed fo the desciption of contagious phenomena whee the occuence of an event inceases its pobability of occuence in the futue.] An un initially contains ed balls and b black balls. A ball is dawn at andom and eplaced togethe with c balls of its own colou. This pocedue is epeated many times. What is the pobability that a ed ball is obtained on the i th daw? Solution Intoduce the events R i : ed ball obtained on the i th daw. B i : black ball obtained on i th daw. The tee diagam below shows the possibilities on the fist few daws. R 2 ( + 2c) + (b) R ( + c) + (b) B 2 ( + c) + (b + c) () + (b) etc. B ( + c) + (b + c) R 2 () + (b + c) B 2 () + (b + 2c) DRAW 2 3
page 6 On the fist daw, On the second daw: P(R ) + b, P(B ) b Hence On the thid daw, we have: Now and P(R 2 ) P((R R 2 ) (B R 2 )) P(R R 2 ) + P(B R 2 ) (m.e.) P(R 2 R )P(R ) + P(R 2 B )P(B ) + c + c + b. + b + + c + b. b + b P(B 2 ) b P(R 3 ) P(R R 2 R 3 ) + P(R B 2 R 3 ) +P(B R 2 R 3 ) + P(B B 2 R 3 ) P(R 3 R R 2 )P(R R 2 ) + P(R 3 R B 2 )P(R B 2 ) +P(R 3 B R 2 )P(B R 2 ) + P(R 3 B B 2 )P(B B 2 ) fom which we deduce that and hence that P(R 3 R R 2 ) + 2c + 2c + b, etc. P(R R 2 ) P(R 2 R )P(R ) + c + c + b. + b, This natually leads us to the conjectue: P(R i ) P(R 3 ) P(B 3 ) + b + b b fo i, 2, 3,...? This can be poved by induction, as follows. It has aleady been shown to be tue fo i, 2, 3. Suppose it is tue fo i n. Then P(R n+ ) P(R n+ R )P(R ) + P(R n+ B )P(B ). Now clealy R n+ given R is equivalent to stating with ( + c) ed balls and b black balls and obtaining a ed on the nth daw, and fom the above supposition it follows that etc. Similaly So P(R n+ R ) P(R n+ B ) + c + c + b. + c + b. P(R n+ ) + c + c + b. + b + + c + b. b + b Hence, by induction, the conjectue is poved.
page 7 Notes: (i) Pobabilities such as P(R R 2 ), P(R 2 R ), P(R R 2 R 3 ), P(R 3 R 2 ) etc. can be calculated using the standad esults and by enumeating the outcomes at daws, 2, 3 etc. (ii) This appoach cannot be used fo the calculation of othe pobabilities afte n daws, when n is not small. One appoach is to use ecuence elations an appoach which is taken up in the next section. Example.7 The Lift Poblem A simple fom of this poblem is as follows: A lift has thee occupants A, B and C, and thee ae thee possible floos (, 2 and 3) at which they can get out. Assuming that each peson acts independently of the othes and that each peson is equally likely to get out at each floo, calculate the pobability that exactly one peson will get out at each floo. Solution We use a sequential appoach. Let F i : one peson gets off at floo i. A i : A gets off at floo i (events B i and C i ae defined similaly). Then the equied pobability is Now P(F F 2 F 3 ) P(F )P(F 2 F )P(F 3 F F 2 ) by (.26). P(F ) P((A B C ) (A B C ) (A B C )) 3.( 3 )( 2 3 )2 4 9 (invoking independence and (.30)) P(F 2 F ) 2.( 2 )( 2 ) 2 (by simila agument) P(F 3 F F 2 ) So the equied pobability is 4 9. 2. 2 9. Let s conside the genealisation of this poblem to n pesons and n floos. Let p n denote the pobability that exactly one peson gets off at each floo. We have p n P(F F 2 F n ) P(F 2 F 3 F n F )P(F ) by (.25) ( ) ( ) } n n p n {n.. n n ( ) n n p n, n >. n (The cucial step hee is the ecognition that, in view of the independence assumption, the conditional pobability is identical to p n ). We note that p. The ecuence fomula is easily solved: ( ) n n p n p n ( n ) n n ( ) n 2 n 2 p n 2 n n In paticula p 3 3! 3 3 2 9... ( ) n n ( ) n 2 n 2... n n (n )! n n n! n n, n. ( ) p 2 in ageement with ou moe esticted discussion at the stat.
page 8.9 Conditioning and Recuence Relations The agument at the end of Example.6 involved conditioning on the esult of the fist daw, and then ecognising the elationship between the conditional pobabilities involved and the pobability unde discussion. Hee is anothe example of this kind of agument. Example.8 A andom expeiment has thee outcomes, A, B and C, with pobabilities p A, p B and p C espectively, whee p C p A p B. What is the pobability that, in independent pefomances of the expeiment, A will occu befoe B? Solution (by decomposition into the union of m.e. events). The event D : A occus befoe B can occu in any of the following mutually exclusive ways: A, CA, CCA, CCCA,... pobability is So its P(D) p A + p C.p A + p 2 C.p A +... p A ( + p C + p 2 C +...) p A /( p C ) p A. p A + p B Solution 2 (by conditioning). Condition on the esult of the fist tial (A, B o C ). Thus Now while P(D) P(D A )P(A ) + P(D B )P(B ) + P(D C )P(C ) P(D A )p A + P(D B )p B + P(D C )p C P(D A ) ; P(D B ) 0 (obviously) P(D C ) P(D), since in this case the poblem afte the fist tial is exactly as at the stat (in view of the independence of the tials). So we have which solves to give as befoe. P(D) p A + p C.P(D) P(D) p A p C p A p A + p B [Thee is a simple thid method of solving the poblem. Conside the citical tial at which the sequence of tials ends with eithe A o B. Then P(A A B) P(A (A B)) P(A B) p A p A + p B as befoe.] Now we extend this idea to situations whee the desied pobability has an associated paamete, and conditioning leads to a ecuence fomula.
page 9 Example.9 In a seies of independent games, a playe has pobabilities 3, 5 2 and 4 of scoing 0, and 2 points espectively in each game. The scoes ae added; the seies teminates when the playe scoes 0 in a game. Obtain a ecuence elation fo p n, the pobability that the playe obtains a final scoe of n points. Solution We have hee a discete but infinite sample space: an outcome is a sequence of s and/o 2 s ending with a 0, o just 0 on the fist game. Clealy p 0 3 p 5 2 3 5 36. Conditioning on the esult of the fist game, we have (fo n 2) p n P(n points in total) P(n points in total on fist game)p( on fist game) +P(n points in total 2 on fist game)p(2 on fist game) 5 2 p n + 4 p n 2, n 2. (Again, the independence assumption is essential when we come to e-intepet the conditional pobabilities in tems of p n and p n 2.) To get an expession fo p n, this has to be solved subject to the conditions p 0 3, p 5 36. The esult (eithe fom the theoy of diffeence equations o by induction) is p n 3 3 ( 3 4 ) n + 4 ( n, n 0. 39 3) A diagam such as that given below is often helpful in witing down the ecuence fomula equied. 5/2 p n total of n /4 2 p n 2 Fist game Subsequent games
page 20 Finally, we etun to a poblem consideed ealie, and solve it by means of a ecuence fomula. Example.0 The Matching Poblem (Revisited) Fo a desciption of the poblem, see.5. above. Let B : no matches occu. A : thee is a match in position Let p n denote the pobability of no matches occuing when n numbeed cads ae andomly distibuted ove n similaly numbeed positions. Then conditioning on what happens in the fist position, we have Now clealy P(B A ) 0, so p n P(B) P(B A )P(A ) + P(B A )P(A ). p n P(B A ). n n The pobability P(B A ) is the pobability that no matches occu when (n ) cads (numbeed 2 to n but with k, say, missing and eplaced by ) ae andomly distibuted ove positions 2 to n. This can happen in two mutually exclusive ways: (i) cad falls on a position othe than k, and none of the othe cads make a match; (ii) cad falls on position k, and none of the othe cads make a match. We deduce that P(B A ) p n + n p n 2 (the fist tem being deived by tempoaily egading position k as being the matching position fo cad ). Hence we obtain the ecuence elation i.e. Now it is eadily seen that p n n n p n + n p n 2 p n p n n (p n p n 2 ). p 0; p 2 2, so by epeated application of the ecuence elation we get and moe geneally p 3 p 2 (p 2 p ) 3 3! p 4 p 3 (p 3 p 2 ) 4 4! o p 2 2! 3! o p 3 2! 3! + 4! p n 2! 3! + 4! + ( )n n! the esult obtained peviously.
page 2.0 Futhe Examples Example. The Monty Hall Poblem A game show contestant is shown 3 doos, one of which conceals a valuable pize, while the othe 2 ae empty. The contestant is allowed to choose one doo (note that, egadless of the choice made, at least one of the emaining doos is empty). The show host (who knows whee the pize is) opens one of the emaining doos to show it empty (it is assumed that if the host has a choice of doos, he selects at andom). The contestant is now given the oppotunity to switch doos. Should the contestant switch? Solution Numbe the contestant s chosen doo, and the othe doos 2 and 3. Let A i : the pize is behind doo i(i, 2, 3) D : doo 2 opened by host. We assume P(A ) P(A 2 ) P(A 3 ) 3. Then Then by Bayes Rule (.28): P(D A ) 2, P(D A 2) 0, P(D A 3 ). P(A 3 D) 3 3 2 + 3 0 + 3 2 3. So the contestant should switch and will gain the pize with pobability 2 3. (Comment: This poblem is called afte the host in a US quiz show, and has given ise to consideable debate. The point which is often ovelooked is that the host sometimes has the choice of two doos and sometimes one.) Example.2 Successive Heads A biased coin is such that the pobability of getting a head in a single toss is p. Let v n be the pobability that two successive heads ae not obtained in n tosses of the coin. Obtain a ecuence fomula fo v n and veify that, in the case whee p 2 3, v n 2 ( ) 2 n+ ( + n+. 3 3) Solution Conditioning on the esult of the fist toss, we have (in an obvious notation) v n P(no pais in n tosses) P(no pais in n tosses H )P(H ) + P(no pais in n tosses T )P(T ) pp(tail followed by no pais (in n 2 tosses)) + ( p)p(no pais in n tosses) p( p)v n 2 + ( p)v n n 2 We note that v 0 v. When p 2 3 : v n 2 9 v n 2 + 3 v n, n 2. The given esult may be poved by induction (o obtained diectly fom the theoy of diffeence equations).