Mentor

## Two similar Bayesian problems. Did I get them right?

I would appreciate if someone could help me solve and understand these two problems. The first version of this post contained my attempts to solve them, but I have deleted those parts because I saw that I had messed up badly. I really suck at this type of problems, but perhaps someone can show me a good way to approach them.

Edit: OK, now I think I get it. If I still think I'm right in 20 minutes I'll probably edit this post again and add my new attempts to solve the problems.

Another edit: I have to go to bed, so I don't have time to post the explanations, but the results I get are 10/11 for the first problem and 1/2 for the second. Does that sound right?

This is not homework by the way. Oh, and since I'm asking about "Bayesian" probabilities, I would also appreciate if someone could tell me how that word is supposed to be pronounced. Baysian? Buy-eeshan? Buy-eezian? Bay-eezian? I've been wondering about that for years.

Problem 1 Two identical boxes. One of them contains 10 balls numbered 1-10. The other one contains 100 balls numbered 1-100. You don't know if the box on the left contains 10 or 100. You use a coin flip to choose one of the boxes and ask a friend to pick a ball at random from it. The ball he picks has the number 9 written on it. What is the probability that the box you chose contained 10 balls?

Problem 2 Two identical buildings. Both of them contain 100 rooms numbered 1-100. 110 people are blindfolded and randomly put into rooms 1-10 of building A, and rooms 1-100 of building B. You're one of those people, and you're told that your room number is 9. What's the probability that you're in building A?

 PhysOrg.com science news on PhysOrg.com >> Front-row seats to climate change>> Attacking MRSA with metals from antibacterial clays>> New formula invented for microscope viewing, substitutes for federally controlled drug
 Recognitions: Homework Help Science Advisor "Bayesian" comes from a guy named "Bayes", which would be pronounced like "Bays". So "Bayesian" is pronounced like "Bays-Ian". You can actually here it here. Anyways, the idea is to use the idea of conditional probability: $$P(A | B) = \frac{P(A \cap B)}{P(B)}$$ So the probability of A, given that B has occured, is equal to the probability that both A and B occur, divided by the probability that B occurs. In problem 1, you want to calculate the probability that the box chosen had 10 balls, given that the ball that was picked had 9 written on it.
 Mentor Thanks AKG. At least now I know how pronounce Bayesian. I'm not sure I understand the formula for the conditional probability though. A and B are obviously not independent in the formula. If they were, the formula would be kind of pointless, since we would have P(A|B)=P(A) and P(A and B)=P(A)*P(B). What I don't understand is what P(A and B) means when A and B are not independent. Anyway, that doesn't matter much right now, since I believe my solutions are correct. If I'm wrong, I hope someone will tell me. These are my solutions: Problem 1 There was a 1/2 probability that you picked the box with 10 balls and a 1/2 probability that you picked the box with 100 balls. If you picked the box with 10 balls, it was certain that the ball your friend picked would have a number less than 11. If you picked the box with 100 balls, there was only a 1/10 chance that he would pick a ball with a number less than 11, and a 9/10 chance that he would not. From this we get the probabilities for each possibility: . . . . . . . . . . . . . Small number . . . . . . . . . Large number Box with 10 . . . . . 1/2 * 1 = 1/2 . . . . . . . . 1/2 * 0 = 0 Box with 100 . . . . 1/2 * 1/10 = 1/20 . . . . . . 1/2 * 9/10 = 9/20 If we do this a large number of times, we will get a ball with a small number from the box with 10 balls 1/2 the times and we will get a small number 1/2 + 1/20 = 11/20 times. The probability we seek is the first of those numbers divided by the second: (1/2)/(11/20)=10/11. Problem 2 You were assigned a room that was chosen at random from a set of 110 rooms, 10 of which is in building A, so there was a 1/11 probability that you ended up in building A and a 10/11 probability that you ended up in building B. If you ended up in building A, it was certain that you would get a low room number. If you ended up in building B, there was a 1/10 probability that you would get a low room number and a 9/10 probability that you would get a high room number. From this we get the probabilities for each possibility: . . . . . . . . . . . . . Small number . . . . . . . . . Large number Building A . . . . . . 1/11 * 1 = 1/11 . . . . . . . 1/11 * 0 = 0 Building B . . . . . . 10/11 * 1/10 = 1/11 . . . . 10/11 * 9/10 = 9/11 If you do this a large number of times, you will find yourself in a room with a small number in building A 1/11 times, and you will find yourself in a room with a small number 2/11 times. The probability we seek is the first of those numbers divided by the second: (1/11)/(2/11)=1/2.

## Two similar Bayesian problems. Did I get them right?

I would suggest that you use the formula:

$$P(A|B)= \frac{P(B)P(B|A)}{P(A)}$$

instead. In the first example $$A$$ is "the box contains 10 balls" and $$B$$ is "You pick ball number 9", we get $$P(B)= \frac{1}{2}(\frac{1}{10}+\frac{1}{100})$$, $$P(B|A)= \frac{1}{10}$$, and $$P(A)=\frac{1}{2}$$. Hence $$P(A|B)= \frac{10}{11}$$.

Recognitions:
Homework Help
 Quote by DavidK I would suggest that you use the formula: $$P(A|B)= \frac{P(B)P(B|A)}{P(A)}$$