Mathematics (JEE)HardGATE CS · ISI

In a spam filter, 40% of emails are spam. Word W1 appears in 50% of spam and 10% of legitimate emails; word W2 appears in 40% of spam and 20% of legitimate emails. Treat the two words as conditionally independent given the email's class. An email contains both W1 and W2. What is the probability that it is spam?

  1. A. 10/11
  2. B. 4/7
  3. C. 20/23
  4. D. 2/5

Correct answer: C. 20/23

Posterior = 0.4(0.5)(0.4) / [0.4(0.5)(0.4) + 0.6(0.1)(0.2)] = 0.08/0.092 = 20/23. Dropping the prior gives 10/11, and forgetting W2 in the legitimate branch gives 4/7.

More Permutations, Combinations and Probability questions

Exams that ask this topic