Bayes’ rule & base rates

Use this to update a probability after evidence such as a classification result.

0/5 marked as readthis browser

What’s happening here?

Reversing a condition changes the question: the chance of a flag given spam is not the chance of spam given a flag. Bayes’ rule combines the starting proportions with the chances of each possible route to the evidence.

KEEP THIS RELATIONSHIP

P(A∣B)=P(B∣A)P(A)/P(B)P(A\mid B)=P(B\mid A)P(A)/P(B). Include every way B can occur in the denominator.

A worked example.

Of 1,000 messages, 10% are spam. A filter flags 80% of spam and 10% of non-spam. Among flagged messages, what fraction are spam?
  1. 1

    There are 100 spam messages, of which 80 are flagged.

  2. 2

    There are 900 non-spam messages, of which 90 are flagged. The flagged group has 170 messages in total.

  3. 3

    The requested fraction is 80/170=8/17≈47.1%80/170=8/17\approx47.1\%, not 80%.

A common wrong turn.

Ignoring the starting proportion can badly distort the result. Always include false flags in the group you condition on.

Why this works.

Bayes’ rule compares each possible source’s contribution to the observed evidence. A rare source may remain unlikely even when it often produces that evidence. A frequency table with a convenient population size can make the numerator and denominator easier to see.

Check it. Apply it. Explain it.

Three questions, with hints and worked feedback. Your score counts your first submitted answer. Practice only · scores stay in this session and do not enter your account history.

Question 1 of 30 correct / 0 answered

Bayes’ rule & base rates

Factory A makes 60% of items with 1% defective; B makes 40% with 3% defective. Given a defective item, P(it came from B) is…

Videos and further reading

These resources open in a new tab on the publisher’s website.

Finished reading?Stored in this browser; separate from practice grades.

Put the idea to work.

Try the three-question practice above, then bring a related problem to the AI Solver for an explained solution.

Open AI Solver