Docsity

4. Conditional Probability, Schemes and Mind Maps of Probability and Statistics

Partial preview of the text

Download 4. Conditional Probability and more Schemes and Mind Maps Probability and Statistics in PDF only on Docsity!

4. Conditional Probability

BT 1.3, 1.

CSE 312

Spring 2015

W.L. Ruzzo

P( )

conditional probability - intuition Roll one fair die. What is the probability that the outcome is 5? 1/6 (5 is one of 6 equally likely outcomes) What is the probability that the outcome is 5 given that the outcome is an even number? 0 (5 isn’t even) What is the probability that the outcome is 5 given that the outcome is an odd number? 1/3 (3 odd outcomes are equally likely; 5 is one of them) Formal definitions and derivations below

dice Roll one fair die. What is the probability that the outcome is 5 given that it’s odd? E = {5} event that roll is 5 F = {1, 3, 5} event that roll is odd Way 1 (from counting): P(E | F) = |EF| / |F| = |E| / |F| = 1/ Way 2 (from probabilities): P(E | F) = P(EF) / P(F) = P(E) / P(F) = (1/6) / (1/2) = 1/ Way 3 (from restricted sample space): All outcomes are equally likely. Knowing F occurred doesn’t distort relative likelihoods of outcomes within F, so they remain equally likely. There are only 3 of them, one being E, so P(E | F) = 1/

dice Roll a fair die. What is the probability that the outcome is 5? E = {5} (event that roll is 5) S = {1,2, 3, 4, 5, 6} sample space P(E) = |E| / |S| = 1/ 6 What is the prob. that the outcome is 5 given that it’s even? G = {2, 4, 6} Way 1 (counting): P(E | G) = |EG| / |G| = |∅| / |G| = 0/3 = 0 Way 2 (probabilities): P(E | G) = P(EG) / P(G) = P(∅) / P(G) = (0) / (1/2) = 0 Way 3 (restricted sample space): Outcomes are equally likely. Knowing G occurred doesn’t distort relative likelihoods of outcomes within G; they remain equally likely. There are 3 of them, none being E, so P(E | G) = 0/

slicing up the spam

slicing up the spam

24 emails are sent, 6 each to 4 users.

10 of the 24 emails are spam.

All possible outcomes equally likely.

E = user #1 receives 3 spam emails

What is P(E)?

slicing up the spam

24 emails are sent, 6 each to 4 users.

10 of the 24 emails are spam.

All possible outcomes equally likely

E = user #1 receives 3 spam emails

F = user #2 receives 6 spam emails

G = user #3 receives 5 spam emails

What is P(G|F)?

= 0

conditional probability - general definition

General defn: where P(F) > 0

Holds even when outcomes are not equally likely.

Example: S = {# of heads in 2 coin flips} = {0, 1, 2}

NOT equally likely outcomes: P(0)=P(2)=1/4, P(1)=1/

Q. What is prob of 2 heads (E) given at least 1 head (F)?

A. P(EF)/P(F) = P(E)/P(F) = (1/4)/(1/4+1/2) = 1/

Same as earlier formulation of this example (of course!)

chain rule example - piling cards

piling cards Deck of 52 cards randomly divided into 4 piles 13 cards per pile Compute P(each pile contains an ace) Solution: E 1 = { in any one pile } E 2 = { & in different piles } E 3 = { in different piles } E 4 = { all four aces in different piles } Compute P(E 1

E

2

E

3

E

4

E

1 = { in any one pile } E 2 = { & in different piles } E 3 = { in different piles } E 4 = { all four aces in different piles } P(E 1 E 2 E 3 E 4 ) = P(E 1 ) P(E 2 |E 1 ) P(E 3 |E 1 E 2 ) P(E 4 |E 1 E 2 E 3 ) P(E 1 ) = 52/52 = 1 (A♥ can go anywhere) P(E 2 |E 1 ) = 39/51 (39 of 51 slots not in A♥ pile) P(E 3 |E 1 E 2 ) = 26/50 (26 not in A♥, A♠ piles) P(E 4 |E 1 E 2 E 3 ) = 13/49 (13 not in A♥, A♠, A♦ piles) piling cards A conceptual trick: what’s randomized? a) randomize cards, deal sequentially into 4 piles b) sort cards, aces first, deal randomly into empty slots among 4 piles.

piling cards E 1 = { in any one pile } E 2 = { & in different piles } E 3 = { in different piles } E 4 = { all four aces in different piles } P(E 1

E

2

E

3

E

4

= P(E

1

) P(E

2

|E

1

) P(E

3

|E

1

E

2

) P(E

4

|E

1

E

2

E

3

sending bit strings

sending bit strings Bit string with m 1’s and n 0’s sent on the network All distinct arrangements of bits equally likely E = first bit received is a 0 F = k of first r bits received are 0’s What’s P(E|F)? Solution 1 (“restricted sample space”): Observe: P(E|F) = P(picking one of k 0’s out of r bits) So: P(E|F) = k/r