← Machine Learning for EveryoneToolsInVisionLearning Center
Probability and Bayes · Lesson 30

Bayes' Rule with a Worked Example

A weather alert catches many late deliveries but also some on-time ones.

Watch the lesson

Bayes' Rule with a Worked Example explained visually

1:09

A weather alert catches many late deliveries but also some on-time ones. Use CC in the player to control captions. The complete transcript follows the written lesson.

Advertisement
Read the full lesson Examples, explanations, and knowledge checks
Lesson overview

What you will learn

A weather alert catches many late deliveries but also some on-time ones.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

Suppose one thousand trips include one hundred late deliveries. A weather alert catches eighty of those late trips. It also fires on one hundred and eighty of the nine hundred on-time trips. If an alert appears today, what fraction of alerted trips are actually late?

02

The useful idea

Count the alerted group: eighty late plus one hundred and eighty on time makes two hundred and sixty. Eighty divided by two hundred and sixty is about thirty-one percent. The alert caught most of the late trips, but most alerts in this example still belong to on-time deliveries.

03

Work through the example

That is the base-rate lesson behind Bayes' rule. Sensitivity alone doesn't give the probability the dispatcher wants; we also need how common late trips are and how often alerts appear without a delay. Change the baseline and calculate again before reusing the answer on another route.

04

Limits and next step

Next, we'll combine multiple features using a compact probabilistic model and inspect its assumption.

Worked example

With a 10% late rate, 80% sensitivity, and 20% false alarms, positive alerts imply about 31% late risk.

Knowledge check

Quick check: test your understanding

Try it yourself: In the situation described above, explain the method and one reason its output might be misleading.

Check the reasoning

Bayes' rule relates a hypothesis after evidence to the evidence's likelihood and the prior. A positive test is not the same as an 80% chance of lateness.

What is the main idea behind bayes' rule with a worked example?

Bayes' rule relates a hypothesis after evidence to the evidence's likelihood and the prior.

How is it used in the example?

With a 10% late rate, 80% sensitivity, and 20% false alarms, positive alerts imply about 31% late risk.

What limitation should be checked?

A positive test is not the same as an 80% chance of lateness.

Further reading

Machine Learning — Tom M. Mitchell.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 30 transcript153 words · Video transcript · Matches the published narration and captionsOpen transcript

Suppose one thousand trips include one hundred late deliveries. A weather alert catches eighty of those late trips. It also fires on one hundred and eighty of the nine hundred on-time trips. If an alert appears today, what fraction of alerted trips are actually late?

Count the alerted group: eighty late plus one hundred and eighty on time makes two hundred and sixty. Eighty divided by two hundred and sixty is about thirty-one percent. The alert caught most of the late trips, but most alerts in this example still belong to on-time deliveries.

That is the base-rate lesson behind Bayes' rule. Sensitivity alone doesn't give the probability the dispatcher wants; we also need how common late trips are and how often alerts appear without a delay. Change the baseline and calculate again before reusing the answer on another route.

Next, we'll combine multiple features using a compact probabilistic model and inspect its assumption.

Advertisement
Advertisement
Advertisement