Skip to content

Bayes by Marbles

You'll work the famous medical test problem on paper, then build it out of marbles and watch the counts come out the way the math said they would.

About

A test is 99 percent accurate and you test positive, so most people say they're 99 percent likely to be sick. The real answer depends on how rare the disease is, and for one that 1 person in 100 has, it's fifty-fifty. Doctors get this wrong when they're surveyed, and so will you until you've counted it. Bayes' rule fixes it on paper, and two jars of beans make it obvious in a way the formula never will, which is why you build it after you've calculated it.

At a glance

Per requirement
25 XP
Completion bonus
150 XP
Requirements
6
Takes
Two evenings
Skill level
Beginner (done it a few times)
Cost
Cheap (under $10)
Supplies
You need some
Where
At home
Other people
With other people
Locked for now
Earn two more Common badges in Statistics & Forecasting to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Work the base rate problem with a natural frequency tree. Out of 10,000 people, 100 have the disease. The test catches 99 of them. Of the 9,900 healthy people, 1 percent, which is 99, test positive falsely. That's 198 positive tests, and only 99 of them are sick, so the answer is fifty percent. Draw the tree. Take a photo of it. Photo
  2. 2
    Write out Bayes' rule and show that the tree gives the same answer. P(sick given positive) equals P(positive given sick) times P(sick) over P(positive). Plug the numbers in and show that it matches the tree. Take a photo of the formula and the numbers. Photo
  3. 3
    Scale it down to a build you can run, and run 200 trials with two jars. Ten thousand beans is too many, so use a disease that 1 person in 10 has and a test that's right 90 percent of the time, and check on paper that the answer is still fifty percent. Jar S is the sick jar, with 9 dark beans and 1 pale, since the test catches 9 in 10. Jar H is the healthy jar, with 1 dark and 9 pale. For each trial, roll a ten-sided die or draw from a shuffled pack of ten cards to pick the jar, 1 for sick and 2 to 10 for healthy, then draw one bean blind, write down the jar and the colour, and put it back. Dark means a positive test. Take a photo of the two jars and the tally sheet after 200 trials. Photo
  4. 4
    Compare your count to the calculated fifty percent. You should have about 36 positive tests, with about 18 of them from the sick jar. Anywhere from 35 to 65 percent is normal from 36 positives, and that wobble is the reason real studies want thousands of people. Write down your share, and say what ten times the trials would do to the wobble (it shrinks to about a third). Take a photo of the comparison. Photo
  5. 5
    Find a real test or claim in the news and redo the calculation. A screening test, a lie detector, an airport scanner or a spam filter all work. Find the sensitivity, specificity and base rate, or estimate them and say that you did. Work out the real chance. Take a photo of the source and your tree. Photo
  6. 6
    Explain it to someone in under three minutes without using the word Bayes. Use the 10,000 people. Film the explanation, or take a photo of what they wrote back when you asked them to summarize it. Photo or video