0
$\begingroup$

I am just starting out about learning about Bayes' theorem. The statement that I am calculating for is "I received an email, what is the probability that it is spam given that the email contains the work 'Nigeria'?". I assume that of all email messages 80% are spam and 20% are not.

W represents that percentage of emails that are not spam L denotes that the email contains the word 'Nigeria'

P(W) = 0.8 (percent of email that is spam)

P(M) = 0.2 (percent of email that is not spam)

P(L|W) = 0.95 (percent of all spam emails that have the word Nigeria in them)

P(L|M) = 0.1 (percent of all non spam emails that have the word Nigeria in them)

So solving: $P(W|L) = {P(L|W)* P(W) \over P(L|W) * P(W) + P(L|M) * P(M)}$

I get P(W|L) = 0.974359

Is this correct (I am asking because I want to confirm that my understanding of the this concept is correct)?

P.S. - If updated the example in this question to an example that I think is more appropriate to the theorem.

  • 0
    @joriki - thanks that is correct.2019-05-29

1 Answers 1

1

Your answer is correct up to the digits you give. In mathematics, the equality sign is usually reserved for exact equalities, and approximate equalities, e.g. after rounding, are denoted by $\approx$.