1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Two similar Bayesian problems. Did I get them right?

  1. Mar 12, 2006 #1

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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: Mar 12, 2006
  2. jcsd
  3. Mar 12, 2006 #2

    AKG

    User Avatar
    Science Advisor
    Homework Helper

    "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.
     
  4. Mar 13, 2006 #3

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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.
     
  5. Mar 13, 2006 #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].
     
  6. Mar 16, 2006 #5

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    Did you mean P(A|B) = P(A)P(B|A)/P(B)?
     
  7. Mar 17, 2006 #6
    Yes I did :blushing:
     
  8. Nov 9, 2008 #7
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?