Statistical problem of drawing colored balls from boxes

Click For Summary

Discussion Overview

The discussion revolves around a statistical problem involving a game of drawing colored balls from two boxes, focusing on calculating the expected number of draws based on the game's rules. Participants explore the probabilities associated with drawing different colored balls and how these affect the total number of draws in the game.

Discussion Character

  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant describes the game rules and presents initial calculations for the expected number of draws, arriving at an average of 3.035 draws based on specific probabilities for drawing colored balls.
  • Another participant challenges the initial calculation, suggesting that the expected number of draws should be around 1.97 when considering the probabilities and the game mechanics.
  • A later reply clarifies that the probabilities for drawing colored balls in the second box remain constant due to replacement, leading to a revised calculation of expected draws, resulting in 1.588 for the second box alone.
  • Further clarification is provided regarding the normalization of expected draws based on the probabilities of drawing non-white balls, leading to a recalculated average of 3.0347.
  • One participant expresses confusion over the purpose and calculation of a specific value (D) and questions its relevance to the overall expected draws.
  • Another participant confirms a bug in their simulation code, which previously led to discrepancies in the expected number of draws, now aligning with the calculated value of 3.034 after correction.

Areas of Agreement / Disagreement

Participants express differing views on the expected number of draws, with some calculations yielding values around 3.035 while others suggest lower averages. The discussion remains unresolved regarding the accuracy of these calculations and the implications of the game mechanics.

Contextual Notes

Participants note the importance of considering the probabilities of drawing white balls, which do not contribute to additional draws, and the impact of replacement on the probabilities in the second box. There are also mentions of potential bugs in simulations affecting results.

KFC
Messages
477
Reaction score
4
Last week I went to a state fair which I saw a game of lucky draw. There is two sealed boxes, contains bunch of 4 different color balls: red, blue, green and white. Here is the game rule. Players make an initial draw on box one, if players get a white ball, lose the game; if getting a red one, get 4 free draws; getting a blue one, get 3 free draws; getting a green one, get 2 free draws. Players make the free draws in the second box. In this scenario, in any draw if players getting any red ball, 3 more draws added; any blue one, 2 more draws added; getting any green one, 1 more draw added; getting white one does not award additional drawing chance but will NOT lose the game immediately. The game is over when all drawing chances used up. The reward gift based on how many total color balls are obtained. I am interesting in finding out how many draws in average will this game given in case a non-white ball was drawn in first round?

I did some math based on what I learned from the text as follows. Let's assume for the first draw, the chance to get a red/blue/green ball is ##p_1=0.05, p_2=0.1## and ##p_3=0.17## respectively so 1-0.05-0.1-0.17=0.68 chance will get a white one and lose the game.

After the first draw, if not losing the game, the chance to get a red/blue/green ball is ##q_1=0.01, q_2=0.03## and ##q_3=0.045## respectively. So in this scenario, the contribution to the average time from the initial win 4/3/2 is

##\displaystyle E_4 = \frac{4}{1-(q_1\times3 + q_2\times 2 + q_1\times 1)};##

##\displaystyle E_3 = \frac{3}{1-(q_1\times3 + q_2\times2 + q_1\times 1)};##

##\displaystyle E_2 = \frac{2}{1-(q_1\times 3 + q_2\times 2 + q_1\times 1)}.##

But note that there is ##p_1/p_2/p_3## chance to get 4/3/2 draws initially. So the total average number of draws should be

##
\overline{D} = p_1 E_4 + p_2 E_3 + p_3 E_2
##

By plugging the numbers into that, I got 3.035 draws. I am not quite sure this is correct because I write a short program to simulate this game but I get the average draw to be 1.05 instead.
 
Physics news on Phys.org
With your formulas I get 0.97 draws from the second box. If we add the one draw from the first box, it increases to 1.97.

How did you get 3.035? The denominator is 0.865, you have a 1/3 chance to get draws at all, and get about 3 - without calculator you can see that the value has to be around 1.
 
Sorry, I didn't complete the math. I typed all but after I preview that some part were gone, don't know why. Anyway, let me rephrase it here. One thing is very important I missed in the question, in second box game, place the drawn ball back to the box, so the probability of drawing red/blue/green ball is always q1, q2 and q3 separately. In box 2, the expect # of draws for 3/2/1 is ##3q_1/(q_1+q_2+q_3)##, ##2q_2/(q_1+q_2+q_3)## and ##q_3/(q_1+q_2+q_3)##. So

##
D = \displaystyle{\frac{3q_1 + 2q_2 + q_3}{q_1+q_2+q_3}} = 1.588
##
Note that it is not 1/3 to get draws because there will be white balls in the box which gain no draw if get one.

Now consider the chance to start the second game, the expectation when 4/3/2 initial obtained is

##
E_4 = \displaystyle{\frac{4}{1-(3q_1 + 2q_2 + q_1)}},
E_3 = \displaystyle{\frac{3}{1-(3q_1 + 2q_2 + q_1)}},
E_2 = \displaystyle{\frac{2}{1-(3q_1 + 2q_2 + q_1)}},
##

Now consider the probability to get the red/blue/green ball in the first box

##
\overline{\mbox{# draw}} = (p_1E_4 + p_2E_3 + p_1E_2)/(p_1+p_2+p_3) = 3.0347
##

Here we need to normalize it with the total probability to get red/blue/green ball. That is how I get the 3.0347.
 
I don't understand your new calculation of D at all. What does it calculate, why, how? Where do you use this result?
KFC said:
Here we need to normalize it with the total probability to get red/blue/green ball.
Only if you want the expected number of draws under the condition that it is not zero. Are you really interested in this case?
 
##E_n## is obtained from ##D## in the way

##
E_n = \frac{n}{1- D\sum q_i}
##

Well, I just find that there is a bug in my program, I corrected it and my simulation shows the same result (3.034) now. So I think the above calculation should be correct.

Here is what I did in my code
Setup a game with two box, in box 1, there will be ##p_1, p_2, p_3## chance to get red/blue/green ball and ##1-(p_1+p_2+p+_3)## chance to get a white one; in box 2, there will be ##q_1, q_2, q_3## chance to get red/blue/green balls and ##1-(q_1+q_2+q_3)## chance to get white one. Several variables setup: count_of_win_games used to count the time winning a game (got 4/3/2 in box 1), total_count_draws counts total_number_draws in the simulation. I simulate 1,000,000,000 games, in each game

total_count_draws=0; total_number_draws=0
1) draw a ball from box 1 at the given weight
2) if got a white one, game over, start a different game and goto 1)
3) if got a red/blue/green ball, given 4/3/2 initial draws; increase total_count_draws by one; total_number_draws=total_number_draws+4/3/2
4) repeat drawing ball in box 2; each time, draw a ball at the given probability distribution;
4a) if get a while ball, do nothing
4b) if get a red/blue/green, total_number_draws =total_number_draws + 3/2/1; give 3/2/1 more draw
5) until no more draws left

The average number of draws is then calculated as total_number_draws/total_count_draws. I got 3.035
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 131 ·
5
Replies
131
Views
9K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K