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!

Probability for a ball choosing game from infinite amount

  1. Jun 3, 2013 #1
    1. The problem statement, all variables and given/known data

    There is a large\infinite amount of balls in a basket to pick from.

    Each ball in the basket is with the same probability (33.33...%) either black, white or gray. No other colors exist.

    You first pick 4 balls out of the basket.

    Then you pick 2 more balls out of the basket.

    Question: What is the probability that the last 2 picked balls are fully 'contained' in the 4 balls?

    Notes: BOTH balls have to be of a same color of one of balls in the 4, and they both have to be unique. Thus: One black ball in the 4 counts only for one black ball in the last 2, etc...




    2. Relevant equations

    Simpler case: only one ball is drawn after the first four. Then the probability is:

    -- P(1 ball is contained in the 4) =[itex]1 - 2/3*2/3*2/3*2/3 = 1-(2/3)^4[/itex] == CORRECT


    The analytical solution for the full original 4+2 balls case is: [itex]399/729[/itex]. I have written and tested a computer program to find all the solutions for this, so it should be correct.




    3. The attempt at a solution


    -- P(1 ball is contained in the 4) AND P(1 ball is contained in the 4) =[itex](1-(2/3)^4) ^2[/itex] == WRONG

    I have no idea how to continue from here or why this is wrong.
     
  2. jcsd
  3. Jun 3, 2013 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    welcome to pf!

    hi bear_lord! welcome to pf! :smile:
    ah, but you haven't taken the "Note" into account! :wink:
     
  4. Jun 3, 2013 #3

    rcgldr

    User Avatar
    Homework Helper

    I'm not clear on how you handled all the possible outcomes:

    For the first part where you pick 4 balls:

    You pick 4 balls and they are all the same color.
    You pick 4 balls and they are some combination of just two colors.
    You pick 4 balls and they are some combination of all three colors.
     
  5. Jun 3, 2013 #4

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Why do you say that the correct answer is 399/729? The basis of this claim is not clear from what you wrote.
     
  6. Jun 4, 2013 #5

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    However, I get that answer too.
     
  7. Jun 4, 2013 #6

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    because bear_lord has counted them, using a computer program! :smile:
     
  8. Jun 4, 2013 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Ahhh, yes, but how do we know his computer program is correct? And, of course, if he can do it using a computer program, why can't he do it directly without a computer program? (I do agree with the claimed answer, I was just asking the OP to clarify.)
     
  9. Jun 4, 2013 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    The reason your method is OK for one ball but not for two (or more) is that with two balls, the probability of a "match" depends on the composition of the first four. If the first four are wwww, you need 2w on the second round, and the probability of that is 1/3^2 = 1/9. If the first four are wwwb (in any order) you need either {2w} or {1w and 1b in any order} on the second round; furthermore, P(2w) = 1/9 but P(1w,1b) =/= 1/9 because you can have first 'w then b' or 'first b then w', giving P(1w,1b) = 2/9, etc.
     
  10. Jun 4, 2013 #9
    Thanks for everybody participating in my (very first) thread on physicsforums.

    This question rose from a computer programming exercise. I wrote the code for the software first, and was intrigued about the analytical solution afterwards. (Also, bonus points were given for providing math.)

    The reason I was able to do the computer program was because I simply manually listed every single combination and through some hardship and testing was able to figure out how to count and print only the 'winning' combinations. This number came out to be the very 399/729.

    I think I can solve this now for myself but I need to go through every one of the possibilities, as Ray Vickson listed.
     
    Last edited: Jun 4, 2013
  11. Jun 4, 2013 #10

    rcgldr

    User Avatar
    Homework Helper

    I don't think this was explained yet. Pick 6 balls, each of which can be one of 3 colors, so the total number of outcomes is:

    36 = 729

    Then the program tests to see how many of these 729 outcomes meets the stated requirement. Assuming the program is correct, it determined that 399 of those outcomes met the requirement.
     
  12. Jun 4, 2013 #11

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I broke it into two cases, according to whether the last two balls are the same or different. E.g. if different, black and white say, we want the prob that the first four include at least one of each. We can use inclusion-exclusion here: 1 - P[no blacks] - P[no whites] + P[no blacks and no whites]
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted