This morning we went over something I’d missed in last week’s homework. I had neglected to answer the “three children, one king” question. There’s only one way (BBB) for the king to have two brothers, and 7 ways to get a king, sp that’s 1/7. There are three ways to have one brother (BBG, BGB, GBB) so that’s 3/7. And the remaining three possibilities have no brothers for the king, so that’s also 3/7.

I then brought up the last Monty Hall problem, “Ignorant Monty”. Here, Monty doesn’t know where the prize is, so can open a door with the prize. But in this case you chose door #1, Monty randomly opened door #2 and you saw a goat. Does it matter if you switch or not? The class was divided, some thinking it would matter (improve your odds) and some not. So we did a spreadsheet calculation. Since we know how to do this, the key understanding is the likelihood: If the prize is behind door #1 (your chosen door), then whichever door Monty opens, you’ll see a goat. But there’s a 50% chance he’ll open door #2, so the probability of observing that data, given that the prize is behind door #1, is 0.5. Now, if the prize is behind door #2, then you’ll see a prize if he opens #2 so the probability that you’ll see a goat is 0. Finally, if the prize is behind door #3, you’ll certainly see a goat if he opens door #2, and he does this half the time, so the probability of observing the data we observed, given that the prize is behind door #3, is also 1/2. So, the likelihood column is (1/2, 0,1/2), and the posterior probabilitites that the prize is behind each door is (1/2, 0, 1/2). So it doesn’t matter if you switch.

We then talked about a very common problem: Estimating a rate from observations (e.g., what proportion of voters will vote for a particular candidate, the cure rate of a new drug, etc.) After some discussion, we decided that the cure rate of a new drug would be represented by a number between 0 and 1, i.e., 0≤r≤1. There are infinitely many possibilities. But we can’t draw a spreadsheet with infinitely many possibilities, so we settled on 10. I pointed out that you can get better resolution with more points, so for example if you used 100 possibilities, you’d probably be able to get adequate accuracy with up to 10,000 observed subjects, the square of 100. I also pointed out that in modern Bayesian research, we usually use approximate methods to get our answers (I’ll give more information on this at a later time).

So we used the 10 points (0.05, 0.15, 0.25,…,0.95) as the values of r at which we’d evaluate our spreadsheet. I listed them on the blackboard, and we assigned (for the moment) values of 1/10 all the way down for the prior. We then thought about the likelihood: The probability of observing m cures and n non-cures in a population of (m+n) patients. We decided on 3 cures and 7 not cured. We saw that because the observations are independent, the probability of observing a particular sequence of cures and not cureds, for each given rate, is r^{3}(1-r)^{7}. Each cured patient contributes a factor of r, and each patient not cured contributes a factor of (1-r).

I pointed out that if we multiply the prior column by any factor (say 10), that will multiply the joint column also by the same factor. Also, the marginal at the bottom of that column would get multiplied by the same factor, so that when you divide the joing column by the marginal, the factor will cancel out in the posterior column. So, we replaced the 1/10’s in the prior column by 1’s, which made the calculation of the joint equal to the likelihood. The resulting calculation is shown in the picture I took of the whiteboard before I erased it:

I then drew a plot of this on the right side and “connected the dots” with a smooth curve, which in fact represents what we would have gotten had we used many more values of r in the spreadsheet. I then put boxes over each data point and pointed out that the area of the boxes is equivalent to integrating the curve approximately, i.e., it’s an approximation to the area under the curve. (I’ll have more to say on this tomorrow).

## Leave a Reply