Sunday, September 14, 2008

Class 9/12

Today in class we mostly pursued the Monty Hall problem, in various disguises. In the process we learned about Bayes' theorem:

P(A,B)=P(A|B)P(B)=P(B|A)P(A),

and as long as P(B) is not zero, we can divide to get the usual form of Bayes' theorem:

P(A|B)=P(B|A)P(A)/P(B).

We identified P(A) as the prior probability of A (before we observed B), P(B|A) as the likelihood, P(B|A)P(A) as the joint probability of A and B, P(B) as the probability of observing the evidence B that we actually observed (that Monty opens the second door), and P(A|B) as the posterior probability of A being true, given that we've observed evidence B.

We also learned that the denominator, P(B), is gotten by summing P(A,B)=P(B|A)P(A) over all possible values of B (not A!).

We solved Monty Hall first with a probability tree, then with a "natural frequencies" approach like that in Calculated Risks, and finally with a spreadsheet-like calculation in which we had columns. We put the possible states of nature (here the different places the prize might be) in the first column, the prior probabilities (1/3) of each state of nature in the second, the likelihood (probability of the data that Monty opens door 2 given that you choose door 1 and the prize is behind the door for that row) in column 3, the product of columns 2 and 3 in column 4 (the joint probability), the sum of column 4 under that column, and then the posterior probability in column 5, which is the entry in each row column 4 divided by the sum under that column.

I haven't figured out yet how to produce such a table in the blog, when I do I'll add it.

2 comments:

Tenzin said...

Somehow this is kinda difficult to understand. I was wondering if there was a book or tutorial on conditional probability, somehow I feel like I understood the scenario much better using the tree diagrams than just pure notation.

The book, Calculated risks does go into conditional probability but just scratches the surface with an equation and then says how much simpler it is to understand using tree diagrams.

Bill Jefferys said...

You might start by going to the article on conditional probablity in WikiPedia here.

It's brief, and there are links to other topics like Bayes' theorem that are relevant to our class.

There's another brief tutorial here.

Be sure to click on Parts B and C near the top of the page.

On Wednesday please remind me about this and I will try to clear up some of your problems.