How to solve conditional probability problem using bayesian algorithm

130 Views Asked by At

I am trying to solve

An agent learning to categorise news articles in two topics, World (W) and Finance (F). Out of $100$ articles, $40$ were classified as W, and $20$ of the articles were classified as both W and F. What is the value of conditional probability of an article being classified as F?*

The algorithm which I am assuming right for this question is

$$ P(A|B) = \frac{P(A\cap B)}{ P(B)}. $$

But how to specifically categorize F ? and take specific values for equation ? or I am assuming wrong formula ?

1

There are 1 best solutions below

2
On

If the 40 W includes the number 20 W and F, then $$P(F|W) = \frac{P(FW)}{P(W)} = \frac{20/100}{40/100} = \frac{20}{40} = \frac{1}{2}.$$ If 40 W does not include the 20 W and F, then notice that $$P(W) = P(W\bar F)+P(WF) = \frac{40}{100}+\frac{20}{100} = \frac{60}{100}.$$ So, $$P(F|W) = \frac{P(FW)}{P(W)}= \frac{20/100}{60/100} = \frac{20}{60} = \frac{1}{3}.$$