Bayes' Theorem Math Example 1
Follow the full solution, then compare it with the other examples linked below.
Example 1
mediumEmail spam filter: . The word 'free' appears in 80% of spam emails and 10% of legitimate emails. An email contains 'free'. Find using Bayes' theorem.
Solution
- 1 Prior: ,
- 2 Likelihoods: ,
- 3 Law of total probability:
- 4 Bayes:
Answer
. There's a 77.4% chance the email is spam.
Bayes' theorem updates the prior probability (30% base spam rate) with new evidence (email contains 'free') to get a posterior probability (77.4%). This is how Bayesian spam filters work โ each word updates the probability that an email is spam.
About Bayes' Theorem
Bayes' theorem gives the posterior probability of a hypothesis given evidence: .
Learn more about Bayes' Theorem โMore Bayes' Theorem Examples
Example 2 hard
Drug testing: [formula]. Test sensitivity [formula]. Specificity [formula] (so [formula]). Find [for
Example 3 easyWrite out Bayes' theorem and explain each component: [formula].
Example 4 hardA coin is either fair ([formula], probability 0.7) or biased ([formula], probability 0.3). You flip