SLIDE 1
Continuing Probability. Wrap up: Total Probability and Conditional - - PowerPoint PPT Presentation
Continuing Probability. Wrap up: Total Probability and Conditional - - PowerPoint PPT Presentation
Continuing Probability. Wrap up: Total Probability and Conditional Probability. Continuing Probability. Wrap up: Total Probability and Conditional Probability. Product Rule, Correlation, Independence, Bayes Rule, Total probability Assume
SLIDE 2
SLIDE 3
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN.
SLIDE 4
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B].
SLIDE 5
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B]. Indeed, B is the union of the disjoint sets An ∩B for n = 1,...,N.
SLIDE 6
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B]. Indeed, B is the union of the disjoint sets An ∩B for n = 1,...,N.
SLIDE 7
Conditional probability: example.
Two coin flips.
SLIDE 8
Conditional probability: example.
Two coin flips. First flip is heads.
SLIDE 9
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads?
SLIDE 10
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT};
SLIDE 11
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space.
SLIDE 12
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads:
SLIDE 13
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}.
SLIDE 14
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}.
SLIDE 15
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A;
SLIDE 16
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still.
SLIDE 17
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still.
SLIDE 18
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still. Event B = two heads.
SLIDE 19
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still. Event B = two heads. The probability of two heads if the first flip is heads.
SLIDE 20
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still. Event B = two heads. The probability of two heads if the first flip is heads. The probability of B given A
SLIDE 21
Conditional probability: example.
Two coin flips. First flip is heads. Probability of two heads? Ω = {HH,HT,TH,TT}; Uniform probability space. Event A = first flip is heads: A = {HH,HT}. New sample space: A; uniform still. Event B = two heads. The probability of two heads if the first flip is heads. The probability of B given A is 1/2.
SLIDE 22
Conditional Probability.
Definition: The conditional probability of B given A is Pr[B|A] = Pr[A∩B] Pr[A]
SLIDE 23
Emptiness..
Suppose I toss 3 balls into 3 bins.
SLIDE 24
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”;
SLIDE 25
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.”
SLIDE 26
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]?
SLIDE 27
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]?
SLIDE 28
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B]
SLIDE 29
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] =
SLIDE 30
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] =
SLIDE 31
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
SLIDE 32
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B]
SLIDE 33
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] =
SLIDE 34
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
SLIDE 35
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B]
SLIDE 36
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B] = Pr[A∩B]
Pr[B]
SLIDE 37
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B] = Pr[A∩B]
Pr[B]
= (1/27)
(8/27) = 1/8;
SLIDE 38
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B] = Pr[A∩B]
Pr[B]
= (1/27)
(8/27) = 1/8; vs. Pr[A] = 8 27.
SLIDE 39
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B] = Pr[A∩B]
Pr[B]
= (1/27)
(8/27) = 1/8; vs. Pr[A] = 8 27.
A is less likely given B:
SLIDE 40
Emptiness..
Suppose I toss 3 balls into 3 bins. A =“1st bin empty”; B =“2nd bin empty.” What is Pr[A|B]? Pr[B] = Pr[{(a,b,c) | a,b,c ∈ {1,3}] = Pr[{1,3}3] = 8
27
Pr[A∩B] = Pr[(3,3,3)] = 1
27
Pr[A|B] = Pr[A∩B]
Pr[B]
= (1/27)
(8/27) = 1/8; vs. Pr[A] = 8 27.
A is less likely given B: If second bin is empty the first is more likely to have balls in it.
SLIDE 41
Outline Conditional Probability
- Mult. Rule
Bayes Rule Independence Takeaway Counting
Three Card Problem
Three cards: Red/Red, Red/Black, Black/Black. Pick one at random and place on the table. The upturned side is a
- Red. What is the probability that the other side is Black?
Can’t be the BB card, so...prob should be 0.5, right? R: upturned card is Red; RB: the Red/Black card was selected. Want P(RB|R). What’s wrong with the reasoning that leads to 1
2?
P(RB|R) = P(RB ∩ R) P(R) =
1 3 1 2 1 3(1) + 1 3 1 2 + 1 3(0)
=
1 6 1 2
= 1 3 Once you are given R: it is twice as likely that the RR card was picked.
4
SLIDE 42
Gambler’s fallacy.
Flip a fair coin 51 times.
SLIDE 43
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads”
SLIDE 44
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads”
SLIDE 45
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ?
SLIDE 46
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH}
SLIDE 47
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH} B ∩A = {HH ···HH}
SLIDE 48
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH} B ∩A = {HH ···HH} Uniform probability space.
SLIDE 49
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH} B ∩A = {HH ···HH} Uniform probability space. Pr[B|A] = |B∩A|
|A|
= 1
2.
SLIDE 50
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH} B ∩A = {HH ···HH} Uniform probability space. Pr[B|A] = |B∩A|
|A|
= 1
2.
Same as Pr[B].
SLIDE 51
Gambler’s fallacy.
Flip a fair coin 51 times. A = “first 50 flips are heads” B = “the 51st is heads” Pr[B|A] ? A = {HH ···HT,HH ···HH} B ∩A = {HH ···HH} Uniform probability space. Pr[B|A] = |B∩A|
|A|
= 1
2.
Same as Pr[B].
The likelihood of 51st heads does not depend on the previous flips.
SLIDE 52
Product Rule
Recall the definition:
SLIDE 53
Product Rule
Recall the definition: Pr[B|A] = Pr[A∩B] Pr[A] .
SLIDE 54
Product Rule
Recall the definition: Pr[B|A] = Pr[A∩B] Pr[A] . Hence, Pr[A∩B] = Pr[A]Pr[B|A].
SLIDE 55
Product Rule
Recall the definition: Pr[B|A] = Pr[A∩B] Pr[A] . Hence, Pr[A∩B] = Pr[A]Pr[B|A]. Consequently, Pr[A∩B ∩C] = Pr[(A∩B)∩C]
SLIDE 56
Product Rule
Recall the definition: Pr[B|A] = Pr[A∩B] Pr[A] . Hence, Pr[A∩B] = Pr[A]Pr[B|A]. Consequently, Pr[A∩B ∩C] = Pr[(A∩B)∩C] = Pr[A∩B]Pr[C|A∩B]
SLIDE 57
Product Rule
Recall the definition: Pr[B|A] = Pr[A∩B] Pr[A] . Hence, Pr[A∩B] = Pr[A]Pr[B|A]. Consequently, Pr[A∩B ∩C] = Pr[(A∩B)∩C] = Pr[A∩B]Pr[C|A∩B] = Pr[A]Pr[B|A]Pr[C|A∩B].
SLIDE 58
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then
SLIDE 59
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1].
SLIDE 60
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof:
SLIDE 61
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction.
SLIDE 62
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction. Assume the result is true for n.
SLIDE 63
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction. Assume the result is true for n. (It holds for n = 2.)
SLIDE 64
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction. Assume the result is true for n. (It holds for n = 2.) Then,
Pr[A1 ∩···∩An ∩An+1] = Pr[A1 ∩···∩An]Pr[An+1|A1 ∩···∩An]
SLIDE 65
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction. Assume the result is true for n. (It holds for n = 2.) Then,
Pr[A1 ∩···∩An ∩An+1] = Pr[A1 ∩···∩An]Pr[An+1|A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]Pr[An+1|A1 ∩···∩An],
SLIDE 66
Product Rule
Theorem Product Rule Let A1,A2,...,An be events. Then Pr[A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]. Proof: By induction. Assume the result is true for n. (It holds for n = 2.) Then,
Pr[A1 ∩···∩An ∩An+1] = Pr[A1 ∩···∩An]Pr[An+1|A1 ∩···∩An] = Pr[A1]Pr[A2|A1]···Pr[An|A1 ∩···∩An−1]Pr[An+1|A1 ∩···∩An],
so that the result holds for n +1.
SLIDE 67
Correlation
An example.
SLIDE 68
Correlation
An example. Random experiment: Pick a person at random.
SLIDE 69
Correlation
An example. Random experiment: Pick a person at random. Event A: the person has lung cancer.
SLIDE 70
Correlation
An example. Random experiment: Pick a person at random. Event A: the person has lung cancer. Event B: the person is a heavy smoker.
SLIDE 71
Correlation
An example. Random experiment: Pick a person at random. Event A: the person has lung cancer. Event B: the person is a heavy smoker. Fact: Pr[A|B] = 1.17×Pr[A].
SLIDE 72
Correlation
An example. Random experiment: Pick a person at random. Event A: the person has lung cancer. Event B: the person is a heavy smoker. Fact: Pr[A|B] = 1.17×Pr[A]. Conclusion:
◮ Smoking increases the probability of lung cancer by 17%.
SLIDE 73
Correlation
An example. Random experiment: Pick a person at random. Event A: the person has lung cancer. Event B: the person is a heavy smoker. Fact: Pr[A|B] = 1.17×Pr[A]. Conclusion:
◮ Smoking increases the probability of lung cancer by 17%. ◮ Smoking causes lung cancer.
SLIDE 74
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A].
SLIDE 75
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look.
SLIDE 76
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A]
SLIDE 77
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A] ⇔ Pr[A∩B] = 1.17×Pr[A]Pr[B]
SLIDE 78
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A] ⇔ Pr[A∩B] = 1.17×Pr[A]Pr[B] ⇔ Pr[B|A] = 1.17×Pr[B].
SLIDE 79
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A] ⇔ Pr[A∩B] = 1.17×Pr[A]Pr[B] ⇔ Pr[B|A] = 1.17×Pr[B]. Conclusion:
◮ Lung cancer increases the probability of smoking by 17%.
SLIDE 80
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A] ⇔ Pr[A∩B] = 1.17×Pr[A]Pr[B] ⇔ Pr[B|A] = 1.17×Pr[B]. Conclusion:
◮ Lung cancer increases the probability of smoking by 17%. ◮ Lung cancer causes smoking.
SLIDE 81
Correlation
Event A: the person has lung cancer. Event B: the person is a heavy smoker. Pr[A|B] = 1.17×Pr[A]. A second look. Note that Pr[A|B] = 1.17×Pr[A] ⇔ Pr[A∩B] Pr[B] = 1.17×Pr[A] ⇔ Pr[A∩B] = 1.17×Pr[A]Pr[B] ⇔ Pr[B|A] = 1.17×Pr[B]. Conclusion:
◮ Lung cancer increases the probability of smoking by 17%. ◮ Lung cancer causes smoking. Really?
SLIDE 82
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B].
SLIDE 83
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.)
SLIDE 84
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A.
SLIDE 85
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich.
SLIDE 86
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich. That does not
mean that poor people should buy a Tesla to get rich.
SLIDE 87
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich. That does not
mean that poor people should buy a Tesla to get rich.
◮ People who go to the opera are more likely to have a good
career.
SLIDE 88
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich. That does not
mean that poor people should buy a Tesla to get rich.
◮ People who go to the opera are more likely to have a good
- career. That does not mean that going to the opera will
improve your career.
SLIDE 89
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich. That does not
mean that poor people should buy a Tesla to get rich.
◮ People who go to the opera are more likely to have a good
- career. That does not mean that going to the opera will
improve your career.
◮ Rabbits eat more carrots and do not wear glasses.
SLIDE 90
Causality vs. Correlation
Events A and B are positively correlated if Pr[A∩B] > Pr[A]Pr[B]. (E.g., smoking and lung cancer.) A and B being positively correlated does not mean that A causes B or that B causes A. Other examples:
◮ Tesla owners are more likely to be rich. That does not
mean that poor people should buy a Tesla to get rich.
◮ People who go to the opera are more likely to have a good
- career. That does not mean that going to the opera will
improve your career.
◮ Rabbits eat more carrots and do not wear glasses. Are
carrots good for eyesight?
SLIDE 91
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN.
SLIDE 92
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B].
SLIDE 93
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B]. Indeed, B is the union of the disjoint sets An ∩B for n = 1,...,N.
SLIDE 94
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Then, Pr[B] = Pr[A1 ∩B]+···+Pr[AN ∩B]. Indeed, B is the union of the disjoint sets An ∩B for n = 1,...,N. Thus, Pr[B] = Pr[A1]Pr[B|A1]+···+Pr[AN]Pr[B|AN].
SLIDE 95
Total probability
Assume that Ω is the union of the disjoint sets A1,...,AN. Pr[B] = Pr[A1]Pr[B|A1]+···+Pr[AN]Pr[B|AN].
SLIDE 96
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise.
SLIDE 97
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads.
SLIDE 98
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair?
SLIDE 99
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis:
SLIDE 100
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,
SLIDE 101
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’
SLIDE 102
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B].
SLIDE 103
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] =
SLIDE 104
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] =
SLIDE 105
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,
SLIDE 106
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] =
SLIDE 107
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2
SLIDE 108
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2 = Pr[¯ A]
SLIDE 109
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2 = Pr[¯ A] Now, Pr[B] = Pr[A∩B]+Pr[¯ A∩B] =
SLIDE 110
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2 = Pr[¯ A] Now, Pr[B] = Pr[A∩B]+Pr[¯ A∩B] = Pr[A]Pr[B|A]+Pr[¯ A]Pr[B|¯ A]
SLIDE 111
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2 = Pr[¯ A] Now, Pr[B] = Pr[A∩B]+Pr[¯ A∩B] = Pr[A]Pr[B|A]+Pr[¯ A]Pr[B|¯ A] = (1/2)(1/2)+(1/2)0.6 = 0.55.
SLIDE 112
Is your coin loaded?
Your coin is fair w.p. 1/2 or such that Pr[H] = 0.6, otherwise. You flip your coin and it yields heads. What is the probability that it is fair? Analysis: A = ‘coin is fair’,B = ‘outcome is heads’ We want to calculate P[A|B]. We know P[B|A] = 1/2,P[B|¯ A] = 0.6,Pr[A] = 1/2 = Pr[¯ A] Now, Pr[B] = Pr[A∩B]+Pr[¯ A∩B] = Pr[A]Pr[B|A]+Pr[¯ A]Pr[B|¯ A] = (1/2)(1/2)+(1/2)0.6 = 0.55. Thus, Pr[A|B] = Pr[A]Pr[B|A] Pr[B] = (1/2)(1/2) (1/2)(1/2)+(1/2)0.6 ≈ 0.45.
SLIDE 113
Is your coin loaded?
A picture:
SLIDE 114
Is your coin loaded?
A picture:
SLIDE 115
Is your coin loaded?
A picture: Imagine 100 situations, among which m := 100(1/2)(1/2) are such that A and B occur and n := 100(1/2)(0.6) are such that ¯ A and B occur.
SLIDE 116
Is your coin loaded?
A picture: Imagine 100 situations, among which m := 100(1/2)(1/2) are such that A and B occur and n := 100(1/2)(0.6) are such that ¯ A and B occur. Thus, among the m +n situations where B occurred, there are m where A occurred.
SLIDE 117
Is your coin loaded?
A picture: Imagine 100 situations, among which m := 100(1/2)(1/2) are such that A and B occur and n := 100(1/2)(0.6) are such that ¯ A and B occur. Thus, among the m +n situations where B occurred, there are m where A occurred. Hence, Pr[A|B] = m m +n = (1/2)(1/2) (1/2)(1/2)+(1/2)0.6.
SLIDE 118
Independence
Definition: Two events A and B are independent if
SLIDE 119
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B].
SLIDE 120
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
SLIDE 121
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are
SLIDE 122
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
SLIDE 123
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are
SLIDE 124
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are not independent;
SLIDE 125
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are not independent;
◮ When flipping coins, A = coin 1 yields heads and B = coin
2 yields tails are
SLIDE 126
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are not independent;
◮ When flipping coins, A = coin 1 yields heads and B = coin
2 yields tails are independent;
SLIDE 127
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are not independent;
◮ When flipping coins, A = coin 1 yields heads and B = coin
2 yields tails are independent;
◮ When throwing 3 balls into 3 bins, A = bin 1 is empty and
B = bin 2 is empty are
SLIDE 128
Independence
Definition: Two events A and B are independent if Pr[A∩B] = Pr[A]Pr[B]. Examples:
◮ When rolling two dice, A = sum is 7 and B = red die is 1
are independent;
◮ When rolling two dice, A = sum is 3 and B = red die is 1
are not independent;
◮ When flipping coins, A = coin 1 yields heads and B = coin
2 yields tails are independent;
◮ When throwing 3 balls into 3 bins, A = bin 1 is empty and
B = bin 2 is empty are not independent;
SLIDE 129
Independence and conditional probability
Fact: Two events A and B are independent if and only if
SLIDE 130
Independence and conditional probability
Fact: Two events A and B are independent if and only if Pr[A|B] = Pr[A].
SLIDE 131
Independence and conditional probability
Fact: Two events A and B are independent if and only if Pr[A|B] = Pr[A]. Indeed:
SLIDE 132
Independence and conditional probability
Fact: Two events A and B are independent if and only if Pr[A|B] = Pr[A]. Indeed: Pr[A|B] = Pr[A∩B]
Pr[B] , so that
SLIDE 133
Independence and conditional probability
Fact: Two events A and B are independent if and only if Pr[A|B] = Pr[A]. Indeed: Pr[A|B] = Pr[A∩B]
Pr[B] , so that
Pr[A|B] = Pr[A] ⇔ Pr[A∩B] Pr[B] = Pr[A]
SLIDE 134
Independence and conditional probability
Fact: Two events A and B are independent if and only if Pr[A|B] = Pr[A]. Indeed: Pr[A|B] = Pr[A∩B]
Pr[B] , so that
Pr[A|B] = Pr[A] ⇔ Pr[A∩B] Pr[B] = Pr[A] ⇔ Pr[A∩B] = Pr[A]Pr[B].
SLIDE 135
Bayes Rule
Another picture: We imagine that there are N possible causes A1,...,AN.
SLIDE 136
Bayes Rule
Another picture: We imagine that there are N possible causes A1,...,AN.
SLIDE 137
Bayes Rule
Another picture: We imagine that there are N possible causes A1,...,AN. Imagine 100 situations, among which 100pnqn are such that An and B occur, for n = 1,...,N. Thus, among the 100∑m pmqm situations where B occurred, there are 100pnqn where An occurred.
SLIDE 138
Bayes Rule
Another picture: We imagine that there are N possible causes A1,...,AN. Imagine 100 situations, among which 100pnqn are such that An and B occur, for n = 1,...,N. Thus, among the 100∑m pmqm situations where B occurred, there are 100pnqn where An occurred. Hence, Pr[An|B] = pnqn ∑m pmqm .
SLIDE 139
Why do you have a fever?
SLIDE 140
Why do you have a fever?
Using Bayes’ rule, we find
SLIDE 141
Why do you have a fever?
Using Bayes’ rule, we find Pr[Flu|High Fever] = 0.15×0.80 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.58
SLIDE 142
Why do you have a fever?
Using Bayes’ rule, we find Pr[Flu|High Fever] = 0.15×0.80 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.58 Pr[Ebola|High Fever] = 10−8 ×1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 5×10−8
SLIDE 143
Why do you have a fever?
Using Bayes’ rule, we find Pr[Flu|High Fever] = 0.15×0.80 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.58 Pr[Ebola|High Fever] = 10−8 ×1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 5×10−8 Pr[Other|High Fever] = 0.85×0.1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.42
SLIDE 144
Why do you have a fever?
Using Bayes’ rule, we find Pr[Flu|High Fever] = 0.15×0.80 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.58 Pr[Ebola|High Fever] = 10−8 ×1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 5×10−8 Pr[Other|High Fever] = 0.85×0.1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.42 These are the posterior probabilities.
SLIDE 145
Why do you have a fever?
Using Bayes’ rule, we find Pr[Flu|High Fever] = 0.15×0.80 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.58 Pr[Ebola|High Fever] = 10−8 ×1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 5×10−8 Pr[Other|High Fever] = 0.85×0.1 0.15×0.80+10−8 ×1+0.85×0.1 ≈ 0.42 These are the posterior probabilities. One says that ‘Flu’ is the Most Likely a Posteriori (MAP) cause of the high fever.
SLIDE 146
Bayes’ Rule Operations
SLIDE 147
Bayes’ Rule Operations
SLIDE 148
Bayes’ Rule Operations
Bayes’ Rule is the canonical example of how information changes our opinions.
SLIDE 149
Thomas Bayes
Source: Wikipedia.
SLIDE 150
Thomas Bayes
A Bayesian picture of Thomas Bayes.
SLIDE 151
Testing for disease.
Let’s watch TV!!
SLIDE 152
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male.
SLIDE 153
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease)
SLIDE 154
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease) A - prostate cancer. B - positive PSA test.
SLIDE 155
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease) A - prostate cancer. B - positive PSA test.
◮ Pr[A] = 0.0016, (.16 % of the male population is affected.) ◮ Pr[B|A] = 0.80 (80% chance of positive test with disease.) ◮ Pr[B|A] = 0.10 (10% chance of positive test without
disease.)
SLIDE 156
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease) A - prostate cancer. B - positive PSA test.
◮ Pr[A] = 0.0016, (.16 % of the male population is affected.) ◮ Pr[B|A] = 0.80 (80% chance of positive test with disease.) ◮ Pr[B|A] = 0.10 (10% chance of positive test without
disease.) From http://www.cpcn.org/01 psa tests.htm and http://seer.cancer.gov/statfacts/html/prost.html (10/12/2011.)
SLIDE 157
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease) A - prostate cancer. B - positive PSA test.
◮ Pr[A] = 0.0016, (.16 % of the male population is affected.) ◮ Pr[B|A] = 0.80 (80% chance of positive test with disease.) ◮ Pr[B|A] = 0.10 (10% chance of positive test without
disease.) From http://www.cpcn.org/01 psa tests.htm and http://seer.cancer.gov/statfacts/html/prost.html (10/12/2011.) Positive PSA test (B). Do I have disease?
SLIDE 158
Testing for disease.
Let’s watch TV!! Random Experiment: Pick a random male. Outcomes: (test,disease) A - prostate cancer. B - positive PSA test.
◮ Pr[A] = 0.0016, (.16 % of the male population is affected.) ◮ Pr[B|A] = 0.80 (80% chance of positive test with disease.) ◮ Pr[B|A] = 0.10 (10% chance of positive test without
disease.) From http://www.cpcn.org/01 psa tests.htm and http://seer.cancer.gov/statfacts/html/prost.html (10/12/2011.) Positive PSA test (B). Do I have disease? Pr[A|B]???
SLIDE 159
Bayes Rule.
SLIDE 160
Bayes Rule.
Using Bayes’ rule, we find
SLIDE 161
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10
SLIDE 162
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013.
SLIDE 163
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013. A 1.3% chance of prostate cancer with a positive PSA test.
SLIDE 164
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013. A 1.3% chance of prostate cancer with a positive PSA test. Surgery anyone?
SLIDE 165
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013. A 1.3% chance of prostate cancer with a positive PSA test. Surgery anyone? Impotence...
SLIDE 166
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013. A 1.3% chance of prostate cancer with a positive PSA test. Surgery anyone? Impotence... Incontinence..
SLIDE 167
Bayes Rule.
Using Bayes’ rule, we find P[A|B] = 0.0016×0.80 0.0016×0.80+0.9984×0.10 = .013. A 1.3% chance of prostate cancer with a positive PSA test. Surgery anyone? Impotence... Incontinence.. Death.
SLIDE 168
Summary
Events, Conditional Probability, Independence, Bayes’ Rule
SLIDE 169
Summary
Events, Conditional Probability, Independence, Bayes’ Rule Key Ideas:
◮ Conditional Probability:
Pr[A|B] = Pr[A∩B]
Pr[B]
SLIDE 170
Summary
Events, Conditional Probability, Independence, Bayes’ Rule Key Ideas:
◮ Conditional Probability:
Pr[A|B] = Pr[A∩B]
Pr[B] ◮ Independence: Pr[A∩B] = Pr[A]Pr[B].
SLIDE 171
Summary
Events, Conditional Probability, Independence, Bayes’ Rule Key Ideas:
◮ Conditional Probability:
Pr[A|B] = Pr[A∩B]
Pr[B] ◮ Independence: Pr[A∩B] = Pr[A]Pr[B]. ◮ Bayes’ Rule:
Pr[An|B] = Pr[An]Pr[B|An] ∑m Pr[Am]Pr[B|Am].
SLIDE 172
Summary
Events, Conditional Probability, Independence, Bayes’ Rule Key Ideas:
◮ Conditional Probability:
Pr[A|B] = Pr[A∩B]
Pr[B] ◮ Independence: Pr[A∩B] = Pr[A]Pr[B]. ◮ Bayes’ Rule:
Pr[An|B] = Pr[An]Pr[B|An] ∑m Pr[Am]Pr[B|Am]. Pr[An|B] = posterior probability;Pr[An] = prior probability .
SLIDE 173