ECE 302: Lecture 2.6 Bayes and Total

Prof Stanley Chan

School of Electrical and Computer Engineering Purdue University

©Stanley Chan 2020. All Rights Reserved. 1 / 1 Outline

2.1 Set theory 2.2 2.3 Axioms of probability 2.4 2.5 Independence 2.6 Bayes theorem 2.6.1 Prisoner’s Dilemma 2.6.2 Bayes Theorem and Law of Total Probability 2.6.3 Examples

©Stanley Chan 2020. All Rights Reserved. 2 / 1 Prisoner’s Dilemma

Three Prisoners: A, B, C. The King decides to release 2 and sentence 1. You were A. Your chance of release is 2/3. Suppose you know the guard well. You can ask him about which of B or C will be released. But if you find out B (or C) is released, your chance becomes 1/2. How come!!

©Stanley Chan 2020. All Rights Reserved. 3 / 1 Conditional Probability

XA = sentence A, XB = sentence B, XC = sentence C. GB = guard says B is released.

Let us find the : P[XA], P[XB ], P[XC ]

©Stanley Chan 2020. All Rights Reserved. 4 / 1 Conditional Probability

XA = sentence A, XB = sentence B, XC = sentence C. GB = guard says B is released.

Let us find the probabilities: P[GB | XA], P[GB | XB ], P[GB | XC ]

©Stanley Chan 2020. All Rights Reserved. 5 / 1 Stuck...

P[XA | GB ] =

©Stanley Chan 2020. All Rights Reserved. 6 / 1 Outline

2.1 Set theory 2.2 Probability space 2.3 Axioms of probability 2.4 Conditional probability 2.5 Independence 2.6 Bayes theorem 2.6.1 Prisoner’s Dilemma 2.6.2 Bayes Theorem and Law of Total Probability 2.6.3 Examples

©Stanley Chan 2020. All Rights Reserved. 7 / 1 Bayes Theorem

Theorem (Bayes Theorem) For any two events A and B such that P[A] > 0 and P[B] > 0, it holds that P[B | A] P[A] P[A | B] = . P[B]

©Stanley Chan 2020. All Rights Reserved. 8 / 1 Law of Total Probability

Theorem (Law of Total Probability)

Let {A1, A2,..., An} be a partition of Ω, i.e., A1,..., An are disjoint and Ω = A1 ∪ A2 ∪ ... ∪ An. Then, for any B ⊆ Ω,

n X P[B] = P[B | Ai ] P[Ai ]. i=1

©Stanley Chan 2020. All Rights Reserved. 9 / 1 Law of Total Probability

continue...

©Stanley Chan 2020. All Rights Reserved. 10 / 1 Law of Total Probability

Figure: Law of total probability decomposes the probability P[B] into multiple conditional probabilities P[B | Ai ]. The probability of obtaining each P[B | Ai ] is P[Ai ].

©Stanley Chan 2020. All Rights Reserved. 11 / 1 Outline

2.1 Set theory 2.2 Probability space 2.3 Axioms of probability 2.4 Conditional probability 2.5 Independence 2.6 Bayes theorem 2.6.1 Prisoner’s Dilemma 2.6.2 Bayes Theorem and Law of Total Probability 2.6.3 Examples

©Stanley Chan 2020. All Rights Reserved. 12 / 1 Example 1: Tennis Tournament

Example. Consider a tennis tournament. Your probability of winning the game is 1 0.3 against of the players (Event A). 2 1 0.4 against of the players (Event B). 4 1 0.5 against of the players (Event C). 4 What is the probability of winning the game?

©Stanley Chan 2020. All Rights Reserved. 13 / 1 Example 1

continue...

©Stanley Chan 2020. All Rights Reserved. 14 / 1 Example 2: Communication Channel

Example. Consider a communication channel shown below. The probability of sending a 1 is p and the probability of sending a 0 is 1 − p. Given that 1 is sent, the probability of receiving 1 is 1 − η. Given that 0 is sent, the probability of receiving 0 is 1 − ε.

Find P[Receive 1] Find P[Send 1] Find P[Receive 1 | Send 1] Find P[Send 1 | Receive 1] ©Stanley Chan 2020. All Rights Reserved. 15 / 1 Example 2

continue...

©Stanley Chan 2020. All Rights Reserved. 16 / 1 Example 2

continue...

©Stanley Chan 2020. All Rights Reserved. 17 / 1 Prisoner’s Dilemma (continue)

P[XA | GB ] =

©Stanley Chan 2020. All Rights Reserved. 18 / 1 Questions?

©Stanley Chan 2020. All Rights Reserved. 19 / 1