Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Independence Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.

Similar presentations


Presentation on theme: "1 Independence Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong."— Presentation transcript:

1 1 Independence Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong

2 2 e.g.1 (Page 3) The sample space of throwing two fair dice is Dice 1Dice 2 11 12 13 14 15 16 21 22 23 24 25 26 Dice 1Dice 2 31 32 33 34 35 36 41 42 43 44 45 46 Dice 1Dice 2 51 52 53 54 55 56 61 62 63 64 65 66

3 3 e.g.2 (Page 3) The sample space of throwing two fair dice where “the dice sum up to 4” is Dice 1Dice 2 13 22 31

4 4 e.g.3 (Page 4) Consider the dice with “triangle”, “circle” and “square” The sample space of throwing 2 dice of this type is Dice 1Dice 2 T T T C C C S S S T C S T C S T C S E: the event that at least one dice shows circle E 1 : the event that the first dice shows circle E 2 : the event that the second dice shows circle P(E) = P(E 1 U E 2 ) = P(E 1 ) + P(E 2 ) – P(E 1  E 2 ) P(E 1 ) = 3/9 = 1/3P(E 2 ) = 3/9 = 1/3 P(E 1  E 2 ) = 1/9 = 1/3 + 1/3 – 1/9= 5/9 Assume that each possible outcome is equally likely

5 5 e.g.4 (Page 5) Consider the dice with “triangle”, “circle” and “square” The sample space of throwing 2 dice of this type where “both top shapes are the same” is Dice 1Dice 2 T C S T C S P(circles) = 4P(triangles) P(squares) = 9P(triangles) P(triangles)

6 6 e.g.5 (Page 6) Consider the dice with “triangle”, “circle” and “square” The sample space of throwing 2 dice of this type is Dice 1Dice 2 T T T C C C S S S T C S T C S T C S 1/36 1/18 1/12 1/18 1/9 1/6 1/12 1/6 1/4 P({TT, CC, SS}) = 1/36 + 1/9 + ¼ = 7/18 P(CC) = 1/9

7 7 e.g.6 (Page 9) Consider the dice with “triangle”, “circle” and “square” The sample space of throwing 2 dice of this type where both top shapes are the same is Dice 1Dice 2 T T T C C C S S S T C S T C S T C S 1/36 1/18 1/12 1/18 1/9 1/6 1/12 1/6 1/4 P({TT, CC, SS}) = 1/36 + 1/9 + ¼ = 7/18 P(TT | F ) = 1/36 / (7/18) = 1/14 P(CC | F) = 1/9 / (7/18) = 2/7 P(SS | F) = 1/4 / (7/18) = 9/14 Sum is equal to 1 Let F be the event that both top shapes are the same. F

8 8 e.g.6 Consider the dice with “triangle”, “circle” and “square” The sample space of throwing 2 dice of this type where both top shapes are the same is Dice 1Dice 2 T T T C C C S S S T C S T C S T C S 1/36 1/18 1/12 1/18 1/9 1/6 1/12 1/6 1/4 P({TT, CC, SS}) = 1/36 + 1/9 + ¼ = 7/18 P(TT | F ) = 1/36 / (7/18) = 1/14 P(CC | F) = 1/9 / (7/18) = 2/7 P(SS | F) = 1/4 / (7/18) = 9/14 Let F be the event that both top shapes are the same. F P(F) P(CC  F)

9 9 e.g.7 (Page 12) The sample space of throwing two fair dice is Dice 1Dice 2Sum 112 123 134 145 156 167 213 224 235 246 257 268 Dice 1Dice 2Sum 314 325 336 347 358 369 415 426 437 448 459 4610 Dice 1Dice 2Sum 516 527 538 549 5510 5611 617 628 639 6410 6511 6612 F: event that sum  10 P(F) = 6/36 = 1/6

10 10 e.g.8 (Page 12) The sample space of throwing two fair dice is Dice 1Dice 2Sum 112 123 134 145 156 167 213 224 235 246 257 268 Dice 1Dice 2Sum 314 325 336 347 358 369 415 426 437 448 459 4610 Dice 1Dice 2Sum 516 527 538 549 5510 5611 617 628 639 6410 6511 6612 F: event that sum  10 P(E  F) = 4/36 = 1/9 E: event that sum is even Sum=10 or 12

11 11 e.g.9 (Page 14) Why is “R = (R  K) U (R  K)”? Consider R = R  Universe Universe R K K = R  (K U K) = (R  K) U (R  K)

12 12 e.g.10 (Page 14) Given “R = (R  K) U (R  K)”, we know that P(R) = P(R  K) + P(R  K) Universe R K K Why? Note that R  K and R  K are disjoint P(R) = P((R  K) U (R  K)) = P(R  K) + P(R  K)

13 13 e.g.11 (Page 16) Suppose that we have one red dice and one green dice. We throw these two dice. We know the following The total sum is odd The red dice is odd Is the green dice even or odd? We know that odd + even = odd Thus, the green dice is even.

14 14 e.g.12 (Page 22) a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot 0Slot k-1Slot 3Slot 5Slot 3Slot 4 (0, k-1, 3, 5, 3, 4) a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. a 6-tuple k locations/slots 6 items Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1

15 15 e.g.12 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. a 6-tuple k locations/slots 6 items Let E be the event that a 1 hashes to slot r Let F be the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent?

16 16 e.g.12 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. a 6-tuple k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? Slot r k choices No. of 6-tuples where a 1 hashes to slot r = k x k x k x k x k = k 5 No. of 6-tuples = k x k x k x k x k x k = k 6 P(E) = P(a 1 hashes to slot r) = k 5 /k 6 = 1/k 1/k

17 17 e.g.12 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? 1/k Note that F is similar to E Thus, P(F) = P(E) = 1/k 1/k

18 18 e.g.12 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? 1/k a 6-tuple Slot r Slot q k choices No. of 6-tuples where a 1 hashes to slot r and a 2 hashed to slot q = k x k x k x k = k 4 No. of 6-tuples = k x k x k x k x k x k = k 6 P(E  F)= P(a 1 hashes to slot r and a 2 hashed to slot q) = k 4 /k 6 = 1/k 2 1/k 2 E  F: “a 1 hashes to slot r and a 2 hashed to slot q”

19 19 e.g.12 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? 1/k a 6-tuple 1/k 2 P(E) = 1/k P(F) = 1/k P(E  F) = 1/k 2 We deduce that P(E  F) = P(E) x P(F) Thus, E and F are independent. Yes

20 20 e.g.13 (Page 24) Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1 = a 2. a 6-tuple k locations/slots 6 items Let E be the event that a 1 hashes to slot r Let F be the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent?

21 21 e.g.13 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1 = a 2. a 6-tuple k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? 1/k E  F: “a 1 hashes to slot r and a 2 hashed to slot q” Note that a 1 = a 2 We need to consider two cases. Case 1: r  q Case 2: r =q P(E  F) = 0 P(E  F) = 1 0 (if r  q) 1 (if r = q)

22 22 e.g.13 Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot rSlot qSlot.. a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1 = a 2. a 6-tuple k locations/slots 6 items E: the event that a 1 hashes to slot r F: the event that a 2 hashes to slot q (a) What is P(E)? (b) What is P(F)? (c) What is P(E  F)? (d) Are E and F independent? 1/k Case 1: r  q Case 2: r =q P(E  F) = 0 P(E  F) = 1 0 (if r  q) 1 (if r = q) P(E) = 1/k P(F) = 1/k P(E) x P(F) = 1/k 2  P(E) x P(F) Thus, P(E  F)  P(E) x P(F) E and F are not independent. No

23 23 e.g.14 (Page 26) Suppose that we flip a coin 5 times. We obtain the following outcome. Suppose that we want to flip this coin again as the 6-th flip. HTTHH What is P(the outcome of the 6-th flip = H | HTTHH)? We expect that this is equal to 1/2 That is, it is equal to P(H) We say that the 6-th flip is independent of the outcome of the first 5 flips. This is called a trial process. This is called an independent trial process.

24 24 e.g.14 Suppose that we flip a coin 5 times. We obtain the following outcome. Suppose that we want to flip this coin again as the 6-th flip. HTTHH What is P(the outcome of the 6-th flip = H | HTTHH)? Let x i be the outcome of the i-th flip. P(x 6 = H | x 1 = H, x 2 = T, x 3 = T, x 4 = H, x 5 = H) The above probability can be re-written as follows according to sequence HTTHH. = P(x 6 = H)

25 25 e.g.15 (Page 30) Suppose that we flip a coin 5 times. What is P(HTTHH)? P(HTTHH) = P(H) x P(T) x P(T) x P(H) x P(H) = ½ x ½ x ½ x ½ x ½ x ½ = 1/256

26 26 e.g.16 (Page 31) a3a3 a6a6 a2a2 a1a1 a5a5 a4a4 a2a2 a3a3 a4a4 a5a5 a1a1 a6a6 Slot 0Slot kSlot 3Slot 5Slot 3Slot 4 a 1, a 2, a 3, a 4, a 5, a 6 (l 1, l 2, l 3, l 4, l 5, l 6 ) Suppose that we have 6 items where a 1  a 2. a 6-tuple Slot 0 Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 … Slot k-1 What is P( l 1 = 0, l 2 = 4, l 3 = 5, l 4 = 1, l 5 = 0, l 6 = 1 )? P( l 1 = 0, l 2 = 4, l 3 = 5, l 4 = 1, l 5 = 0, l 6 = 1 ) = P(l 1 = 0) x P(l 2 = 4) x P(l 3 = 5) x P(l 4 = 1) x P(l 5 = 0) x P(l 6 = 1) = 1/k x 1/k x 1/k x 1/k x 1/k x 1/k = 1/k 6

27 27 e.g.17 (Page 33) Suppose that we draw a card from a standard deck of 52 cards replace it draw another card continue for a total of ten draws. Is the above process an independent trial process? Yes. This is because drawing a given card at a particular time does not depend on the cards we drawn in the earlier time.

28 28 e.g.18 (Page 34) Suppose that we draw a card from a standard deck of 52 cards discard it draw another card continue for a total of ten draws. Is the above process an independent trial process? No. In the first draw, we have 52 cards to draw from. In the second draw, we have only 51. Thus, the probability for each possible outcome on the second draw depends on the outcome of the first draw.

29 29 e.g.19 (Page 36) We flip 6 coins. What is the probability that at least one coin shows a “head”? We learnt the principle of inclusion-and-exclusion. Let E i be the event that coin i shows a “head”. We can compute the probability by P(E 1 U E 2 U E 3 U E 4 U E 5 U E 6 ) This time, we can use a simple derivation by using the independent trial process. P(at least one coin shows a “head”) = 1 – P(all coins show a “tail”) = 1 – P(F 1  F 2  F 3  F 4  F 5  F 6 ) = 1 – P(F 1 ) x P(F 2 ) x P(F 3 ) x P(F 4 ) x P(F 5 ) x P(F 6 ) = 1 – ½ x ½ x ½ x ½ x ½ x ½ = 1 – 1/64= 63/64 Let F i be the event that coin i shows a “tail”.


Download ppt "1 Independence Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong."

Similar presentations


Ads by Google