1 independence supplementary notes prepared by raymond wong presented by raymond wong
Post on 20-Dec-2015
218 views
TRANSCRIPT
2
e.g.1 (Page 3) The sample space of throwing two fair dice is
Dice 1
Dice 2
1 1
1 2
1 3
1 4
1 5
1 6
2 1
2 2
2 3
2 4
2 5
2 6
Dice 1
Dice 2
3 1
3 2
3 3
3 4
3 5
3 6
4 1
4 2
4 3
4 4
4 5
4 6
Dice 1
Dice 2
5 1
5 2
5 3
5 4
5 5
5 6
6 1
6 2
6 3
6 4
6 5
6 6
3
e.g.2 (Page 3) The sample space of throwing two fair dice
where “the dice sum up to 4” is
Dice 1
Dice 2
1 3
2 2
3 1
4
e.g.3 (Page 4) Consider the dice with “triangle”, “circle” and
“square” The sample space of throwing 2 dice of this type
isDice 1 Dice 2
TT
TCCCS
SS
TC
STC
STC
S
E: the event that at least one dice shows circle
E1: the event that the first dice shows circle
E2: the event that the second dice shows circle
P(E) = P(E1 U E2)= P(E1) + P(E2) – P(E1 E2)
P(E1) = 3/9 = 1/3 P(E2) = 3/9 = 1/3
P(E1 E2) = 1/9
= 1/3 + 1/3 – 1/9= 5/9
Assume that each possible outcome is equally likely
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 1 Dice 2
T
CS
TCS
P(circles) = 4P(triangles)P(squares) = 9P(triangles)
P(triangles)
6
e.g.5 (Page 6) Consider the dice with “triangle”, “circle” and
“square” The sample space of throwing 2 dice of this type
isDice 1 Dice 2
TT
TCCCS
SS
TC
STC
STC
S
1/36
1/18
1/121/181/9
1/61/121/61/4
P({TT, CC, SS}) = 1/36 + 1/9 + ¼ = 7/18
P(CC) = 1/9
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 isDice 1 Dice 2
TT
TCCCS
SS
TC
STC
STC
S
1/36
1/18
1/121/181/9
1/61/121/61/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
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 isDice 1 Dice 2
TT
TCCCS
SS
TC
STC
STC
S
1/36
1/18
1/121/181/9
1/61/121/61/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
e.g.7 (Page 12) The sample space of throwing two fair dice is
Dice 1
Dice 2
Sum
1 1 2
1 2 3
1 3 4
1 4 5
1 5 6
1 6 7
2 1 3
2 2 4
2 3 5
2 4 6
2 5 7
2 6 8
Dice 1
Dice 2
Sum
3 1 4
3 2 5
3 3 6
3 4 7
3 5 8
3 6 9
4 1 5
4 2 6
4 3 7
4 4 8
4 5 9
4 6 10
Dice 1
Dice 2
Sum
5 1 6
5 2 7
5 3 8
5 4 9
5 5 10
5 6 11
6 1 7
6 2 8
6 3 9
6 4 10
6 5 11
6 6 12
F: event that sum 10
P(F)= 6/36 = 1/6
10
e.g.8 (Page 12) The sample space of throwing two fair dice is
Dice 1
Dice 2
Sum
1 1 2
1 2 3
1 3 4
1 4 5
1 5 6
1 6 7
2 1 3
2 2 4
2 3 5
2 4 6
2 5 7
2 6 8
Dice 1
Dice 2
Sum
3 1 4
3 2 5
3 3 6
3 4 7
3 5 8
3 6 9
4 1 5
4 2 6
4 3 7
4 4 8
4 5 9
4 6 10
Dice 1
Dice 2
Sum
5 1 6
5 2 7
5 3 8
5 4 9
5 5 10
5 6 11
6 1 7
6 2 8
6 3 9
6 4 10
6 5 11
6 6 12
F: event that sum 10
P(E F)= 4/36 = 1/9
E: event that sum is even
Sum=10 or 12
11
e.g.9 (Page 14)
Why is “R = (R K) U (R K)”?
Consider R
= R UniverseUniverse
R
K K
= R (K U K)
= (R K) U (R K)
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
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
e.g.12 (Page 22)
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot 0 Slot k-1 Slot 3 Slot 5 Slot 3 Slot 4
(0, k-1, 3, 5, 3, 4)
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
a 6-tuple
k locations/slots6 items
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
15
e.g.12
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
a 6-tuple
k locations/slots6 items
Let E be the event that a1 hashes to slot rLet F be the event that a2 hashes to slot q
(a) What is P(E)?
(b) What is P(F)?
(c) What is P(E F)?
E: the event that a1 hashes to slot rF: the event that a2 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?
(d) Are E and F independent?
16
e.g.12
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
a 6-tuple
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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 choicesk choices
k choicesk choices
k choices
No. of 6-tuples where a1 hashes to slot r = k x k x k x k x k = k5
No. of 6-tuples =k x k x k x k x k x k = k6
P(E) =P(a1 hashes to slot r)= k5/k6 = 1/k
1/k
17
e.g.12
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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
e.g.12
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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
1/k
a 6-tuple
Slot r
Slot qk choices
k choicesk choices
k choices
No. of 6-tuples where a1 hashes to slot r and a2 hashed to slot q = k x k x k x k = k4
No. of 6-tuples =k x k x k x k x k x k = k6
P(E F)=P(a1 hashes to slot r and a2 hashed to slot q)= k4/k6 = 1/k2
1/k2
E F: “a1 hashes to slot r and a2 hashed to slot q”
19
e.g.12
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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
1/k
a 6-tuple
1/k2
P(E) = 1/k
P(F) = 1/k
P(E F) = 1/k2
We deduce that P(E F) = P(E) x P(F)
Thus, E and F are independent.
Yes
20
e.g.13 (Page 24)
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 = a2.
a 6-tuple
k locations/slots6 items
Let E be the event that a1 hashes to slot rLet F be the event that a2 hashes to slot q
(a) What is P(E)?
(b) What is P(F)?
(c) What is P(E F)?
E: the event that a1 hashes to slot rF: the event that a2 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?
(d) Are E and F independent?
21
e.g.13
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 = a2.
a 6-tuple
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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/k1/k
E F: “a1 hashes to slot r and a2 hashed to slot q”
Note that a1 = a2
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
e.g.13
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot r Slot q Slot .. Slot .. Slot .. Slot ..
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 = a2.
a 6-tuple
k locations/slots6 items
E: the event that a1 hashes to slot rF: the event that a2 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/k1/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/k2
P(E) x P(F)
P(E) x P(F)
Thus, P(E F) P(E) x P(F)E and F are not independent.
No
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.
H T T H H
What is P(the outcome of the 6-th flip = H | HTTHH)?
We expect that this is equal to 1/2That is, it is equal to P(H)
We say that the 6-th flip is independent of theoutcome of the first 5 flips.
This is called a trial process.
This is called an independent trial process.
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.
H T T H H
What is P(the outcome of the 6-th flip = H | HTTHH)?
Let xi be the outcome of the i-th flip.
P(x6 = H | x1 = H, x2 = T, x3 = T, x4 = H, x5 = H)
The above probability can be re-written as follows according to sequenceHTTHH.
= P(x6 = H)
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
e.g.16 (Page 31)
a3
a6
a2
a1
a5
a4
a2 a3 a4 a5a1a6
Slot 0 Slot k Slot 3 Slot 5 Slot 3 Slot 4
a1, a2, a3, a4, a5, a6
(l1, l2, l3, l4, l5, l6)
Suppose that we have 6 items where a1 a2.
a 6-tuple
Slot 0
Slot 1Slot 2
Slot 3
Slot 4
Slot 5…
Slot k-1
What is P( l1 = 0, l2 = 4, l3 = 5, l4 = 1, l5= 0, l6 = 1 )?
P( l1 = 0, l2 = 4, l3 = 5, l4 = 1, l5= 0, l6 = 1 )= P(l1 = 0) x P(l2 = 4) x P(l3 = 5) x P(l4 = 1) x P(l5= 0) x P(l6 = 1)= 1/k x 1/k x 1/k x 1/k x 1/k x 1/k= 1/k6
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
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 seconddraw depends on the outcome of the first draw.
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 Ei be the event that coin i shows a “head”.We can compute the probability by P(E1 U E2 U E3 U E4 U E5 U E6)
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(F1 F2 F3 F4 F5 F6)
= 1 – P(F1) x P(F2) x P(F3) x P(F4) x P(F5) x P(F6)= 1 – ½ x ½ x ½ x ½ x ½ x ½ = 1 – 1/64 = 63/64
Let Fi be the event that coin i shows a “tail”.