Understanding Bayes Theorem

81 Views Asked by At

I'm given a prompt to determine the Probability of a single event.

Known:

P(A | B) = .7

P(A | ~B) = .3

P(B | A) = .6

I need to figure out P(A).

P(A|B) = (P(B | A)*P(A)) / ((P(B | A)*P(A)) + P(B | ~A)*P(~A))

I am a bit lost on how to derive P(B | ~A) and P(~A) from the given known elements.

I don't think P(B | ~A) = (1 - P(B | A)) but even if it is, how do I get P(~A)?

3

There are 3 best solutions below

8
On

$P(A \cap B)=0.7 P(B)$ and $P(A \cap B)=0.6 P(A)$ from the first and the last equations. Let $P(A)=c$. Then we get $P(B)=\frac {0.6}{0.7}c$. Now $P(A\cap \sim B)=0.3 P(\sim B)=0.3 (1-P(B))=0.3 (1-\frac {0.6}{0.7}c)$ from the second equation. Also $P(A \cap B)=0.6 P(A)$. Add these two equations. You get $c=P(A)=P(A\cap \sim B)+P(A \cap B)=0.3 (1-\frac {0.6}{0.7}c)+0.6 c$. Now solve this equation for $c$.

0
On

I think it would be helpful to consider what I regard as the classic conditional probability problem. I offer this problem only as a way of kick-starting the OP's intuition around conditional probability problems.

You are given two weather forecasters : Mr. R and Mr. S.

You are given that Mr. R's forecasts are accurate $80\%$ of the time.

You are given that Mr. S's forecasts are accurate $90\%$ of the time.

One morning, Mr. R says it will rain, and Mr. S says it will not rain

What are the chances of rain?


It is important to realize that the problem can not be solved without making the following assumptions.

Normally, the forecasts of Mr. R and Mr. S are considered independent events.

Let A denote the event that Mr. R is right and Mr. S is right.
Let B denote the event that Mr. R is right and Mr. S is wrong.
Let C denote the event that Mr. R is wrong and Mr. S is right.
Let D denote the event that Mr. R is wrong and Mr. S is wrong.

$p(A) = 0.8 \times 0.9 = 0.72.$
$p(B) = 0.8 \times 0.1 = 0.08.$
$p(C) = 0.2 \times 0.9 = 0.18.$
$p(D) = 0.2 \times 0.1 = 0.02.$

The problem is (in effect) asking:
Given that either events B or C occurred,
what is the chance that event B occurred.

Answer:
$\frac{p(B)}{p(B) + p(C)} = \frac{.08}{.08 + .18}.$

More formally, in Bayes Theorem parlance:
Let E denote the event that Mr. R and Mr. S disagree.
Then you want $p(B|E)$.

Here, you use the formula that
$p(E) \times p(B|E) = p(B ~\text{and} ~E ~\text{both occur}) = p(B).$
Thus, $p(B|E) = \frac{p(B)}{p(E)} = \frac{.08}{.08 + .18}.$

1
On

This can be also visually solved using the basic Venn-Diagram. Let the orange circle represent the set of event A and the green circle represents the set of event B. x is the number of events favourable to only A, y is the number of events favourable both A and B, number of events favourable to only B and w is the number of events not favourable to A or B.

enter image description here

$$P\left(A|B\right)=\frac{y}{y+z}=\frac{7}{10}$$ $$\implies z=\frac{3y}{7}$$

Also, $$P(B|A)=\frac{y}{x+y}=\frac{6}{10}$$ $$\implies x=\frac{2y}{3}$$

Similarly, $$P(A|~B)=\frac{x}{x+w}=\frac{3}{10}$$ $$\implies w=\frac{7x}{3}=\frac{14y}{9}$$

Now, we need to calculate $$P(A)=\frac{\left(x+y\right)}{x+y+z+w}$$

Just substitute the values and you have the answer.


If there are only 2 sets of events mentioned in the question, this is the easiest way to solve such problems. However, visualizing 3 or more sets of events may be difficult and require considerable practice. So, I would recommend you to stick to the algebraic method, meanwhile having an idea of the Venn-Diagram in the back of your mind if you get stuck.