Naive Bayes classifier question

2.4k Views Asked by At

A spam filtering system has a probability of 0.95 to classify correctly a mail as spam and 0.10 probability of giving false positives. It is estimated that 0.5 % of mails are actually spam.

Suppose that the system is now given a new mail to be classified as spam/not spam. What is the probability that the mail will be classified as spam?

2

There are 2 best solutions below

0
On BEST ANSWER

You can make a table. The events are

$S$: Mail is a spam

$cS$: Mails is classified as a spam.

The numbers in the brackets indicate the order of entries.

$$\begin{array}{c|c|c|c} &S & \overline S \\ \hline cS & A(3) & B(5) & C(6) \\ \hline \overline {cS} & (4) & & \\ \hline & 0.005 (1) & 0.995(2) &1 \end{array}$$

... A spam filtering system has a probability of 0.95 to classify correctly a mail as spam.

That means that $0.95=\frac{A}{0.005}\Rightarrow A=...$

and 0.10 probability of giving false positives.

That means a mail is not a spam but it is classified as a spam with a probability of $10\%$:

$\frac{P(\overline S\cap cS)}{P(\overline S)}=\frac{B}{0.995}=0.1$

It is asked for the value of $P(cS)$ which is $A+B=C$

The remaining empty cells can be filled with simplest algebra for further questions.

0
On

Guide:

  • Let $A$ denote the event that is is really a spam.

  • Let $B$ be the event that a mail is classified as a spam.

  • You are given $P(B|A)$ and $P(B|A^c)$ and also $P(A)$.

  • Use the law of total probability to compute $P(B)$.