Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Question:Suppose that a Bayesian spam filter is trained on a set of\({\bf{500}}\)spam messages and\({\bf{200}}\)messages that are not spam. The word “exciting” appears in\({\bf{40}}\)spam messages and in\({\bf{25}}\)messages that are not spam. Would an incoming message be rejected as spam if it contains the word “exciting” and the threshold for rejecting spam is\({\bf{0}}.{\bf{9}}\)?

Short Answer

Expert verified

Answer

Hence, the incoming message containing the word ‘exciting’ is not rejected as spam.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

Given Data

  • A Bayesian spam filter is trained on a set of \(500\) spam messages and \(200\) messages that are not spam. The word “exciting” appears in \(40\) spam messages and in \(25\) messages that are not spam.
02

Formula to be used

According to Bayes’ theorem, \(P\left( {F\left| E \right.} \right) = \frac{{P\left( {E\left| F \right.} \right)P\left( F \right)}}{{P\left( {E\left| F \right.} \right)P\left( F \right) + P\left( {E\left| {\overline F } \right.} \right)P\left( {\overline F } \right)}}\)

03

find the message category

Assume the following events-

\(E\)is a received message contains the word ‘exciting’.

\({F_1}\)is that an incoming message is spam and\({F_2}\)is that the message received is not a spam.

Thus, the probability for a message received containing the word ‘exciting’ to be a spam is-

\(\begin{array}{l}P\left( {{F_1}\left| E \right.} \right) = \frac{{P\left( {E\left| {{F_1}} \right.} \right)P\left( {{F_1}} \right)}}{{P\left( {E\left| {{F_1}} \right.} \right)P\left( {{F_1}} \right) + P\left( {E\left| {{F_2}} \right.} \right)P\left( {{F_2}} \right)}}\\ = \frac{{\left( {\frac{{40}}{{500}}} \right)\left( {\frac{{500}}{{700}}} \right)}}{{\left( {\frac{{40}}{{500}}} \right)\left( {\frac{{500}}{{700}}} \right) + \left( {\frac{{25}}{{200}}} \right)\left( {\frac{{200}}{{700}}} \right)}}\\ = \frac{8}{{13}}\\ = 0.61538 < 0.9\end{array}\)

So, the incoming message is not rejected as spam.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free