g↗genai/ learner
Data and Evaluation / Lesson 04

Updating beliefs with evidence

A positive test result does not replace what you knew beforehand—it updates it. When an event is rare, even a test that catches most real cases can produce far more false positives than true positives.

Concept + interactive labBeginner friendly

Start with what you knew before the test.

In Lesson 5.3 you saw that probabilities are estimates of uncertainty, not guarantees. When new evidence arrives—like a rapid test result or an alert from an AI detector—you revise that estimate rather than throwing away everything you knew before.

Imagine checking the weather forecast before looking out the window. A dark cloud raises your belief that it will rain, yet a dark cloud in a dry desert summer still means something very different from one during monsoon season.

This lesson uses five core terms in order:

  1. Base rate (prior): how common an event is in the group before you see the new test result.
  2. True positive: a positive test result when the event is genuinely present.
  3. False positive (false alarm): a positive test result when the event is actually absent.
  4. Updated belief (posterior): the revised chance that the event is present after seeing the test result.
  5. Bayes’ rule (updating with counts): combining the base rate with how often the test flags real cases versus non-cases to find the updated belief.
Running example: Nora’s orchard rapid leaf test

Nora (an invented grower for this lesson) tests 1,000 apple trees for a rare leaf blight using a rapid strip test. Only 1% of trees actually have blight (10 blighted, 990 healthy). The strip catches 90% of blighted trees (its detection rate, or true-positive rate) and wrongly flags 10% of healthy trees (its false-alarm rate, or false-positive rate, meaning 90% of healthy trees test negative).

Diagram titled Updating a belief with subtitle Combine your starting belief with new evidence. Flows left to right from two blue cards, Base rate (prior) labeled How common before the test and New evidence labeled Positive test result, into a lavender card Update with counts labeled True vs false positives, and then into a green card Updated belief (posterior) labeled Revised chance it is true. Bottom cards show Analogy (Like checking the forecast before trusting a dark cloud.) and Key takeaways (Start from the base rate before testing; Weigh true positives against false positives; Evidence updates a belief, not replaces it).
Updating a belief combines your starting base rate with the new test evidence by comparing true positives against false positives.

Why rare events create so many false positives.

Suppose one of Nora’s trees tests positive. Because the strip catches 90% of blighted trees and lets 90% of healthy trees test negative, it is tempting to think there is a 90% chance the tree has blight.

Count all 1,000 trees instead, and the picture flips. A false negative happens when a blighted tree tests negative, and a true negative happens when a healthy tree tests negative:

Actual tree stateTreesTests positiveTests negative
Blighted (1% base rate)109 true positives1 false negative
Healthy (99%)99099 false positives891 true negatives
Total1,000108 positive tests892 negative tests

Out of 108 positive tests, only 9 trees truly have blight. That puts the updated belief at 9 ÷ 108 ≈ 8.3% (about 1 in 12)—far from 90%.

Why? Taking 10% of a huge healthy group (990 trees) produces 99 false positives, which easily outnumbers 90% of a tiny blighted group (9 true positives). Notice the difference between two questions that sound alike:

  • Chance of a positive test if the tree has blight: 90% (9 of 10 blighted trees).
  • Chance the tree has blight if the test is positive: 8.3% (9 of 108 positive tests).
Diagram titled Why rare events fool a test with subtitle 1,000 trees, 1% blight, 90% detection, 10% false alarms. Flows left to right from 1,000 trees splitting into 10 blighted (1%) leading to 9 true positives and 990 healthy (99%) leading to 99 false positives, which both merge into 108 positive tests with highlight 9 of 108 real (8.3%). Bottom cards show Analogy (A small leak in a huge pipe still floods a tiny cup.) and Key takeaways (10% of 990 healthy trees gives 99 false alarms; False alarms easily outnumber 9 real cases; Positive test means 8.3% chance, not 90%).
When an event is rare, even a modest false-alarm rate applied to the large negative group creates far more false positives than true positives.

Bank card fraud alerts

Genuine card payments usually outnumber fraudulent ones by thousands to one. Even a detector with a small false-alarm rate can flag many ordinary purchases—which is why banks commonly ask you to confirm an alert before blocking a card.

Routine medical screening

When a routine screen checks a wide population for a rare condition and has even a modest false-alarm rate relative to how rare that condition is, a first positive result can frequently turn out to be a false alarm. Clinicians typically follow up with a second, more specific test rather than treating on the first screen alone.

Test-result calculator: watch the updated belief shift.

Even when a test’s detection and false-alarm rates stay identical, a positive result leads to a very different updated belief when the starting base rate changes. Before trying the calculator, trace one quick comparison in Nora’s orchard.

Worked example: a damp corner with a 20% base rate

In a shady, damp corner where blight affects 20% of trees (200 blighted, 800 healthy), the same 90% detection / 10% false-alarm strip produces 180 true positives and 80 false positives. Out of 260 positive tests, 180 ÷ 260 ≈ 69.2% are truly blighted—because the starting belief was twenty times higher.

  1. Start on Rare blight (1%) and confirm that 9 true positives out of 108 total positives gives 8.3%.
  2. Click Damp corner (20%) to see the updated belief jump to 69.2% with the exact same test.
  3. Click Stricter test (1% false alarm) and notice that even cutting false alarms ten-fold still leaves a rare 1% event below 50% (47.6%).
  4. Try Even split (50%) to see the one case where a 90% / 10% test actually yields 90.0%, then move the sliders yourself and click Reset calculator to start fresh.
Test-result calculator (1,000 cases)
Pick a scenario preset

Nora's whole orchard: 1% base rate, 90% detection, 10% false alarms.

1%

10 real cases, 990 absent

90%

Share of real cases that test positive

10%

Share of absent cases that wrongly test positive

Starting belief (base rate)1.0%
Updated belief after 1 positive test (posterior)8.3%
Mix of all 108 positive tests9 true vs 99 false

Updated belief: 8.3% (9 true positives out of 108 total positive tests).

Expected counts out of 1,000 cases: 9 true positives, 99 false positives, 1 false negative, and 891 true negatives.

What if a second test is also positive? If the second test has the same 90% detection and 10% false-alarm rates and its errors are independent of the first test given whether the event is truly present, the updated belief rises from 8.3% to 45.0%.

Illustrative calculator: counts are expected values out of 1,000 invented cases (shown to one decimal place when a rate does not divide evenly) assuming exact known test rates.

When belief updates go wrong in practice.

Counting true and false positives is simple once you know the rates, but real-world decisions run into three common traps:

  • Using the wrong base rate: if you apply a whole-orchard base rate (1%) to a damp, high-risk corner (20%), your updated belief will underestimate the real risk.
  • Assuming repeated tests are independent: the calculator’s second-test figure (45.0% in Nora’s 1% example) holds only when the second test’s errors are independent of the first test’s errors given whether the tree actually has blight. If a harmless leaf stain fools the same strip twice, repeating it does not add full new evidence.
  • Ignoring false negatives: a negative test lowers your belief, yet it rarely drops it to zero—in Nora’s 1,000 trees, 1 of the 10 blighted trees still tested negative.
  • Does a high false-positive count mean the test is useless?

    No. In Nora’s orchard, a positive strip raised the chance of blight more than eight-fold—from 1% to 8.3%—narrowing 1,000 trees down to 108 for a closer inspection.

  • Why does the same test give 8.3% in one group and 69.2% in another?

    Because evidence updates your starting belief rather than replacing it. When real cases start out much more common, they make up a much larger share of all positive tests.

  • How does this connect to evaluating AI classifiers?

    The updated belief after a positive flag—the share of all positive flags that are truly positive—is the same ratio called precision, which you will explore alongside other evaluation measures in Lesson 5.8.

✎ Try it yourselfKnowledge check · Practice only

Check your understanding.

A city bike-share team checks 1,000 docking locks with a quick sensor test. About 1% of locks (10 of 1,000) have a worn latch, while 990 are fine. The sensor flags 80% of worn latches (8 true positives) and wrongly flags 10% of fine latches (99 false positives), giving 107 positive flags in total. One lock flashes positive. Which statement is right?

Take this with you.

Evidence updates a belief—it does not replace it. Start from the base rate (prior), count true positives against false positives, and compute the updated belief (posterior). When an event is rare, even a strong test can produce far more false positives than real cases—so a positive test is a signal to look closer, not automatic proof.

Ready to continue? Return to Data and Evaluation.