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.

  • 1
    Your verbal glosses of W, M, L, L|W, and L|M are inconsistent. If W is the event of seeing Jupiter, and L is the event of not observing moons, then P(L|W) is the probability that you saw no moons given that you actually observed Jupiter. Is M the event of observing moons, or is it the event of not observing Jupiter? Some of your descriptions suggest one, some the other.2012-09-11
  • 0
    Your interpretation of $P(A|B)$ is wrong. For example, probability of seeing planet given that the planet observed is Jupiter- that probability is 1.2012-09-11
  • 0
    Judging from the formulas, the "not" in "W represents that percentage of emails that are not spam" seems to be there by mistake? By the way, where you write "percent(age)", you mean "fraction" or "proportion".2012-09-11
  • 0
    @joriki - thanks that is correct.2012-09-12

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$.