Notes 2
Jay Vala
Bayes Theorem
In conditional probability we have a order of probabilities. That is
But it may not happen that we have the probability in this order or may happen that we may not have the probability of $P(B)$, thats when Bayes Theorm comes into play.
Bayes Theorem lets you swap the order of dependence between events. So we can calculate $P(A|B)$ in terms of $P(B|A)$. This is useful as mentioned above when it is difficult to calculate any one of the term in conditinal probability.
So,
Here, the denominator $P(A)$ can be viewed as Normalizing Constant something that ensures we always have a probability function.
So, to evaluate this denominator,
Therefore, by additivity rule,
Hence, the Bayes Theorem becomes,
Example:Treasure chest A contains 20 Gold and 30 Silver coins, Chest B contains 50 Gold and 50 Silver coins. You randomly choose a treasure chest to open, and then randomly choose a coin from that treasure chest. If the coin you choose is gold, then what is the probability that you chose chest A?
Solution:
Chest A = 20 Gold, 30 Silver
Chest B = 50 Gold, 50 Silver
So let $P(A)$ be the probability of selecting Chest A, and $P(B)$ be the probability of selecting Chest B, and let $P(G|A)$ be the probability of selecting a Gold coint from chest A.
So, according to Bayes Theorem,Probability of chest being A given that the coin was gold is
Now, we can clearly see the problem here, we don’t have $P(G)$ but we can express it using the additive method explained above. So,
But, $\bar{A}$ in this case is $B$, hence the above equation becomes
Putting this in above Bayes formula
Putting the respective values in we get,