📝 Worksheet← Lesson
BitWithBite
Probability · Quick Reference

Bayes' Theorem Cheat Sheet

Probability · Lesson 4/8
In one line: bayes' Theorem lets us reverse a conditional probability — using what we know about P(B|A) to figure out P(A|B), which is invaluable when direct evidence is hard to obtain.

Key Ideas

1The Core Idea. Bayes' Theorem updates the probability of a cause (A) after observing some evidence (B).
2Bayes' Theorem Formula. P(A|B) = [P(B|A) * P(A)] / P(B).
3Law of Total Probability. When A has several possible non-overlapping cases (A1, A2, ...), P(B) = sum of P(B|Ai)*P(Ai) over all i — needed to compute the denominator in Bayes' formula.
4Prior vs. Posterior Probability. P(A) is the 'prior' belief before seeing evidence. P(A|B) is the 'posterior' belief after incorporating the evidence B.
5Common Application. Medical testing: given a positive test result (B), find the true probability of having a disease (A), accounting for false positives and the disease's rarity.

Worked Examples

A disease affects 1% of a population. A test correctly detects it 90% of the time (true positive) and gives a false positive 5% of the time. Find P(has disease | tests positive).
Approximately 0.154, or about 15.4%
Two factories supply light bulbs: Factory A makes 60% of bulbs with a 2% defect rate; Factory B makes 40% with a 5% defect rate. A random bulb is defective. Find P(it came from Factory B).
0.625, or 62.5%
Explain in words what P(A|B) represents versus P(A) in Bayes' Theorem.
P(A) is the prior; P(A|B) is the updated (posterior) probability after observing evidence B

Formulas

P(A|B) = [P(B|A) * P(A)] / P(B)
P(B) = P(B|A)*P(A) + P(B|A')*P(A')

Practice Yourself

If P(A)=0.02, P(B|A)=0.8, P(B)=0.1, find P(A|B).
0.16
A disease affects 2% of people; a test is 95% accurate for both positives and negatives. Set up P(B) using the law of total probability (do not solve fully).
P(B)=0.95*0.02 + 0.05*0.98
Solve the previous P(B).
0.019 + 0.049 = 0.068