Probability 2

89
Probability 2

description

Probability 2. Area of a Square. 100%. Area of Green Square (X). X = 25%. Area of NOT-X. ~X = 75%. Formula. Area(~X) = 1 – Area(X). Area of X. X = 25%. Area of A. X = 25%. A = 25%. Area of X v A. X = 25%. 50%. A = 25%. Formula. If X and A are non-overlapping, then - PowerPoint PPT Presentation

Transcript of Probability 2

Page 1: Probability 2

Probability 2

Page 2: Probability 2

Area of a Square

100%

Page 3: Probability 2

Area of Green Square (X)

X = 25%

Page 4: Probability 2

Area of NOT-X

~X = 75%

Page 5: Probability 2

Formula

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

Page 6: Probability 2

Area of X

X = 25%

Page 7: Probability 2

Area of A

X = 25%

A = 25%

Page 8: Probability 2

Area of X v A

X = 25%

A = 25%

50%

Page 9: Probability 2

Formula

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

Page 10: Probability 2

Area of Y

Y = 50%

Page 11: Probability 2

Area of Z

Z = 50%

Page 12: Probability 2

Area of Y or Z

Y v Z = 75%

Page 13: Probability 2

Formula

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

Page 14: Probability 2

Area of Y & Z

Y & Z = 25%

Page 15: Probability 2

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.

Page 16: Probability 2

Formula

If Y and Z are independent, thenArea(Y & Z) = Area(Y) x Area(Z)

Page 17: Probability 2

Area of Z

Z = 50%

Page 18: Probability 2

Area of B

50%

Page 19: Probability 2

Area of B v Z

62.5%

Page 20: Probability 2

Area(Z & B)

Z & B = 37.5%

Page 21: Probability 2

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.

Page 22: Probability 2

Formula

Area(B & Z) = Area(B) x Area(Z/ B)

This is the percentage of B that is in Z: 75%

Page 23: Probability 2

Area(Z & B)

Z & B = 37.5%

Page 24: Probability 2

Area(Z & B)

Z & B = 37.5% Z = 50%

Page 25: Probability 2

Conditional Areas

Area(Z/ B) = Area(Z & B) ÷ Area (B)= 37.5% ÷ 50%

= 75%

Page 26: Probability 2

Formula

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

= 37.5%

Page 27: Probability 2

Area(Z & B)

Z & B = 37.5%

Page 28: Probability 2

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 QArea(P & Q) = Area(P) x Area(Q/ P)

Area(P & Q) = Area(P) x Area(Q) for independent P and Q

Page 29: Probability 2

Rules

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 30: Probability 2

In-Class Exercises

Page 31: Probability 2

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)?

Page 32: Probability 2

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

Unknown: Pr(P v Q)

Page 33: Probability 2

Rules

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 34: Probability 2

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

Page 35: Probability 2

Known: Pr(R) = 1/2 Known: Pr(S) = 1/4 Known: Pr(R v S) = 3/4

Unknown: Pr(R & S)?

Page 36: Probability 2

Not Helpful: More than One Unknown

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 37: Probability 2

This Is What You Want

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 38: Probability 2

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

Page 39: Probability 2

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

Unknown: Pr(U v ~T)?

Page 40: Probability 2

Rules

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 41: Probability 2

Pr(~T)

Pr(~φ) = 1 – Pr(φ)

Pr(~T) = 1 – Pr(T) = 1 – 3/4 = 1/4

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

Page 42: Probability 2

Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

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

Page 43: Probability 2

Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

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

Page 44: Probability 2

Pr(U v ψ) = Pr(U) + Pr(ψ) – Pr(U & ψ)

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

Page 45: Probability 2

Pr(U v ψ) = Pr(U) + Pr(ψ) – Pr(U & ψ)

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

Page 46: Probability 2

Pr(U v ~T) = Pr(U) + Pr(~T) – Pr(U & ~T)

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

Page 47: Probability 2

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/2Known: Pr(T) = 3/4 Known: Pr(U & ~T) = 1/8Known: Pr(~T) = 1/4

Page 48: Probability 2

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?

Page 49: Probability 2

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/2Known: Pr(S) = 1/2Known: Pr(T) = 1/2

Unknown: Pr((F & S) & T)

Page 50: Probability 2

Rules

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 51: Probability 2

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

Page 52: Probability 2

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/2Known: Pr(S) = 1/2Known: Pr(T) = 1/2Known: Pr(L) = 1/2

Unknown: Pr((~F & ~S) & (~T & ~L))

Page 53: Probability 2

Rules

Pr(~φ) = 1 – Pr(φ)Pr(φ v ψ) = Pr(φ) + Pr(ψ) – Pr(φ & ψ)

Pr(φ v ψ) = Pr(φ) + Pr(ψ) when φ and ψ are mutually exclusivePr(φ & ψ) = Pr(φ) x Pr(ψ/ φ)

Pr(φ & ψ) = Pr(φ) x Pr(ψ) when φ and ψ are independent

Page 54: Probability 2

Using ~ Rule

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

Page 55: Probability 2

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

Page 56: Probability 2

Conditional Probability

Page 57: Probability 2

Area of P

P = 50%

Page 58: Probability 2

Area of Q

Q = 50%

Page 59: Probability 2

Area(P & Q)

P & Q = 37.5%

Page 60: Probability 2

Area(P & Q) out of Area(Q)

P & Q = 75%

Page 61: Probability 2

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)

Page 62: Probability 2

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)

Page 63: Probability 2

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%

Page 64: Probability 2

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%.

Page 65: Probability 2

Coin Flips

First SecondHeads HeadsHeads TailsTails HeadsTails Tails

Page 66: Probability 2

Coin Flips

Assuming nothing, what is the probability that both coins land heads?

Pr(F & S) = ?

Page 67: Probability 2

Pr(F & S) = 1/4

First SecondHeads HeadsHeads TailsTails HeadsTails Tails

Page 68: Probability 2

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%

Page 69: Probability 2

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) = ?

Page 70: Probability 2

Ignore the Possibilities with No Heads

First SecondHeads HeadsHeads TailsTails HeadsTails Tails

Page 71: Probability 2

Pr(F & S/ F v S) = 1/3

First SecondHeads HeadsHeads TailsTails Heads

Page 72: Probability 2

How Did We Calculate That?

Pr(F & S/ F v S) = = = = 1/3Pr((F & S) & (F v S))Pr(F v S)

Pr(F& S)Pr(F v S)

25%75%

Page 73: Probability 2

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) = ?

Page 74: Probability 2

Ignore Possibilities Where First Is Not Heads

First SecondHeads HeadsHeads TailsTails HeadsTails Tails

Page 75: Probability 2

Pr(F & S/ F) = 50%

First SecondHeads HeadsHeads Tails

Page 76: Probability 2

How Did We Calculate That?

Pr(F & S/ F) = = = = 1/2Pr((F & S) & F)Pr(F)

Pr(F& S)Pr(F)

25%50%

Page 77: Probability 2

Bayes’ Theorem

Page 78: Probability 2

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(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)

Page 79: Probability 2

Bayes’ Theorem

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

Page 80: Probability 2

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.

Page 81: Probability 2

Base Rate Fallacy

• There are ½ million people in Russia are affected by HIV/ AIDS.

• There are 150 million people in Russia.

Page 82: Probability 2

Base Rate Fallacy

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

Page 83: Probability 2

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)

Page 84: Probability 2

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)

Page 85: Probability 2

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)

Page 86: Probability 2

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

Unknown: Pr(positive)Unknown: Pr(sick/ positive)

Page 87: Probability 2

Pr(positive)

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/300Known: Pr(positive/ sick) = 95%Known: Pr(positive/ not-sick) = 5%

Page 88: Probability 2

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

Unknown: Pr(sick/ positive)

Page 89: Probability 2

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%