Two similar Bayesian problems. Did I get them right?

  • Thread starter Fredrik
  • Start date
  • Tags
    Bayesian
In summary: The probability you seek is the probability that you would get a low room number, given that you were assigned that room: (1/11)/(10/11)=2/3.
  • #1
Fredrik
Staff Emeritus
Science Advisor
Gold Member
10,877
422
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. :smile:


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?
 
Last edited:
Physics news on Phys.org
  • #2
"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:

[tex]P(A | B) = \frac{P(A \cap B)}{P(B)}[/tex]

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.
 
  • #3
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.
 
  • #4
I would suggest that you use the formula:

[tex] P(A|B)= \frac{P(B)P(B|A)}{P(A)}[/tex]

instead. In the first example [tex]A[/tex] is "the box contains 10 balls" and [tex]B[/tex] is "You pick ball number 9", we get [tex]P(B)= \frac{1}{2}(\frac{1}{10}+\frac{1}{100})[/tex], [tex]P(B|A)= \frac{1}{10}[/tex], and [tex]P(A)=\frac{1}{2}[/tex]. Hence [tex] P(A|B)= \frac{10}{11}[/tex].
 
  • #5
DavidK said:
I would suggest that you use the formula:

[tex] P(A|B)= \frac{P(B)P(B|A)}{P(A)}[/tex]
Did you mean P(A|B) = P(A)P(B|A)/P(B)?
 
  • #6
EnumaElish said:
Did you mean P(A|B) = P(A)P(B|A)/P(B)?

Yes I did :blushing:
 
  • #7
Fredrik said:
I believe the answer to both the problem is 10/11. I think its straightforward in the first case, whereas in the second one the probability of picking room no. 9 given that the person is in bldg A is 1/10 only bcos only 10 rooms were occupied and since we chose an occupied room.
 

1. What is a Bayesian problem?

A Bayesian problem is a type of statistical problem that involves using Bayesian inference to make predictions or draw conclusions based on data. This approach uses prior knowledge and beliefs, along with the observed data, to update the probability of a hypothesis or event.

2. How do you know if two problems are similar in a Bayesian framework?

Two problems are considered similar in a Bayesian framework if they have the same underlying structure and assumptions, and can be solved using the same Bayesian methods. This means that the same prior distributions and likelihood functions can be applied to both problems.

3. Can two similar Bayesian problems have different solutions?

Yes, two similar Bayesian problems can have different solutions if different priors or likelihood functions are used. The solutions may also differ if the data sets used for each problem are different.

4. How do you determine if you have solved two similar Bayesian problems correctly?

You can determine if you have solved two similar Bayesian problems correctly by checking if your solutions are consistent with the underlying assumptions and if they follow the principles of Bayesian inference. Additionally, you can compare your results with other solutions in the literature.

5. What are some common mistakes when solving two similar Bayesian problems?

Common mistakes when solving two similar Bayesian problems include using incorrect prior distributions or likelihood functions, making incorrect assumptions about the underlying data, and not properly updating the prior probabilities with the observed data. It is important to carefully consider the assumptions and check the calculations to avoid these mistakes.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
20
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
907
  • Set Theory, Logic, Probability, Statistics
Replies
21
Views
2K
  • Precalculus Mathematics Homework Help
Replies
10
Views
958
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
Back
Top