Example_class_2_slides

Example_class_2_slides - Example class 2 STAT1301...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Example class 2 STAT1301 Probability and Statistics I Chan Chi Ho, Chan Tsz Hin & Shi Yun September 22, 2011 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Review: Set Theory and Mathematical Theory of Probability De Morgan’s law n n Ei c Eic , = i =1 i =1 c n Ei i =1 n Eic , = i =1 where n can also be ∞. Language of Probability 1 Mutually exclusive A1 , A2 , · · · , An are mutually exclusive if Ai ∩ Aj = φ for all i=j. 2 Exhaustive 3 Partition A1 , A2 , · · · , An is called a partition if the events are mutually exclusive and exhaustive. 4 Complement The complement of event A is the collection of outcomes not in A, i.e. Ac = Ω\A A1 , A2 , · · · , An are exhaustive if A1 ∪ A2 ∪ · · · ∪ An = Ω. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Review: Set Theory and Mathematical Theory of Probability Kolmogorov’s Axiom 1 2 3 P (A) ≥ 0 for any event A P (Ω) = 1 For any sequence of mutually exclusive events A1 , A2 , ..., ∞ P ∞ Ai = ∑ P (Ai ) (Countable additivity) i =1 i =1 Mnemonic trick: length of the union of disjoint segments is equal to the sum of their individual lengths. Inclusion-Exclusion Principle n P (A1 ∪ · · · ∪ An ) = ∑ P (Ai ) − ∑ i =1 P (Ai1 ∩ Ai2 ) + · · · i1 <i2 +(−1)n−1 ∑ P (Ai1 ∩ Ai2 ∩ · · · ∩ Ain ) i1 <i2 <···<in n = ∑ (−1)j −1 j =1 where n can also be ∞. Chan Chi Ho, Chan Tsz Hin & Shi Yun ∑ P (Ai1 ∩ Ai2 ∩ · · · ∩ Aij ) i1 <i2 <···<ij Example class 2 Review Definition of conditional probability For any two events A and B , the conditional probability of A given the occurrence of B is written as P (A|B ) and is defined as P (A|B ) = P (A ∩ B ) P (B ) provided that P (B ) > 0. Multiplication theorem 1 For any two events A and B with P (B ) > 0, P (A ∩ B ) = P (B )P (A|B ). 2 For any three events A, B , C with P (B ∩ C ) > 0, P (A ∩ B ∩ C ) = P (C )P (B |C )P (A|B ∩ C ). Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Review Independence 1 Two events A and B are called independent if and only if P (A ∩ B ) = P (A)P (B ). If P (A) > 0,then A and B are independent if P (B |A) = P (B ). 2 The events A1 , A2 , · · ·, Ak are (mutually) independent if and only if the probability of the intersection of any combination of them is equal to the product of the probabilities of the corresponding single events. For example, A1 , A2 , A3 are independent if and only if P (A1 ∩ A2 ) = P (A1 )P (A2 ) P (A1 ∩ A3 ) = P (A1 )P (A3 ) P (A2 ∩ A3 ) = P (A2 )P (A3 ) Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 1 Problem 1 If P (A) = 0.5, P (B ) = 0.3, P (A ∩ B ) = 0.1, find 1 P (Ac ) 2 P (A ∪ B ) 3 P (A\B ) 4 P (Ac ∩ B c ) 5 P (Ac ∪ B c ) Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Solution to Problem 1 Solution 1 P (Ac ) = 1 − 0.5 = 0.5 2 P (A ∪ B ) 4 5 P (A) + P (B ) − P (A ∩ B ) = 3 = 0.5 + 0.3 − 0.1 = 0.7 Note that P (A\B ) = P (A ∩ B c ), and P (A ∩ B ) + P (A ∩ B c ) = P (A) P (A ∩ B c ) = 0.5 − 0.1 = 0.4 By De Morgan’s Law, Ac ∩ B c = (A ∪ B )c P (Ac ∩ B c ) = 1 − P (A ∪ B ) = 1 − 0.7 = 0.3 By De Morgan’s Law, Ac ∪ B c = (A ∩ B )c P (Ac ∪ B c ) = 1 − P (A ∩ B ) = 1 − 0.1 = 0.9 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 2 Problem 2 A and B are two events. Suppose that P (A|B ) = 0.6, P (B |A) = 0.3 and P (A ∪ B ) = 0.72. LetP (A) = a. 1 Express P (A ∩ B ) and P (B ) in terms of a. 2 Using the results of (a), or otherwise, find the value of a. 3 Are A and B independent events? Explain your answer briefly. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Solution to Problem 2 Solution: 1 P (A ∩ B ) = P (B |A)P (A) = 0.3a P (A|B )P (B ) = P (A ∩ B ) 0.6P (B ) = 0.3a P (B ) = 0.5a 2 P (A ∪ B ) = P (A) + P (B ) − P (A ∩ B ) 0.72 = a + 0.5a − 0.3a a = 0.6 3 P (A|B ) = 0.6 = P (A) and P (B |A) = 0.3 = 0.5 × 0.6 = P (B ) therefore A and B are independent events. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 3 Problem 3 A and B are two events. Suppose that P (B c |A) = 3 , P (Ac |B ) = 3 and 4 5 2 P (Ac ) = 5 , where Ac and B c are complementary events of A and B respectively. Let P (B ) = p , where 0 < p < 1. 1 Find P (A ∩ B c ). 2 Express P (Ac ∩ B ) in terms of p . 3 Using the fact that Ac ∪ B is the complementary event of A ∩ B c , or otherwise, find the value of p . 4 Are A and B mutually exclusive? Explain your answer. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Solution to Problem 3 Solution: 1 P (A ∩ B c ) = P (B c |A)P (A) = P (B c |A)[1 − P (Ac )] = 2 P (Ac ∩ B ) = P (Ac |B )P (B ) = Chan Chi Ho, Chan Tsz Hin & Shi Yun 3 p 5 Example class 2 2 9 3 [1 − ] = 4 5 20 3. P (Ac ∪ B ) = 1 − P (A ∩ B c ) P (Ac ) + P (B ) − P (Ac ∩ B ) 3 2 +p− p 5 5 2 p 5 = p = 1 − P (A ∩ B c ) 9 1− 20 3 20 3 8 = = 4. P (A ∩ B ) + P (Ac ∩ B ) 33 P (A ∩ B ) + × 58 = P (A ∩ B ) = = P (B ) 3 8 3 =0 20 therefore A and B are not mutually exclusive. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 4 Problem 4 1 Say that C1 , C2 , · · ·, Ck are (mutually) independent events that have respective probabilities p1 , p2 , · · ·, pk . Argue that the probability of at least one of C1 , C2 , · · ·, Ck happens is equal to 1 − (1 − p1 )(1 − p2 ) · · · (1 − pk ) c c c HINT:(C1 ∪ C2 ∪ · · · ∪ Ck )c = C1 ∩ C2 ∩ · · · ∩ Ck 2 Let C1 , C2 , C3 be independent events with probabilities respectively. Compute 1 2 P (C1 ∪ C2 ∪ C3 ) c c P [(C1 ∩ C2 ) ∪ C3 ] Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 111 2, 3, 4, Solution to Problem 4 Solution: 1 We first consider C1 and C2 , if the probability of at least one of them happens is P (C1 ∪ C2 ). c c P (C1 ∪ C2 ) = 1 − P ((C1 ∪ C2 )c ) = 1 − P (C1 ∩ C2 ) Since C1 and C2 are independent,P(C1 ∩ C2 ) = P (C1 )P (C2 ). And since P (C1 ∪ C2 ) = P (C1 ) + P (C2 ) − P (C1 ∩ C2 ),then we get c c P (C1 ∩ C2 ) = P ((C1 ∪ C2 )c ) = 1 − P (C1 ∪ C2 ) = 1 − P (C1 ) − P (C2 ) + P (C1 ∩ C2 ) = 1 − P (C1 ) − P (C2 ) + P (C1 )P (C2 ) = (1 − P (C1 ))(1 − P (C2 )) = c c P (C1 )P (C2 ) c c Therefore C1 and C2 are independent. Then we can calculate c c P (C1 ∪ C2 ) = 1 − P (C1 )P (C2 ) = 1 − (1 − p1 )(1 − p2 ) Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Based on mathematical induction we can get similar result, which is that c c c C1 , C2 , · · ·, Ck are independent, c c c c c c P (C1 ∩ C2 ∩ · · · ∩ Ck ) = P (C1 )P (C2 ) · · · P (Ck ). Therefore the probability of at least one of C1 , C2 , · · ·, Ck happens is P (C1 ∪ C2 ∪ · · · ∪ Ck ), which is equal to = 1 − P [(C1 ∪ C2 ∪ · · · ∪ Ck )c ] = c c c 1 − P (C1 ∩ C2 ∩ · · · ∩ Ck ) = c c c 1 − P (C1 )P (C2 ) · · · P (Ck ) = P (C1 ∪ C2 ∪ · · · ∪ Ck ) 1 − (1 − p1 )(1 − p2 ) · · · (1 − pk ) 2. (a) P (C1 ∪ C2 ∪ C3 ) = 1 − (1 − P (C1 ))(1 − P (C2 ))(1 − P (C3 )) = 1 − 3 123 ××= 234 4 (b) c c P [(C1 ∩ C2 ) ∪ C3 ] = c c 1 − [1 − P (C1 ∩ C2 )](1 − P (C3 )) = c c 1 − [1 − P (C1 )P (C2 )](1 − P (C3 )) 12 1 1 1 − (1 − × )(1 − ) = 23 4 2 = Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 5 Problem 5 In the following figure of pipes, assume that the probability of each valves being opened is p and that the statuses of all the valves are mutually independent. Find the probability that water can flow from L to R. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Solution to Problem 5 Solution From above diagram it is easily seen that current can flow from L to R through either one of the follow paths: AB, DE, ACE, DCB. Denote AB as the event that both valves A and B are opened, ABC the event that valves A,B,C are all opened, and so on. Then using inclusion-exclusion formula, P (AB ∪ DE ∪ ACE ∪ DCB ) = P (AB ) + P (DE ) + P (ACE ) + P (DCB ) −P (AB ∩ DE ) − P (AB ∩ ACE ) − P (AB ∩ DCB ) −P (DE ∩ ACE ) − P (DE ∩ DCB ) − P (ACE ∩ DCB ) +P (AB ∩ DE ∩ ACE ) + P (AB ∩ DE ∩ DCB ) +P (AB ∩ ACE ∩ DCB ) + P (DE ∩ ACE ∩ DCB ) −P (AB ∩ DE ∩ ACE ∩ DCB ) = p2 + p2 + p3 + p3 − p4 − p4 − p4 − p4 − p4 − p5 + p5 +p 5 + p 5 + p 5 − p 5 = 2p 2 + 2p 3 − 5p 4 + 2p 5 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Problem 6 Problem 6 (Challenging! Based on the setting of Example 1.22 (lecture notes of STAT1301B)). A secretary types n letters and addresses them into n envelopes. If he inserts the letters at random, one in each envelope, 1 what is the probability that none of the letters will go into the correct envelopes? 2 what is the probability that there are exactly k letters going into the correct envelopes? Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 Solution to Problem 6 1 Let Ei be the event that i th letter going into the correct envelope. Then n the desired probability is 1 − P Ei . As i =1 P (Ei ) P (Ei ∩ Ej ) (n − 1)! n! (n − 2)! n! = = . . . P (E1 ∩ E2 ∩ ... ∩ En ) 1 , n! = by the inclusion-exclusion principle, n P (E1 ∪ E2 ∪ ... ∪ En ) = ∑ P (Ei ) − ∑ i =1 P (E i 1 ∩ E i 2 ) + · · · i1 <i2 +(−1)n−1 ∑ P (Ei1 ∩ Ei2 ∩ · · · ∩ Ein ) i1 <i2 <···<in n = ∑ (−1)j −1 j =1 Chan Chi Ho, Chan Tsz Hin & Shi Yun ∑ P (Ei1 ∩ Ei2 ∩ · · · ∩ Eij ), i1 <i2 <···<ij Example class 2 and as the number of terms in ∑ i1 <i2 <···<ij n P Ei = i =1 ∑ (−1)j −1 j =1 = n j , n (n − 2)! n (n − 3)! n (n − 1)! − + −··· n! 2 n! 3 n! 1 n = is 1− (n − j )! n n! j 1 1 1 + − · · · + (−1)n−1 . 2! 3! n! Hence, n P (none of the letters go to the correct envelopes) = 1−P Ei i =1 = = Chan Chi Ho, Chan Tsz Hin & Shi Yun 1 1 1 1 − + · · · (−1)n 2! 3! 4! n! n (−1)j ∑ j! . j =0 Example class 2 2.We want to find ∑ i1 <i2 <···<ik , j1 <j2 <···<jn−k = n k P (Ei1 ∩ Ei2 ∩ · · · ∩ Eik ∩ Ejc ∩ · · · ∩ Ejc −k ) 1 n c c P (E1 ∩ E2 ∩ · · · ∩ Ek )P (Ek +1 ∩ · · · ∩ En |E1 ∩ E2 ∩ · · · ∩ Ek ). The third term is the probability of all other n − k letters going into the wrong envelopes. From the example, we know that it equals n−k ∑ j =0 (−1)j , j! while P (E1 ∩ E2 ∩ · · · ∩ Ek ) = The answer is (n − k )! . n! n (n − k )! n−k (−1)j 1 n−k (−1)j ∑ j! = k! ∑ j! . k n! j =0 j =0 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 2 ...
View Full Document

This note was uploaded on 01/16/2012 for the course STAT 1301 taught by Professor Smslee during the Fall '08 term at HKU.

Ask a homework question - tutors are online