Originally posted by Tatanka Yotanka
We know the layout, but to recap: There are 8 marbles: 4 black; 4 white; divided and packaged as described.
A marble is chosen and there was a 50% chance that the marble would be black. Lucky us; it's black! That black marble could have come from one of 3 bags. Of the 3 possible bags only one of them can produce another black marble. Your chances on't say it's impossible, just that it's improbable ... yet you discard the 3rd bag anyway.
If you still don't believe everyone else, simulate it in a popular spreadsheet!
labels:
A1 = rand1, B1 = "Bag", C1 = rand2, D1 = "Ball 1", E1 = "Ball 2"
In A2 we are going to have a random integer between 0 and 3 to decide which of the four bags we get, so the formula can be:
=FLOOR(RAND()*4,1)
In B2 we have the bag we chose:
=IF(A2 = 0, "ww", IF(A2 = 3, "bb", "bw" )
(note the subsequent formulas depend on those exact strings)
so we can see we will get mixed bags twice as often as either of the other two bags, which is what the question specifies.
In C2 we are going to have another random number which controls which of the two balls in the bag we get:
=FLOOR(RAND()*2,1)
In D2 we are going to have the colour of the first ball:
=MID(B2, C1+1, 1)
this will select the first or second character in the ball name depending on the value of C1.
and in E2 we are going to have the colour of the second ball
=MID(B2, 2-C1, 1)
this will always be the other character in the ball name
Now copy those formulas down about 1000 rows. We have done 1000 bag/ball picks
Copy everything and paste as values so the ball picks don't change on us. otherwise the autofiltering below won't work.
Now highlight row 1 and do data / filter to get filter dropdowns based on the data in row 1.
Select the filter in the "ball 1" column and set to show "b" only.
highlight a single column and excel will give you the count of visible cells (actually cells+1 because it counts the column heading too), it will be about 500. This is the number of times a black ball was picked. Remember this number.
Without changing the "ball 1" filter, select the filter on the "ball 2" column and set to show "b" only.
Now highlight a column and excel will again tell you how many cells are visible after the filter. The number will be about 250, proving that half of the times that the first ball is black the second ball is too.