Page 56 - Data Science Algorithms in a Week
P. 56
Naive Bayes
4. Patients are tested with four independent tests on whether they have a certain
illness:
Test1 positive Test2 positive Test3 positive Test4 positive Illness
Yes Yes Yes No Yes
Yes Yes No Yes Yes
No Yes No No No
Yes No No No No
No No No No No
Yes Yes Yes Yes Yes
Yes No Yes Yes Yes
No Yes No No No
No No Yes Yes No
Yes Yes No Yes Yes
Yes No Yes No Yes
Yes No No Yes Yes
No Yes Yes No ?
We have taken a new patient, for whom the second and third tests are positive and the first
and fourth are negative. What is the probability that they suffer from the illness?
5. We are given the following table of which words an email contains and whether
it is spam or not:
Money Free Rich Naughty Secret Spam
No No Yes No Yes Yes
Yes Yes Yes No No Yes
No No No No No No
No Yes No No No Yes
Yes No No No No No
No Yes No Yes Yes Yes
[ 44 ]