1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Probability Problem - Is it a Bayes application?

  1. Aug 30, 2012 #1
    1. The problem statement, all variables and given/known data

    There are two boxes:
    - in the first one there is 1 red ball,
    - in the second one there are 2 balls, 1 red & 1 white.

    1st draw: We take a ball from the second box without taking a look at the color and we put it in the first box.
    2nd draw: We take a ball from the first box.

    The ball is red.

    What is the probability of having another red ball in the first box?

    2. Relevant equations

    [itex]P(R)[/itex] is the probability of taking a red ball on first draw
    [itex]P(r)[/itex] is the probability of having a red ball in the first box after the second draw
    [itex]P(R|r)[/itex] is the probability of having taken a Red ball on the first draw, given that we have found a red ball in the first box after the second draw.
    [itex]P(r|R)[/itex] is the probability of having a red ball in the first box, given that we took a Red ball on the first draw.

    3. The attempt at a solution

    I can hardly find something more than Probability to which apply the sentence "it's not my cup of tea": :smile:

    Actually I am not even sure about the way in which I framed the problem in [2.].
    However, if that framework stands, then I would say that:


    And here there is the mistake (I am almost sure about it, even if I dont' see why):
    [tex]P(r)= \frac{P(R)P(r|R)}{P(R|r)}=\frac{1}{2}[/tex]

    Right or wrong?
  2. jcsd
  3. Aug 31, 2012 #2
    Just wondering, is unclear the way in which I describe the problem or the answer is so obvious that is embarassing that I even bother with a question like this one? :smile:

    Still, I cannot really figure out the answer. I kinda have the feeling that the previous one cannot be the right answer, but I don't know exactly why (in particular in terms of formulae).

    I was thinking that the following could be another way to find a solution.
    In the end we have the following situation in the first box:
    R & R\\
    R & W
    Then we know that we have found a red ball R from the second draw. It means that the possibility to find another red ball is 2/3.

    Now, this solution looks a bit more reasonable to me, but - if it is right (and I don't know) - I have no idea how it comes from formulae.

    Thanks in advance if somebody will shed some light on this problem. :smile:

    PS: In the end, can it be considered an application of Bayes Theorem? More or less we have to update our beliefs.
  4. Aug 31, 2012 #3
    don't confuse Bayes theorem with a Bayesian approach to probability.

    Here's an example to try and show the difference between bayesian and frequentist views.

    I roll a die 24 times and score a six 12 times. Before rolling both observers expect the die to be fair. Afterwards a frequentist will just say that the result is a rare event, a bayesian would say that the die is probably rigged. Same data, same die, different conclusions.

    You can always apply Bayes Theorem.

    the problem looks like a variant of "Monty Hall" (google it :) )


    You are correct to be concerned about your initial answer. But I'm worried about mine so I've deleted it.
    Last edited: Aug 31, 2012
  5. Aug 31, 2012 #4

    First of all, really thanks a lot for your hint! :smile:

    I kinda suspected there was a relation with the Monty Hall Problem, and that's why I revised my solution moving to 2/3. Indeed, that solution was driven by the Monty Hall reasoning, however:
    1) I was not sure about the answer,
    2) I had no idea on how to came up with a formal solution.

    Hopefully (we still gotta find out if I get the solution or not...) your hint helped me, cause in the wiki page of the Monty Hall Problem there is a formulation in terms of the Bayes' Theorem. And I moved from that...

    Let's [itex]P(R)[/itex] the probability of drawing a Red ball from the second box, [itex]P(W)[/itex] the probability of drawing a White ball from the second box and [itex]P(r)[/itex] the probability of drawing a red ball from the first box.
    Just to remind, [itex]P(R)[/itex] and [itex]P(W)[/itex] are both related with the first draw, while [itex]P(r)[/itex] is the event that we actually know. Indeed we know that we get a red ball from the second draw.

    [This is probably the most serious mistake in my previous way of framing the problem: I simply didn't consider it, which is the only way to apply the Bayes' Theorem. Really a huge mistake! :redface:]

    Then, from Bayes' Theorem we have:

    [tex]P(R|r)= \frac{P(r|R)P(R)}{P(r|R)P(R)+P(r|W)P(W)}= \frac{1*1/2}{1*1/2 + 1/2*1/2}= \frac{2}{3}[/tex]

    So, in the end, to get the solution of the problem we should rephrase it: instead of looking for the probability of having a red ball in the first box, we should find the probability of having taken a Red ball from the first draw.

    This should be the solution, even if I would still wait the last word of somebody more expert to be sure. :smile:
    Last edited: Aug 31, 2012
  6. Aug 31, 2012 #5
    I get 2/3, your P(R|r) looks good to me, and I agree that P(R|r) is the same as the result you are seeking.

    But there is still something bugging me about my own math - which is going to annoy me no end until I figure out what it is.
  7. Sep 1, 2012 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    One way to approach such problems is to imagine performing the experiment over and over again, independently, a large number of times, and just counting the number of experiments in which some event of interest occurs. So, say we do it 2,000,000 times. In 1,000,000 of the experiments we will be transferring a red ball to box 1, and in the other 1,000,000 we will be transferring a white ball. So, in 1,000,000 of the cases box 1 now has 2 red balls, and in 1,000,000 of the cases it has one red and one white ball. Now we draw a red ball from box 1. This means we are not in the 500,000 cases where we draw a white ball, but, rather, are in the 1,500,000 remaining cases, and of these, 1,000,000 leave behind another red ball. So, just by counting, we see that P{R2|R1} = 1M/1.5M = 2/3.

    Of course, if you set it up properly the Bayesian computation is just this argument after cleaning it up a bit.

  8. Sep 1, 2012 #7

    Now, this is enlightening, cause it's a fast way to think about this problem and I can see why it works.

    My question is now, would you say that this way of rephrasing the problem is equal to the following... (assuming that what is in the matrix represents two alternative states of affairs)

    I was just wondering about it, because this way of reasoning gave me the hint to the right solution, but - at the same time - it really didn't give me the feeling of soundness of your example. In other words, I cannot really see why it works.

    Just thinking, is it a sloppy way of saying what you say or it doesn't work and that's it?
  9. Sep 1, 2012 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    You can easily do it via Bayes, but you should more carefully spell out the "events" and use a better notation. For example: let
    [tex]R_1 = \{\text{first drawn ball is red} \}; \; P(R_1) = 1/2\\
    W_1 = \{ \text{first drawn ball is white} \}; \; P(W_1) = 1/2\\
    R_2 = \{ \text{second drawn ball is red } \}\\
    E = \{ \text{red left behind after draw 2} \}. [/tex]
    Note that E occurs if and only R1 occurs, so they are the same event! Therefore, we want to find [itex] P(R_1|R_2).[/itex]

    We have
    [tex]P(R_2) = P(R_2|R_1)P(R_1) + P(R_2|W_1) P(W_1) = 1 \cdot \frac{1}{2} + \frac{1}{2}\cdot \frac{1}{2} = \frac{3}{4}.[/tex]
    [tex] P(R_1|R_2) = \frac{P(R_2|R_1) \cdot P(R_1)}{P(R_2)} = \frac{1/2}{3/4} = \frac{2}{3}.[/tex]

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook