Past exam question: 2081 Chaitra (Regular), Q3(b)
Open in the Padhaiko appAn e-mail filter is planned to separate valid e-mails from spam. The word free occurs in 70% of the spam messages and only 4% of the valid messages. Also, 25% of the messages are spam. Determine the following probabilities:
(i) The message contains free. (ii) The message is spam given that it contains free. (iii)The message is valid given that it does not contain free.
Solution
Formal Definition of Events and Given Probabilities: Let:
- : Event that an incoming message is spam.
- : Event that an incoming message is valid ().
- : Event that a message contains the word "free".
- : Event that a message does not contain the word "free".
From the problem statement:
- Prior probability of spam:
- Prior probability of valid email:
- Conditional probability of "free" given spam:
- Conditional probability of "free" given valid:
Part (i): Probability that the Message Contains "free": By the Law of Total Probability, the overall probability of observing the word "free" across all incoming emails is:
Substituting the given values:
As a simplified fraction:
Part (ii): Probability that the Message is Spam Given that It Contains "free": Applying Bayes' Theorem to update the probability of spam conditioned on observing the word "free":
Substituting the calculated probabilities:
The presence of the word "free" dramatically increases the probability that the email is spam from a prior of to a posterior of .
Part (iii): Probability that the Message is Valid Given that It Does Not Contain "free": First, determine the probability that a message does not contain "free":
Alternatively, verifying via total probability:
Applying Bayes' Theorem for the posterior probability of a valid email given absence of the word "free":
Substituting the values: