# How can I use Bayes rule for this question given additional data

I am required to use the Naive Bayes classifier to classify example 8, to see whether it is poisonous or not.

I gained the following results:

p(x|Poisonous=Y) = 0.0267857 and

p(x|Poisonous=N) = 0.0101989

If I am given extra information at a later stage that there is a 0.05 chance of poisonous plants being found, hence 0.95 chance of them not being found. How should I go about classifying example 8 based on the new data?

Any help would be appreciated.

Bayes Theorem:

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

So it seems what you're looking for its:

$P(poisonous=Y|X) = \frac{P(X|poisonous =Y)P(poisonous)}{P(X)}$

Use the law of total probability:

$P(poisonous=Y|X) = \frac{P(X|poisonous=Y)P(poisonous)}{P(X|poisonous=Y)P(poisonous) + P(X|poisonous=N)P(not poisonous)}$

It seems like you know what you need to know to get to the answer.

Think about your extra information as a new prior: $P(\textrm{Poisonous}) = 0.05$. It should be pretty easy to slot that into Bayes' Rule, no?

Use this formula to evaluate:-

probability for Y= P(yes).P(green|Y).P(soft|Y).P(Y|Y).P(wrinkled|Y).

probability for N= P(No).P(green|N).P(soft|N).P(Y|N).P(wrinkled|N).

IF probability for Y > probability for N then new data belongs to class Yes otherwise to class No.