Presentation is loading. Please wait.

Presentation is loading. Please wait.

Probability 2. Area of a Square 100% Area of Green Square (X) X = 25%

Similar presentations


Presentation on theme: "Probability 2. Area of a Square 100% Area of Green Square (X) X = 25%"— Presentation transcript:

1 Probability 2

2 Area of a Square 100%

3 Area of Green Square (X) X = 25%

4 Area of NOT-X ~X = 75%

5 Formula Area(~X) = 1 – Area(X)

6 Area of X X = 25%

7 Area of A X = 25% A = 25%

8 Area of X v A X = 25% A = 25% 50%

9 Formula If X and A are non-overlapping, then Area(X v A) = Area(X) + Area(A)

10 Area of Y Y = 50%

11 Area of Z Z = 50%

12 Area of Y or Z Y v Z = 75%

13 Formula Area(Y v Z) = Area(Y) + Area(Z) – Area(Y & Z)

14 Area of Y & Z Y & Z = 25%

15 Independence Y and Z are independent: knowing that a point is in Y does not increase the probability that it’s in Z, because half of the points in Y are in Z and half are not.

16 Formula If Y and Z are independent, then Area(Y & Z) = Area(Y) x Area(Z)

17 Area of Z Z = 50%

18 Area of B 50%

19 Area of B v Z 62.5%

20 Area(Z & B) Z & B = 37.5%

21 Correlated Areas B and Z are not independent. 75% of the points in Z are also in B. If you know that a point is in Z, then it is a good guess that it’s in B too.

22 Formula Area(B & Z) = Area(B) x Area(Z/ B) This is the percentage of B that is in Z: 75%

23 Area(Z & B) Z & B = 37.5%

24 Area(Z & B) Z & B = 37.5% Z = 50%

25 Conditional Areas Area(Z/ B) = Area(Z & B) ÷ Area (B) = 37.5% ÷ 50% = 75%

26 Formula Area(B & Z) = Area(B) x Area(Z/ B) = 50% x 75% = 37.5%

27 Area(Z & B) Z & B = 37.5%

28 Rules Area(~P) = 1 – Area(P) Area(P v Q) = Area(P) + Area(Q) – Area(P & Q) Area(P v Q) = Area(P) + Area(Q) for non-overlapping P and Q Area(P & Q) = Area(P) x Area(Q/ P) Area(P & Q) = Area(P) x Area(Q) for independent P and Q

29 Rules Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

30 In-Class Exercises

31 1. Pr(P) = 1/2, Pr(Q) = 1/2, Pr(P & Q) = 1/8, what is Pr(P v Q)? 2. Pr(R) = 1/2, Pr(S) = 1/4, Pr(R v S) = 3/4, what is Pr(R & S)? 3. Pr(U) = 1/2, Pr(T) = 3/4, Pr(U & ~T) = 1/8, what is Pr(U v ~T)?

32 Known: Pr(P) = 1/2, Known: Pr(Q) = 1/2, Known: Pr(P & Q) = 1/8 Unknown: Pr(P v Q)

33 Rules Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

34 Pr(P v Q) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(P v Q) = Pr(P) + Pr(Q) – Pr(P & Q) = 1/2 + Pr(Q) – Pr(P & Q) = 1/2 + 1/2 – Pr(P & Q) = 1/2 + 1/2 – 1/8 = 7/8 Known: Pr(P) = 1/2, Known: Pr(Q) = 1/2, Known: Pr(P & Q) = 1/8

35 Known: Pr(R) = 1/2 Known: Pr(S) = 1/4 Known: Pr(R v S) = 3/4 Unknown: Pr(R & S)?

36 Not Helpful: More than One Unknown Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

37 This Is What You Want Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

38 Pr(R & S) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(R v S) = Pr(R) + Pr(S) – Pr(R & S) 3/4 = Pr(R) + Pr(S) – Pr(R & S) 3/4 = 1/2 + Pr(S) – Pr(R & S) 3/4 = 1/2 + 1/4 – Pr(R & S) 3/4 = 3/4 – Pr(R & S) Known: Pr(R) = 1/2 Known: Pr(S) = 1/4 Known: Pr(R v S) = 3/4

39 Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Unknown: Pr(U v ~T)?

40 Rules Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

41 Pr(~T) Pr(~φ) = 1 – Pr(φ) Pr(~T) = 1 – Pr(T) = 1 – 3/4 = 1/4 Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

42 Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

43 Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

44 Pr(U v ψ) = Pr(U) + Pr(ψ) – Pr(U & ψ) Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

45 Pr(U v ψ) = Pr(U) + Pr(ψ) – Pr(U & ψ) Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

46 Pr(U v ~T) = Pr(U) + Pr(~T) – Pr(U & ~T) Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

47 Pr(U v ~T) Pr(U v ~T) = Pr(U) + Pr(~T) – Pr(U & ~T) = 1/2 + Pr(~T) – Pr(U & ~T) = 1/2 + 1/4 – Pr(U & ~T) = 1/2 + 1/4 – 1/8 = 5/8 Known: Pr(U) = 1/2 Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8 Known: Pr(~T) = 1/4

48 More Exercises 4. Suppose I flip a fair coin three times in a row. What is the probability that it lands heads all three times? 5. Suppose I flip a fair coin four times in a row. What is the probability that it does not land heads on any of the flips?

49 Problem #4 4. Suppose I flip a fair coin three times in a row. What is the probability that it lands heads all three times? Known: Pr(F) = 1/2 Known: Pr(S) = 1/2 Known: Pr(T) = 1/2 Unknown: Pr((F & S) & T)

50 Rules Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

51 Pr((F & S) & T) Pr(φ & ψ) = Pr(φ) x Pr(ψ) Pr((F & S) & T) = Pr(F & S) x Pr(T) = Pr(F) x Pr(S) x Pr(T) = 1/2 x 1/2 x 1/2 = 1/8

52 Problem #5 5. Suppose I flip a fair coin four times in a row. What is the probability that it does not land heads on any of the flips? Known: Pr(F) = 1/2 Known: Pr(S) = 1/2 Known: Pr(T) = 1/2 Known: Pr(L) = 1/2 Unknown: Pr((~F & ~S) & (~T & ~L))

53 Rules Pr(~φ) = 1 – Pr(φ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ) Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusive Pr(φ & ψ) = Pr(φ) x Pr(ψ/ φ) Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

54 Using ~ Rule Pr(~F) = 1 – 1/2 = 1/2 Pr(~S) = 1 – 1/2 = 1/2 Pr(~T) = 1 – 1/2 = 1/2 Pr(~L) = 1 – 1/2 = 1/2

55 Pr((~F & ~S) & (~T & ~F)) Pr(φ & ψ) = Pr(φ) x Pr(ψ) Pr((~F & ~S) & (~T & ~F)) = Pr(~F & ~S) x Pr(~T & ~F) = Pr(~F) x Pr(~S) x Pr(~T & ~F) = Pr(~F) x Pr(~S) x Pr(~T) x Pr(~F) = 1/2 x 1/2 x 1/2 x 1/2 = 1/16

56 Conditional Probability

57 Area of P P = 50%

58 Area of Q Q = 50%

59 Area(P & Q) P & Q = 37.5%

60 Area(P & Q) out of Area(Q) P & Q = 75%

61 Conditional Areas Area(P/ Q) means: the percentage of (P & Q) points out of all Q-points. Area(P/ Q) = Area(P & Q) Area(Q)

62 Conditional Probabilities Pr(P/ Q) means: the percentage of (P & Q) possibilities out of all Q- possibilities. Pr(P/ Q) = Pr(P & Q) Pr(Q)

63 Probabilistic Generalizations Our probabilistic generalizations usually express conditional probabilities: 90% of bankers are rich ≠ the probability of someone being rich is 90% ≠ the probability of someone being a banker is 90% ≠ the probability of someone being a rich banker is 90% = the probability of someone being rich assuming that they are a banker is 90%

64 Coin Flips Suppose I flip a coin twice. The probability that it will land heads on the first flip is 50%. The probability that it will land heads on the second flip is 50%.

65 Coin Flips FirstSecond Heads Tails Heads Tails

66 Coin Flips Assuming nothing, what is the probability that both coins land heads? Pr(F & S) = ?

67 Pr(F & S) = 1/4 FirstSecond Heads Tails Heads Tails

68 How Did We Calculate That? Since two coin flips are independent, we know: Pr(F v S) = Pr(F) x Pr(S) = 50% x 50% = 25%

69 Coin Flips Assuming that one of the coin flips lands heads, what is the probability that the other one also lands heads? Pr(F & S/ F v S) = ?

70 Ignore the Possibilities with No Heads FirstSecond Heads Tails Heads Tails

71 Pr(F & S/ F v S) = 1/3 FirstSecond Heads Tails Heads

72 How Did We Calculate That? Pr(F & S/ F v S) = = = = 1/3 Pr((F & S) & (F v S)) Pr(F v S) Pr(F& S) Pr(F v S) 25% 75%

73 Coin Flips Assuming that the first coin flip lands heads, what is the probability that the other one also lands heads? Pr(F & S/ F) = ?

74 Ignore Possibilities Where First Is Not Heads FirstSecond Heads Tails Heads Tails

75 Pr(F & S/ F) = 50% FirstSecond Heads Tails

76 How Did We Calculate That? Pr(F & S/ F) = = = = 1/2 Pr((F & S) & F) Pr(F) Pr(F& S) Pr(F) 25% 50%

77 Bayes’ Theorem

78 Simple Algebra Pr(B/ A) = Pr(B & A) ÷ Pr(A) Pr(A) x Pr(B/ A) = [Pr(A) x Pr(B & A)] ÷ Pr(A) Pr(A) x Pr(B/ A) = Pr(B & A) Pr(A & B) = Pr(B/ A) x Pr(A)

79 Bayes’ Theorem Pr(A/ B) = Pr(A & B) ÷ Pr(B) Pr(A/ B) = [Pr(B/ A) x Pr(A)] ÷ Pr(B)

80 Bayes’ Theorem Baye’s theorem lets us calculate the probability of A conditional on B when we have the probability of B conditional on A.

81 Base Rate Fallacy There are ½ million people in Russia are affected by HIV/ AIDS. There are 150 million people in Russia.

82 Base Rate Fallacy Imagine that the government decides this is bad and that they should test everyone for HIV/ AIDS.

83 The Test If someone has HIV/ AIDS, then : 95% of the time the test will be positive (correct) 5% of the time will it be negative (incorrect)

84 The Test If someone does not have HIV/ AIDS, then: 95% of the time the test will be negative (correct) 5% of the time will it be positive (incorrect)

85 Suppose you test positive. We’re interested in the conditional probability: what is the probability you have HIV assuming that you test positive. We’re interested in Pr(HIV = yes/ test = pos)

86 Known: Pr(sick) = 1/300 Known: Pr(positive/ sick) = 95% Known: Pr(positive/ not-sick) = 5% Unknown: Pr(positive) Unknown: Pr(sick/ positive)

87 Pr(positive) = True positives + false positives = [Pr(positive/ sick) x Pr(sick)] + [Pr(positive/ not-sick) x Pr(not-sick)] = [95% x 1/300] + [5% x 299/300] = 5.3% Known: Pr(sick) = 1/300 Known: Pr(positive/ sick) = 95% Known: Pr(positive/ not-sick) = 5%

88 Known: Pr(sick) = 1/300 Known: Pr(positive/ sick) = 95% Known: Pr(positive) = 5.3% Unknown: Pr(sick/ positive)

89 Pr(sick/ positive) Pr(A/ B) = [Pr(B/ A) x Pr(A)] ÷ Pr(B) Pr(sick/ positive) = [Pr(positive/ sick) x Pr(sick)] ÷ Pr(positive) = [95% x Pr(sick)] ÷ Pr(positive) = [95% x 1/300] ÷ Pr(positive) = [95% x 1/300] ÷ 5.3% = 5.975% Known: Pr(sick) = 1/300 Known: Pr(positive/ sick) = 95% Known: Pr(positive) = 5.3%


Download ppt "Probability 2. Area of a Square 100% Area of Green Square (X) X = 25%"

Similar presentations


Ads by Google