How can I get the probability given the Bayesian table?

71 Views Asked by At

Consider that $A \rightarrow B$. And A has two states 0 and 1 respectively with probability of $0.6$ and $0.4$. $$ \mbox{And for}\ B: \left\{\begin{array}{rcl} {\displaystyle Pr\left(B = 1 \mid A = 1\right)} & {\displaystyle =} & {\displaystyle 0.3} \\[1mm] {\displaystyle Pr\left(B = 1 \mid A = 0\right)} & {\displaystyle =} & {\displaystyle 0.2} \\[1mm] {\displaystyle Pr\left(B = 0 \mid A = 1\right)} & {\displaystyle =} & {\displaystyle 0.7} \\[1mm] {\displaystyle Pr\left(B = 0 \mid A = 0\right)} & {\displaystyle =} & {\displaystyle 0.8} \end{array}\right. $$

What I want to get is $Pr(B=1)$, and I know the result is $\frac{0.3+0.2}{0.3+0.2+0.7+0.8}$. But my question is how can I get the result provided the two tables?

My reduction:

$$ \begin{align} Pr(B=1) &= \frac{Pr(B=1|A)}{Pr(B=1|A) + Pr(B=0|A)}\\ & = \frac{\frac{Pr(B=1,A)}{Pr(A)}}{\frac{Pr(B=1,A)}{Pr(A)}+\frac{Pr(B=0,A)}{Pr(A)}} \\ & = \frac{Pr(B=1, A=0) + Pr(B=1, A=1)}{Pr(B=1, A=0) + Pr(B=1, A=1) + Pr(B=0, A=0) + Pr(B=0, A=1)} \end{align} $$

Am I right?

Any hints or suggestions would be highly appreciated. Thank you!

1

There are 1 best solutions below

2
On BEST ANSWER

I know the result is $\frac{0.3+0.2}{0.3+0.2+0.7+0.8}$

It is not right and it must be: $$\begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\\ =&P(A=0)\cdot P(B=1|A=0)+P(A=1)\cdot P(B=1|A=1)=\\ =&0.6\cdot 0.2+0.4\cdot 0.3=\\ =&0.24.\end{align}$$