Practice Bayes' Theorem in Math
Use these practice problems to test your method after reviewing the concept explanation and worked examples.
Quick Recap
Bayes' theorem gives the posterior probability of a hypothesis given evidence: P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}.
Start with a prior belief, then reweight it by how likely the evidence is under each hypothesis.
Example 1
mediumEmail spam filter: P(\text{spam})=0.3. The word 'free' appears in 80% of spam emails and 10% of legitimate emails. An email contains 'free'. Find P(\text{spam}|\text{free}) using Bayes' theorem.
Example 2
hardDrug testing: P(\text{user})=0.05. Test sensitivity P(+|\text{user})=0.99. Specificity P(-|\text{non-user})=0.95 (so P(+|\text{non-user})=0.05). Find P(\text{user}|+).
Example 3
easyWrite out Bayes' theorem and explain each component: P(A|B) = \frac{P(B|A)P(A)}{P(B)}.
Example 4
hardA coin is either fair (p=0.5, probability 0.7) or biased (p=0.8, probability 0.3). You flip it once and get heads. Update the probability that the coin is biased using Bayes' theorem.