Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

For two events A and B,

P(A) = 0.2, 
P(B) = 0.3, 
P(~A | ~B) = 0.8

I need to calculate P(~B | A), but I'm not sure if what I'm doing is correct.

So knowing P(~A | ~B), I can say

P(A | ~B) = 0.2.

Now if we try to calculate P(~B|A) using Bayes, we get

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

The only thing that we don't know if P(A|B), but that's equal to P(A&B)/P(B).

P(A) = P(A&B) + P(A&~B)
P(A&~B) = P(A|~B)*P(~B) = 0.2*0.7 = 0.14
So, P(A&B) = 0.2 - 0.14 = 0.06

P(A|B) is then 0.06/0.3 = 0.2

So putting P(A|B) back in the formula we get 0.2*0.7 / (0.2*0.7 + 0.2*0.8) 
= .14 / .3 = .46

That 0.46 doesn't seem correct though. Can someone point me in the right direction please?

share|improve this question
    
you may want to check your Bayes formula.. –  Nana May 16 '12 at 0:40
    
Oh, yes...the last bit is wrong. It's P(B) instead of P(~A), in which case it's 0.3*0.6. So the total is 0.14/0.2 = 0.7, right? –  Sorin Cioban May 16 '12 at 0:46
    
right. ${}{}{}{}{}{}$ –  Nana May 16 '12 at 0:50

2 Answers 2

up vote 2 down vote accepted

Since you know both unconditional probabilities ($P(A)$ and $P(B)$) and one conditional probability, you can derive one joint probability easily: $$0.8 = P(\neg A \vert \neg B) = \frac{P(\neg A \wedge \neg B)}{P(\neg B)}=\frac{P(\neg A \wedge \neg B)}{0.7} \implies P(\neg A \wedge \neg B)=0.8\cdot0.7=0.56.$$ The other joint probabilities follow by subtraction: $$ \begin{eqnarray} P(A \wedge \neg B) &=& P(\neg B) - P(\neg A \wedge \neg B) = 0.7 - 0.56=0.14; \\ P(\neg A \wedge B) &=& P(\neg A) - P(\neg A \wedge \neg B) = 0.8 - 0.56=0.24; \\ P(A \wedge B) &=& P(A) - P(A \wedge \neg B) = 0.2 - 0.14 = 0.06. \end{eqnarray} $$ You can conclude that $$ P(\neg B \vert A) = \frac{P(\neg B\wedge A)}{P(A)}=\frac{0.14}{0.2}=0.7$$ (and any of the other conditional probabilities could be written down at this point in the same way, since you now have all the pieces).

share|improve this answer

Your application of Bayes formula is wrong. Phrasing the formula more intuitively:

$$P(A\text{ and ~ }B)) = P(\text{~} B\text{ and }A)$$ $$P(A | \text{~}B)*P(\text{~}B) = P(\text{~}B | A)*P(A)$$ $$0.2 * 0.7 = P(\text{~}B | A)*0.2$$ $$0.7 = P(\text{~}B | A)$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.