Probability for a ball choosing game from infinite amount

AI Thread Summary
The discussion revolves around calculating the probability that the last two balls picked from a basket of infinite balls are of the same color as those in the first four balls picked. Each ball has an equal probability of being black, white, or gray. The analytical solution provided is 399/729, derived from a computer program that counted valid combinations. Participants noted the complexity of the problem, emphasizing that the composition of the first four balls affects the probability of matching colors in the last two picks. The conversation highlights the importance of considering all possible outcomes and combinations to arrive at the correct probability.
bear_lord
Messages
2
Reaction score
0

Homework Statement



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...




Homework Equations



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

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


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




The Attempt at a Solution




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

I have no idea how to continue from here or why this is wrong.
 
Physics news on Phys.org
welcome to pf!

hi bear_lord! welcome to pf! :smile:
bear_lord said:
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...

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

ah, but you haven't taken the "Note" into account! :wink:
 
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.
 
bear_lord said:

Homework Statement



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...




Homework Equations



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

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


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




The Attempt at a Solution




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

I have no idea how to continue from here or why this is wrong.

Why do you say that the correct answer is 399/729? The basis of this claim is not clear from what you wrote.
 
Ray Vickson said:
Why do you say that the correct answer is 399/729? The basis of this claim is not clear from what you wrote.
However, I get that answer too.
 
Ray Vickson said:
Why do you say that the correct answer is 399/729?

because bear_lord has counted them, using a computer program! :smile:
 
tiny-tim said:
because bear_lord has counted them, using a computer program! :smile:

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.)
 
bear_lord said:

Homework Statement



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...




Homework Equations



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

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


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




The Attempt at a Solution




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

I have no idea how to continue from here or why this is wrong.

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.
 
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:
  • #10
Ray Vickson said:
Why do you say that the correct answer is 399/729? The basis of this claim is not clear from what you wrote.
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.
 
  • #11
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]
 
Back
Top