ECE302 – Probability and Applications Tutorial #3 . Reza Rafie [email protected] . Administrivia Tutorial website! 1 . Administrivia Tutorial website! www.comm.utoronto.ca/~rrafie/ece302.html 1 . Question 2.62 A die is tossed twice and the number of dots facing up is counted and noted in the order of occurrence. Let A be the event ``number of dots in first toss is not less than number of dots in second toss,'' and let B be the event ``number of dots in first toss is 6.'' Find P[A|B] and P[B|A]. 2 . Question 2.62 The conditional probability is defined as P[A|B] = P[A ∩ B] P[B] 3 . Question 2.62 The conditional probability is defined as P[A|B] = P[A ∩ B] P[B] B = {61, 62, . . . , 66} = A ∩ B 3 . Question 2.62 The conditional probability is defined as P[A|B] = P[A ∩ B] P[B] B = {61, 62, . . . , 66} = A ∩ B P[A|B] = 1 3 . Question 2.62 The conditional probability is defined as P[B|A] = P[A ∩ B] P[A] 4 . Question 2.62 The conditional probability is defined as P[B|A] = P[A ∩ B] P[A] A ∩ B = {61, 62, . . . , 66} 4 . Question 2.62 The conditional probability is defined as P[B|A] = P[A ∩ B] P[A] A ∩ B = {61, 62, . . . , 66} A = {11, 21, 22, 31, . . . , 66} =⇒ |A| = 4 . Question 2.62 The conditional probability is defined as P[B|A] = P[A ∩ B] P[A] A ∩ B = {61, 62, . . . , 66} A = {11, 21, 22, 31, . . . , 66} =⇒ |A| = 21 4 . Question 2.62 The conditional probability is defined as P[B|A] = P[A ∩ B] P[A] A ∩ B = {61, 62, . . . , 66} A = {11, 21, 22, 31, . . . , 66} =⇒ |A| = 21 P[B|A] = 6 2 = 21 7 4 . Question 2.69 A number x is selected at random in the interval [−1, 2]. Let the events A = {x < 0}, B{|x − 0.5| < 0.5}, and C = {x > 0.75}. Find P[A|B], P[B|C], P[A|Cc ], P[B|Cc ]. 5 . Question 2.69 S = [−1, 2], |S| = 3 A = {x < 0} B{|x − 0.5| < 0.5} C = {x > 0.75} 6 Question 2.69 −∞ 0 . +∞ Question 2.69 −∞ S −1 0 . 2 +∞ Question 2.69 −∞ S A −1 0 . 2 +∞ Question 2.69 −∞ S A B −1 0 2 . 1 +∞ . Question 2.69 −∞ S A B −1 0 2 +∞ . 1 0.75 C 7 . Question 2.69 0 A . 0 1 B P[A|B] = P[A∩B] P[B] = 8 . Question 2.69 0 A . 0 1 B P[A|B] = P[A∩B] P[B] = P(∅) 8 . Question 2.69 0 A . 0 1 B P[A|B] = P[A∩B] P[B] = P(∅) P(B) 8 . Question 2.69 0 A . 0 1 B P[A|B] = P[A∩B] P[B] = P(∅) P(B) =0 8 . Question 2.69 . 0 B 1 0.75 2 C P[B|C] = P[B∩C] P[C] = 9 . Question 2.69 . 0 B 1 0.75 2 C P[B|C] = P[B∩C] P[C] = P((0.75,1)) 9 . Question 2.69 . 0 B 1 0.75 2 C P[B|C] = P[B∩C] P[C] = P((0.75,1)) P((0.75,2]) 9 . Question 2.69 . 0 B 1 0.75 2 C P[B|C] = P[B∩C] P[C] = P((0.75,1)) P((0.75,2]) = 0.25 1.25 = 1 5 9 . Question 2.69 . 0 B C 1 0.75 −1 2 0.75 Cc P[B|Cc ] = P[B∩Cc ] P[Cc ] = 10 . Question 2.69 . 0 B C 1 0.75 −1 2 0.75 Cc P[B|Cc ] = P[B∩Cc ] P[Cc ] = P((0,0.75]) 10 . Question 2.69 . 0 B C 1 0.75 −1 2 0.75 Cc P[B|Cc ] = P[B∩Cc ] P[Cc ] = P((0,0.75]) P([−1,0.75]) 10 . Question 2.69 . 0 B C 1 0.75 −1 2 0.75 Cc P[B|Cc ] = P[B∩Cc ] P[Cc ] = P((0,0.75]) P([−1,0.75]) = 0.75 1.75 = 3 7 10 . Question 2.69 −1 A −1 . 0 0.75 Cc P[A|Cc ] = P[A∩Cc ] P[Cc ] = 11 . Question 2.69 −1 A −1 . 0 0.75 Cc P[A|Cc ] = P[A∩Cc ] P[Cc ] = P([−1,0)) 11 . Question 2.69 −1 A −1 . 0 0.75 Cc P[A|Cc ] = P[A∩Cc ] P[Cc ] = P([−1,0)) P([−1,0.75]) 11 . Question 2.69 −1 A −1 . 0 0.75 Cc P[A|Cc ] = P[A∩Cc ] P[Cc ] = P([−1,0)) P([−1,0.75]) = 1 1.75 = 4 7 11 . Question 2.77 A nonsymmetric binary communications channel is shown in the figure below. Assume the input is 0 with probability p and 1 with probability 1 − p. (a) Find the probability that the output is 0. 1 − ϵ1 0 0 ϵ1 ϵ2 1 . 1 − ϵ2 1 12 . Question 2.77 Input: X Output: Y 13 . Question 2.77 0 1 − ϵ1 ϵ1 ϵ2 1 0 . 1 − ϵ2 1 P[{Y = 0}] = P[{Y = 0} ∩ S] = P[{Y = 0} ∩ ({X = 0} ∪ {X = 1})] = P [({Y = 0} ∩ {X = 0}) ∪ ({Y = 0} ∩ {X = 1})] = P [({Y = 0} ∩ {X = 0})] + P [({Y = 0} ∩ {X = 1})] 14 . Question 2.77 0 1 − ϵ1 ϵ1 ϵ2 1 0 . 1 − ϵ2 1 P [({Y = 0} ∩ {X = 0})] = P [({Y = 0}|{X = 0})] × P [{X = 0}] = (1 − ϵ1 ) × p 15 . Question 2.77 0 1 − ϵ1 ϵ1 ϵ2 1 0 . 1 − ϵ2 1 P [({Y = 0} ∩ {X = 0})] = P [({Y = 0}|{X = 0})] × P [{X = 0}] = (1 − ϵ1 ) × p P [({Y = 0} ∩ {x = 1})] = P [({Y = 0}|{X = 1})] × P [{X = 1}] = ϵ2 × (1 − p) 15 . Question 2.77 0 1 − ϵ1 ϵ1 ϵ2 1 0 . 1 − ϵ2 1 P [({Y = 0} ∩ {X = 0})] = P [({Y = 0}|{X = 0})] × P [{X = 0}] = (1 − ϵ1 ) × p P [({Y = 0} ∩ {x = 1})] = P [({Y = 0}|{X = 1})] × P [{X = 1}] = ϵ2 × (1 − p) P [{Y = 0}] = (1 − ϵ1 ) × p + ϵ2 × (1 − p) 15 . Question 2.77 Remark: To evaluate P(Y), one can partition S into disjoint subsets X1 , X2 , . . . , Xn and use the law of total probability: P(Y) = i=n ∑ P(Y|Xi ) × P(Xi ) i=1 16 . Question 2.77 (b) Find the probability that the input was 0 given that the output is 1. Find the probability that the input is 1 given that the output is 1. Which input is more probable? 17 . Question 2.77 Probability that the input was 0 given that the output is 1 = P[X = 0|Y = 1] 18 . Question 2.77 Probability that the input was 0 given that the output is 1 = P[X = 0|Y = 1] P[X = 0|Y = 1] = P({X = 0} ∩ {Y = 1}) P(Y = 1) (1) 18 . Question 2.77 We have P(Y|X) and P(Y = 0), so we want to write everything in terms of P(Y|X) and P(Y = 0) 19 . Question 2.77 We have P(Y|X) and P(Y = 0), so we want to write everything in terms of P(Y|X) and P(Y = 0) Denominator: P(Y = 1) = 1 − P(Y = 0) 19 . Question 2.77 We have P(Y|X) and P(Y = 0), so we want to write everything in terms of P(Y|X) and P(Y = 0) Denominator: P(Y = 1) = 1 − P(Y = 0) = 1 − (1 − ϵ1 ) × p − ϵ2 × (1 − p) 19 . Question 2.77 We have P(Y|X) and P(Y = 0), so we want to write everything in terms of P(Y|X) and P(Y = 0) Denominator: P(Y = 1) = 1 − P(Y = 0) = 1 − (1 − ϵ1 ) × p − ϵ2 × (1 − p) Numerator: By definition of conditional probability, P({X = 0} ∩ {Y = 1}) = P({Y = 1}|{X = 0}) × P(X = 0) 19 . Question 2.77 We have P(Y|X) and P(Y = 0), so we want to write everything in terms of P(Y|X) and P(Y = 0) Denominator: P(Y = 1) = 1 − P(Y = 0) = 1 − (1 − ϵ1 ) × p − ϵ2 × (1 − p) Numerator: By definition of conditional probability, P({X = 0} ∩ {Y = 1}) = P({Y = 1}|{X = 0}) × P(X = 0) = ϵ1 × p 19 . Question 2.77 Probability that the input was 0 given that the output is 1 = P[X = 0|Y = 1] 20 . Question 2.77 Probability that the input was 0 given that the output is 1 = P[X = 0|Y = 1] P({X = 0} ∩ {Y = 1}) (2) P(Y = 1) ϵ1 × p = 1 − (1 − ϵ1 ) × p − ϵ2 × (1 − p) (3) P[X = 0|Y = 1] = 20 . Question 2.77 Similarly, probability that the input was 1 given that the output is 1 = P[X = 1|Y = 1] 21 . Question 2.77 Similarly, probability that the input was 1 given that the output is 1 = P[X = 1|Y = 1] P({X = 1} ∩ {Y = 1}) (4) P(Y = 1) (1 − ϵ2 ) × (1 − p) = 1 − (1 − ϵ1 ) × p − ϵ2 × (1 − p) (5) P[X = 1|Y = 1] = 21 . Question 2.77 Which input is more probable? 22 . Question 2.77 Which input is more probable? Same denominators, only need to compare numerators 22 . Question 2.77 Which input is more probable? Same denominators, only need to compare numerators ? ϵ1 × p ⋛ (1 − ϵ2 ) × (1 − p) 22 . Question 2.80 A computer manufacturer uses chips from three sources. Chips from sources A, B, and C are defective with probabilities 0.005, 0.001, and 0.01, respectively. If a randomly selected chip is found to be defective, find the probability that the manufacturer was A; that the manufacturer was C. Assume that the proportions of chips from A, B, and C are 0.5, 0.1, and 0.4, respectively. 23 . Question 2.80 What do we know? 24 . Question 2.80 What do we know? P(A) = 0.5 P(B) = 0.1 P(C) = 0.4 24 . Question 2.80 What do we know? P(A) = 0.5 P(B) = 0.1 P(C) = 0.4 P(Defective|A) = 0.005 24 . Question 2.80 What do we know? P(A) = 0.5 P(B) = 0.1 P(C) = 0.4 P(Defective|A) = 0.005 P(Defective|B) = 0.001 P(Defective|C) = 0.01 24 . Question 2.80 Remark: Bayes' rule is a way to relate P(X|Y) to P(Y|X): P(X|Y) = P(Y|X)P(X) P(Y) Most of the time, the law of total probability is used to find the denominator in Bayes' formula. 25 . Question 2.80 P(A|Defective) = 26 . Question 2.80 P(A|Defective) = P(Defective|A)P(A) P(Defective) 26 . Question 2.80 P(A|Defective) = Denominator: P(Defective|A)P(A) P(Defective) P(Defective) =P(Defective|A)P(A) + P(Defective|B)P(B) + P(Defective|C)P(C) P(Defective) = 0.005×0.5+0.001×0.1+0.01×0.4 = 0.0066 26 . Question 2.80 P(A|Defective) = 0.005 × 0.5 25 = 0.0066 66 P(Defective|A)P(A) P(Defective) 27 . Question 2.80 Similarly, P(C|Defective) = 0.01 × 0.4 40 = 0.0066 66 P(Defective|C)P(C) P(Defective) 28 . Question 2.81 A ternary communication system is shown on the blackboard . Suppose that input symbols 0, 1, and 2 occur with probability 1/3 respectively. (a) Find the probabilities of the output symbols. (b) Suppose that a 1 is observed at the output. What is the probability that the input was 0? 1? 2? 29 . Question 2.82 Let S = {1, 2, 3, 4} and A = {1, 2}, A = {1, 3}, A = {1, 4}. Assume the outcomes are equiprobable. Are A, B, and C independent events? 30 . Question 2.82 A, B, C are independent if P(A ∩ B) = P(A)P(B) P(B ∩ C) = P(B)P(C) P(C ∩ A) = P(C)P(A) P(A ∩ B ∩ C) = P(A)P(B)P(C) 31 . Question 2.82 A and B are independent. 32 . Question 2.82 A and B are independent. B and C are independent. C and A are independent. 32 . Question 2.82 A and B are independent. B and C are independent. C and A are independent. But A, B and C are not independent! 32 . Question 2.87 Let A, B, and C be events with probabilities P[A], P[B], and P[C]. (a) Find P[A ∪ B] if A and B are independent. 33 . Question 2.87 P[A ∪ B] = P[A] + P[B] − P[A ∩ B] 34 . Question 2.87 P[A ∪ B] = P[A] + P[B] − P[A ∩ B] = P[A] + P[B] − P[A]P[B] 34 . Question 2.87 (b) Find P[A ∪ B] if A and B are mutually exclusive. 35 . Question 2.87 P[A ∪ B] = P[A] + P[B] − P[A ∩ B] 36 . Question 2.87 P[A ∪ B] = P[A] + P[B] − P[A ∩ B] = P[A] + P[B] 36 . Question 2.87 (c) Find P[A ∪ B ∪ C] if A, B, and C are independent. 37 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] 38 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] First term: P[A ∪ B] = P[A] + P[B] − P[A ∩ B] 38 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] First term: P[A ∪ B] = P[A] + P[B] − P[A ∩ B] = P[A] + P[B] − P[A]P[B] 38 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] 39 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] Third term: P[(A ∪ B) ∩ C] = P[(A ∩ C) ∪ (B ∩ C)] 39 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] Third term: P[(A ∪ B) ∩ C] = P[(A ∩ C) ∪ (B ∩ C)] = P[(A ∩ C)] + P[(B ∩ C)] − P[(A ∩ C) ∩ (B ∩ C)] 39 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] Third term: P[(A ∪ B) ∩ C] = P[(A ∩ C) ∪ (B ∩ C)] = P[(A ∩ C)] + P[(B ∩ C)] − P[(A ∩ C) ∩ (B ∩ C)] = P[(A ∩ C)] + P[(B ∩ C)] − P[(A ∩ B ∩ C)] 39 . Question 2.87 P[A ∪ B ∪ C] = P[A ∪ B] + P[C] − P[(A ∪ B) ∩ C] Third term: P[(A ∪ B) ∩ C] = P[(A ∩ C) ∪ (B ∩ C)] = P[(A ∩ C)] + P[(B ∩ C)] − P[(A ∩ C) ∩ (B ∩ C)] = P[(A ∩ C)] + P[(B ∩ C)] − P[(A ∩ B ∩ C)] = P[A]P[C] + P[B]P[C] − P[A]P[B]P[C] 39 . Question 2.87 P[A ∪ B ∪ C] =P[A] + P[B] + P[C] − P[A]P[B] − P[B]P[C] − P[C]P[A] + P[A]P[B]P[C] 40 . Inclusion–exclusion principle: P[A ∪ B ∪ C] =P[A] + P[B] + P[C] − P[A ∩ B] − P[B ∩ C] − P[C ∩ A] + P[A ∩ B ∩ C] 41 . Question 2.87 (d) Find P[A ∪ B ∪ C] if A, B, and C are pairwise mutually exclusive. 42 . Question 2.87 P[A ∪ B ∪ C] =P[A] + P[B] + P[C] − P[A ∩ B] − P[B ∩ C] − P[C ∩ A] + P[A ∩ B ∩ C] =⇒ P[A ∪ B ∪ C] = P[A] + P[B] + P[C] 43 . Question 2.88 An experiment consists of picking one of two urns at random and then selecting a ball from the urn and noting its color (black or white). Let A be the event ``urn 1 is selected'' and B the event ``a black ball is observed.'' Under what conditions are A and B independent? 44 . Question 2.88 If P[B] = 0, A and B are independent. 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff P[A|B] = P[A] 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff P[A|B] = P[A] = P[A|B]P[B] + P[A|Bc ]P[Bc ] 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff P[A|B] = P[A] = P[A|B]P[B] + P[A|Bc ]P[Bc ] = P[A|B]P[B] + P[A|Bc ] (1 − P[B]) 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff P[A|B] = P[A] = P[A|B]P[B] + P[A|Bc ]P[Bc ] = P[A|B]P[B] + P[A|Bc ] (1 − P[B]) ⇐⇒ P[A|B] (1 − P[B]) = P[A|Bc ] (1 − P[B]). 45 . Question 2.88 If P[B] = 0, A and B are independent. Assume P[B] ̸= 0. Then, A and B are independent iff P[A|B] = P[A] = P[A|B]P[B] + P[A|Bc ]P[Bc ] = P[A|B]P[B] + P[A|Bc ] (1 − P[B]) ⇐⇒ P[A|B] (1 − P[B]) = P[A|Bc ] (1 − P[B]). If P[B] = 1, A and B are independent. 45 . Question 2.88 Therefore, if P[B] ̸= 0 and P[B] ̸= 1, A and B are independent iff P[A|B] = P[A|Bc ]. 46 . Question 2.97 A block of 100 bits is transmitted over a binary communication channel with probability of bit error p = 10−2 . (a) If the block has 1 or fewer errors then the receiver accepts the block. Find the probability that the block is accepted. 47 . Question 2.97 A = The event that the block is accepted 48 . Question 2.97 A = The event that the block is accepted A = there is no bit error (E0 ) or there is exactly 1 error (E1 ) 48 . Question 2.97 A = The event that the block is accepted A = there is no bit error (E0 ) or there is exactly 1 error (E1 ) E0 ∩ E1 = ∅ 48 . Question 2.97 A = The event that the block is accepted A = there is no bit error (E0 ) or there is exactly 1 error (E1 ) E0 ∩ E1 = ∅ A = E0 ∪ E1 48 . Question 2.97 A = The event that the block is accepted A = there is no bit error (E0 ) or there is exactly 1 error (E1 ) E0 ∩ E1 = ∅ A = E0 ∪ E1 =⇒ P[A] = P[E0 ] + P[E1 ] 48 . Question 2.97 P[A] = P[E0 ] + P[E1 ] 49 . Question 2.97 P[A] = P[E0 ] + P[E1 ] P[E0 ] = 49 . Question 2.97 P[A] = P[E0 ] + P[E1 ] P[E0 ] = (1 − p)100 49 . Question 2.97 P[A] = P[E0 ] + P[E1 ] P[E0 ] = (1 − p)100 P[E1 ] = 49 . Question 2.97 P[A] = P[E0 ] + P[E1 ] P[E0 ] = (1 − p)100 ( ) 99 P[E1 ] = 100 1 p(1 − p) 49 . Question 2.97 P[A] = P[E0 ] + P[E1 ] P[E0 ] = (1 − p)100 ( ) 99 P[E1 ] = 100 1 p(1 − p) P[A] = (1 − p)99 (1 + 99p) ≈ 0.7358 49 . Question 2.97 (b) If the block has more than 1 error, then the block is retransmitted. Find the probability that M retransmissions are required. 50 . Question 2.97 P[retransmission] = 1 − P[A] ≈ 0.2642 51 . Question 2.97 P[retransmission] = 1 − P[A] ≈ 0.2642 P[having M retransmissions] = P[A](1 − P[A])M 51 . Question 2.97 P[retransmission] = 1 − P[A] ≈ 0.2642 P[having M retransmissions] = P[A](1 − P[A])M P[having at leastM retransmissions] = 51 . Question 2.97 P[retransmission] = 1 − P[A] ≈ 0.2642 P[having M retransmissions] = P[A](1 − P[A])M P[having at leastM retransmissions] = (1 − P[A])M 51 . Question 2.100 Each of n terminals broadcasts a message in a given time slot with probability p. 52 . Question 2.100 (a) Find the probability that exactly one terminal transmits so the message is received by all terminals without collision. 53 . Question 2.100 (a) Find the probability that exactly one terminal transmits so the message is received by all terminals without collision. np(1 − p)n−1 53 . Question 2.100 (b) Find the value of p that maximizes the probability of successful transmission in part (a). 54 . Question 2.100 (b) Find the value of p that maximizes the probability of successful transmission in part (a). d n−1 =0 dp np(1 − p) 54 . Question 2.100 (b) Find the value of p that maximizes the probability of successful transmission in part (a). d n−1 = 0 =⇒ p = n1 dp np(1 − p) 54 . Question 2.100 (c) Find the asymptotic value of the maximum probability of successful transmission as n becomes large. 55 . Question 2.100 (c) Find the asymptotic value of the maximum probability of successful transmission as n becomes large. 1 lim P[success] = lim n (1 − n)n−1 n→∞ n→∞ n 1 = lim (1 − )n−1 n→∞ n 1 = ≈ 0.3679 e (6) 55 . Question 2.100 Remark: )n ( 1 =e lim 1 + n→∞ n 56 . Question 2.106 A biased coin is tossed repeatedly until heads has come up three times. Find the probability that k tosses are required. Hint: Show that {``k tosses are required''} = A ∩ B, where A ={``kth toss is head''} and B ={``2 head occur in k − 1 tosses''}. 57 . Question 2.106 Probability of head = p 58 . Question 2.106 Probability of head = p P[A] = p 58 . Question 2.106 Probability of head = p P[A] = p ( ) 2 k−3 P[B] = k−1 2 p (1 − p) 58 . Question 2.106 Probability of head = p P[A] = p ( ) 2 k−3 P[B] = k−1 2 p (1 − p) A and B are two independent experiments 58 . Question 2.106 Probability of head = p P[A] = p ( ) 2 k−3 P[B] = k−1 2 p (1 − p) A and B are two independent experiments ( ) 3 k−3 P(A ∩ B) = P(A, B) = k−1 for k > 2 2 p (1 − p) 58 . Administrivia Tutorial website! www.comm.utoronto.ca/~rrafie/ece302.html 59 . Questions? 59
© Copyright 2025 Paperzz