Probability

Bayes’ Theorem

Students rearrange colored trays after receiving a new clue.

Bayes’ Theorem definition

Bayes’ theorem updates the probability of an event using the probability of observing the evidence under that event.

In Spanish
teorema de Bayes
Topic
Conditional probability and models

Bayes’ Theorem in a picture

Bayes’ Theorem diagramA factory example uses the overall defect rate to reverse the conditional probability.A makes 60% of items2% of A’s items are defectiveB makes 40% of items5% of B’s items are defective0.012 ÷ 0.032 = 37.5%Chance a defective item came from A
A factory example uses the overall defect rate to reverse the conditional probability.

How it works

For evidence B with positive probability, P(A | B) = P(B | A)P(A)/P(B). The prior is P(A), the evidence likelihood is P(B | A), and the posterior is P(A | B). If P(B) is unknown, find it by summing the weighted evidence probabilities across all relevant cases.

Worked examples

Find the overall defect probability in the example.

0.60 × 0.02 + 0.40 × 0.05 = 0.032.

If P(A) = 0.4, P(B | A) = 0.5, and P(B) = 0.25, find P(A | B).

0.5 × 0.4 ÷ 0.25 = 0.8.

If A and B are independent and P(B) > 0, what is P(A | B)?

P(A), because observing B gives no update.

Common mistake

Read the event after the conditioning bar carefully. Reversing the events changes which probability is being asked for.

Quick check

What must be positive in the denominator?

Show answer

P(B).

What is P(A) called before seeing B?

Show answer

The prior probability.

What is P(A | B) called?

Show answer

The posterior probability.

Sources

Flashcard

Bayes’ Theorem

Reveal the definition

Bayes’ theorem updates the probability of an event using the probability of observing the evidence under that event.

Effortless Math. “Bayes’ Theorem.” Math Dictionary.