Let S shows the event that email is spam and H shows the event that email is ham. Let P shows the event that email include password. So we have
P(S) = 400 /1000 = 0.40, P(H) = 600/1000 = 0.60
and
P(P|S) = 200 /400 = 0.50
P(P|H) = 30 / 600 = 0.05
Let N shows the event that email does not contain password. So,
P(N|S) = 1- P(P|S) = 1 - 0.50 = 0.50
P(N|H) = 1 - P(P|H) = 1- 0.05 = 0.95
(1)
Using Baye's theorem the required probability is
P(S|P) = [P(P|S)P(S)]/ [ P(P|S)P(S)+P(P|H)P(H)] = [0.50 * 0.40 ] / [ 0.50*0.40 + 0.05 * 0.60] = 0.8696
(2)
Using Baye's theorem the required probability is
P(S|N) = [P(N|S)P(S)]/ [ P(N|S)P(S)+P(N|H)P(H)] = [0.50 * 0.40 ] / [ 0.50*0.40 + 0.95 * 0.60] = 0.2597
Problem 5. (12 points) Bayes' Theorem is a popular tool for spam filtering. You are asked...
Problem 5. (12 points) Bayes' Theorem is a popular tool for spam filtering. You are asked to design a spam filtering algorithm based on whether certain words appear in an email. You were given 1,000 randomly selected emails that entered an email server. You examined these emails and manually labeled each one either as spam or ham (i.e., non-spam). You found that 400 emails are spam and 600 are ham. In these 400 spam emails, you found 200 of them...
Problem 1 (Bayes theorem and spam filters) Suppose you have develop a new algorithm to detect spam in an incoming email message. if the email is spam, there is a 98% chance your algorithm will detect it. On the other hand, if no spam is present, there is a 90% chance the algorithm will indicate that the message is not spam. Suppose that roughly 10% of all your email is spam. a) What is the probability a randomly chosen message...