MIT Information Retrieval_Question
MIT Information Retrieval_Question
Question:
A spam filter uses a Naïve Bayes classifier to determine whether an email is spam based on the presence
of certain words. Suppose we have the following probabilities:
If an email contains the word "discount," what is the probability that it is spam?
Answer:-
= (0.6×0.3) + (0.2×0.7)
This means that 32% of all emails contain the word "discount".
𝑃("𝑑𝑖𝑠𝑐𝑜𝑢𝑛𝑡"∣𝑆𝑝𝑎𝑚)𝑃(𝑆𝑝𝑎𝑚)
P(Spam∣"discount") =
𝑃(“𝑑𝑖𝑠𝑐𝑜𝑢𝑛𝑡”)
(0.6×0.3) 0.18
= 0.32
= 0.32
= 0. 5625
The probability that an email is spam given that it contains the word "discount" is:
Thank you.