Bayes' Rule and Updating a Belief · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.
En anglais

Flipping what the test tells you

Computing · Machine Learning · ages 18-19
Name ______________________   Date ____________
  1. What does a false positive mean in a test for a condition?

    • A positive result when the condition is absent.
    • A negative result when the condition is present.
    • A positive result when the condition is present.
  2. Which fraction gives the condition share among people with a positive result?

    • All positives divided by the true positives.
    • True positives divided by all positives.
    • False positives divided by everyone tested.
  3. A condition affects 1% of people. A test detects 95% with the condition and flags 5% without it. A positive result therefore means a 95% chance of having the condition.

    Circle one:   True   False

  4. A warehouse model assigns a prior probability of 0.12 to a crate being damaged. What does this prior describe?

    • Among crates flagged by the scanner, 12% are damaged.
    • Before scanning, 12% of the crates are damaged.
    • Among damaged crates, the scanner flags 12% of them.
    • Among sound crates, the scanner flags 12% of them.
  5. Knowing that tests A and B are independent across the whole population is enough to multiply their likelihoods within each condition group.

    Circle one:   True   False

  6. A sensor checks devices. Before checking, 20% are faulty. It flags 80% of faulty devices and 10% of sound ones. A device is not flagged. What is the chance it is faulty?

    • About 5.3 percent
    • About 20 percent
    • About 80 percent
    • About 94.7 percent
  7. A condition has prior probability 0.02. A test detects 90% with the condition and flags 5% without it. Find P(condition given positive). Round to two decimal places.

    Answer: ______________

  8. A checker inspects 20 faulty widgets and 80 sound widgets. It flags 14 faulty widgets and 6 sound widgets. What is its false-positive rate? Enter a decimal.

    Answer: ______________

  9. After A is positive, the condition chance is 0.27. Test B detects 90% with the condition and flags 5% without it. A and B are independent within both condition groups. B is positive. What update uses both results?

    • Use 0.27 as the prior and apply Bayes with B's rates.
    • Use the original prior again and ignore the first positive result.
    • Average 0.27 with 0.90 and use that average as the new posterior.
  10. A message filter sees 30% spam. It flags 80% of spam and 10% of non-spam. What fraction of all messages does it flag? Enter a decimal.

    Answer: ______________

LightMySky · lightmysky.comW1-mt_A4p5--f7Io-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Flipping what the test tells you W1-mt_A4p5--f7Io-s1

  1. A positive result when the condition is absent. · A false positive flags someone who does not have the condition.
  2. True positives divided by all positives. · Conditioning on a positive restricts the denominator to all positive results.
  3. False · The 95% rate describes people with the condition. Here the condition share among positives is about 16%, not 95%.
  4. Before scanning, 12% of the crates are damaged. · The prior describes the condition chance before the scanner result is known.
  5. False · Multiplying within-group likelihoods requires independence given the condition and given its absence. Overall independence does not establish those requirements.
  6. About 5.3 percent · In a model group of 100, 4 faulty and 72 sound devices are unflagged. The faulty share is 4/76, about 5.3%.
  7. 0.27 · The positive shares are 0.018 with the condition and 0.049 without. Divide 0.018 by their sum, 0.067, to get about 0.27.
  8. 0.075 · The false-positive rate conditions on being sound: 6/80 = 0.075. Its denominator is not all flagged widgets.
  9. Use 0.27 as the prior and apply Bayes with B's rates. · Use the posterior after A as B's prior. Within-group independence lets B's stated rates remain unchanged after A.
  10. 0.31 · The flagged share is 0.30 × 0.80 + 0.70 × 0.10 = 0.24+0.07 = 0.31.
Worksheet · LightMySky