P(spam) = 0.4 and P(word | spam) = 0.5, while P(ham) = 0.6 and P(word | ham) = 0.1. Given the word appears, what is P(spam | word)?
Correct answer
A. About 0.77
11 views
A. About 0.77
11 views
By Bayes' theorem: P(spam | word) = (0.4 × 0.5) ÷ (0.4 × 0.5 + 0.6 × 0.1) = 0.20 ÷ 0.26 ≈ 0.77. Seeing the word raises the spam probability from 40% to 77%.
Asked in: Data Science Interviews, GATE DA
Not sure why the answer is A? Ask here and get an explanation.