Answer:
There is a 13.40% probability that a message is spam, given that it contains the word "text" (or "txt").
Step-by-step explanation:
The problem states that
There are 5574 messages.
There are 747 messages that are spam.
Every message contains the word text.
Bayes rule:
What is the probability of B, given that A?
[tex]P(A/B) = \frac{P(A \cap B)}{P(A)}[/tex]
In this problem, we have that
A is containing the word text. So [tex]P(A) = 1[/tex]
So
[tex]P(A/B) = \frac{P(A \cap B)}{P(A)} = P(A \cap B)[/tex]
[tex]A \cap B[/tex] is containing the word text and being a spam message. So:
[tex]P(A \cap B) = \frac{747}{5574} = 0.1340[/tex]
There is a 13.40% probability that a message is spam, given that it contains the word "text" (or "txt").