I divide my email into three categories: A1 = spam. A2 = low priority, A3 = high priority.
I find that: P(A1) = .7
P(A2) = .2
P(A3) = .1
Let B be the event that an email contains the word "free".
P(B|A1) = .9
P(B|A2) = .01
P(B|A3) = .01
I receive an email with the word "free". What is the probability that it is spam?
I find that: P(A1) = .7
P(A2) = .2
P(A3) = .1
Let B be the event that an email contains the word "free".
P(B|A1) = .9
P(B|A2) = .01
P(B|A3) = .01
I receive an email with the word "free". What is the probability that it is spam?
1. The law of total probability:
ReplyDeleteP(B) = sum_{j=1}^{k} P(B|Aj) * P(Aj)
with A1 -> Ak: a partition of the sample space omega
2. Bayes' Theorem:
P(Ai|B) = P(B|Ai) * A{Ai) / sum_{j} P(B|Aj) * P(Aj)
Hence:
P(A1|B) = P(A1B)/P(B) = P(B|A1) * P(A1) / sum_{j} P(B|Aj) * P(Aj)
= 0.995