Friday, September 25, 2009

Paint balling

You have a bag with four balls, each is a different colour. You draw two balls from the bag, one at a time. You paint the first ball to match the colour of the second ball, you then put both balls back in the bag. What is the expected number of drawings before all four balls are the same colour?

Assume very quick drying paint.

Labels:

3 Comments:

Blogger Ragknot said...

No comments yet?

If by "expected" you mean average, I would say 9. But thats not what I would expect. About 50% of the time you can get all the balls the smae color witn less than or equal to 7 repaint jobs.
But about 5% of the time it could take 25 repaint jobs. And 1% of the time it will take about 30 re-painted balls.

But I see that 5 times out of a million it took 69 repaint jobs!

The precentages make a nice curve but the repaint jobs of 3 time and 4 times did not fit the curve very well.

I can not understand why 3 would get 8.35%, 4 would get 11.11% and the peak is 5 with 11.39%. Then from 5 to 69 makes a smooth curve.
Prehaps there clitch in my model.

September 25, 2009 9:58 PM  
Blogger Chris said...

Hi Ragknot. In probability expected does mean average. I deliberately used expected, as it seems to give more opportunity for humourous replies.

I've no reason to think your model is wrong, as you have given the correct average. Thanks for that, I now have more confidence in the official solution. Thank you.

September 26, 2009 4:15 AM  
Blogger Chris said...

Filnally, the solution: Call the four colors 1,2,3, and 4.
After the first turn you will have a configuration like 1,1,2,3. Call this configuration 1.

From configuration 1 if you draw a 1 on the first ball you will end up with the same or similar configuration. The probability of this happening is 1/2.

From configuration 1 if you draw a 3 or 4 first and then a 1 you will have a configuration like 1,1,1,2. The probability of this happening is 1/3. Call this new pattern configuration 2.

From configuration 1 if you draw a 3 or 4 first and then draw the other non 1 you will have a configuration like 1,1,2,2. The probability of this is 1/6. Call this new pattern configuration 3.

From configuration 2 you will end up with the same pattern with probability 1/2, configuration 3 with probability 1/4, and ending the experiment with probability 1/4.

From configuration 3 you will end up with the same thing with probability 1/3, and with configuration 2 with probability 2/3.

From this information you can draw the following equations, where a is the expected number of turns from equation 1, b from equation 2, and c from equation 3:


a=(a+1)/2 + (b+1)/3 + (c+1)/6
b=(b+1)/2 + (1)/4 + (c+1)/4
c=(c+1)/3 + (2/3)*(b+1)

Solving that lot => a=8. Considering the first turn from the original condition to equation 1 the expected number of turns is 9.

December 21, 2009 11:26 AM  

Post a Comment

Links to this post:

Create a Link

<< Home