# What are good techniques and resources for teaching Bayes theorem?

My friend and I want to do a hands on tutorial on Bayes theorem for the Seattle LessWrong group. Neither of us have done this before, so we're searching for prior art; techniques that other people have tried before and descriptions of how they turned out.

What are good techniques and resources for teaching bayes theorem? Reports of both successes and failures are useful, I'd like to know what not to do in addition to what to do.

The audience is a group of ~8 programmers and natural science students. They'll be smart and capable but not necessarily used to doing much math.

• I think it's important to establish what Bayes theorem means both intuitively and mathematically. For the latter, a good presentation using Venn diagrams makes clear the relationship between the conditional probabilities and the probability of the intersection. From there the conclusion of the theorem using basic algebra will seem "obvious". – cardinal Sep 9 '11 at 17:31
• Here is a blog I wrote up on explaining Bayesian inference. This comes up often. bayesianthink.blogspot.com The link summarizes the various approaches to understanding Bayesian inference through puzzles ranging from the simple to fairly complex ones. – broccoli Aug 22 '12 at 22:05
• When I was student, I read in a book that Bayes' formula is a formula to "go back in time". This was really enlightening. – Stéphane Laurent Aug 23 '12 at 11:21

I have to recommend the book "Doing Bayesian Data Analysis" by John Kruschke (Indiana). Having sampled a few "introductory" texts over the last while, this one really shines.

There are many really well explained points but I suppose the best lever he uses to introduce the notion of combining prior and evidence is to introduce Bayes in the context of a multi-way table, where the data cause you to restrict your attention to one row, and sum over marginals to get a posterior for the cell. It is then easily expansible to continuous variables and thence to multi-way distributions.

Might be worth your while looking at it.

For the basic Bayes Formula one common example to use is disease screening. Assume that you have a test for a disease that if used on someone who has the disease will show positive with 95% probability and if used with someone without the disease will show negative with 90% probability; further we know that 1 in 1,000 in the population have the disease. We randomly choose a person from the population (don't know ahead of time if they have the disease) and do the test which turns out positive: what is the probability that they have the disease? This example is often eye-opening to a lot of people. One way to demonstrate this (and quickly show the effect of changes) is using the SensSpec.demo function in the TeachingDemos function for R (also see tkexamp in the same package for a GUI interface to this in the examples).

If you want to expand to Bayesian statistics then one fun approach is to start by showing the students a simple success/fail game like throwing a dart at a target, tossing a wadded up piece of paper into a basket, etc., and choosing a student that will play the game. Ask the students how many times out of 4 they predict the student will succeed, and use their prediction as parameters for a Beta distribution as the prior distribution (plot this to show where they think the true probability could be). Now have the student do the game 10 times and count the successes, use this as the data for a binomial likelihood, and combine with the prior to get a posterior distribution for the student's proportion of successes. Show how you moved from a prior to a posterior using data and fairly simple calculations. If you have time you can let the student play the game more times and use the first posterior as a new prior, then get an updated posterior, and show how the distribution changes with additional information.

• (+1) The "canonical" example you describe in the first paragraph was the one I was going to suggest as well. It is both informative and, sometimes, at least mildly surprising to an uninitiated audience. – cardinal Sep 9 '11 at 17:29
• Another version of Greg's answer: if 99% of all email on the Internet is spam, and we block 99% of all spam, what percentage of your email will be spam (answer: 50%). Used this in a RL presentation once, and the managers were shocked, and stopped complaining for almost 2 whole days! – barrycarter Oct 10 '11 at 4:00

The LessWrong website actually has a great visual explanation of Bayes' Theorem: Bayes' Theorem Illustrated (My Way).

Use a deck of cards.

What are the chances this card is a spade? What are the chances this card is a spade if I know the card is black?

What are the chances this card is a king? What are the chances this card is a king if I know it is a diamond? What are the chances it is a king if I know it is a face card?

Show them how it's used in everyday life. What are the chances it will take me less than 30 minutes to get to work.. What if I leave at 8am? What are the chances I will wait in line at the check out counter? What if it is 6pm? What are the chances this person committed the murder? what if we know he has the same blood type as the murderer.