# Chance without replacement

#### sandman

##### New Member
I have a statistics I'm not sure how to set up.

I have a bag of marbles 98 Black, 1 Red, and 1 Blue.

I pull one marble out at a time without replacement

At anytime you have option to throw out current bag and start a new bag with original 98 Black, 1 Red, 1 Blue count.

I want to represent the average amount of pulls needed to pull 2 red and 3 blue marbles and how to go about setting this up

#### sandman

##### New Member
Bumping due to first attempt at problem.

Average number of pulls to draw either r or b from 1 bag is 34 pulls.
Therefore, assuming on average if 34 pulls then 66 balls remaining with one of desired it makes more sense on average to continue pulling through same bag for last marble for average of ~33 more pulls? With this the possible sets are possible within population.

rrbbb, rbrbb, rbbrb, rbbbr, brrbb, brbrb, brbbr, bbrrb, bbrbr, bbbrr
bbrrr, brbrr, brrbr, brrrb, rbbrr, rbrbr, rbrrb, rrbbr, rrbrb, rrrbb

Assuming right order of b & r drawn, 5 times 34 equals 170 pulls total. However, half of the time you will have one the bottom row sets. In which case you would need to continue drawing from a pool of 66 marbles since early 3rd red was drawn. Worst case scenario I have to fish 1 more blue marble out of 66, or 33 more pulls on average for a total of 203 pulls on average from second row. Since both rows have an equal chance of happening I average the two pulls needed from both scenarios (170 +203)/2 = 187 pulls from 5 bags on average needed to draw 2 red and 3 blue marbles?

Last edited:

#### katxt

##### Member
You can try a simpler scenario first. How about the bags only contain 4 marbles each 2B 1R 1B? How many draws to get 2R and 3B?

#### sandman

##### New Member
You can try a simpler scenario first. How about the bags only contain 4 marbles each 2B 1R 1B? How many draws to get 2R and 3B?
that's the part that's most confusing for me, I'm not sure how to set up the probability for the average number of pulls from a finite bag needed to draw 1 of 2 variables. If it was just one marble from a bag of 4 i wanted, [1+2 +3+4]/4 = 2.5 draws? on average to one desired marble. But when its to draw either one of two I'm lost.

Last edited:

#### katxt

##### Member
Perhaps one way to get an estimate is to do a simulation.
As a general rule, in any situation you can calculate the chances of improving your collection by sticking, and improving by switching to a new bag. Then make the appropriate choice. Continue using the rule till you have your full collection. Record how many draws. Repeat many times and average.
For example, say you already have 1R and 1B there are still 3 balls you want. Say the bag has 20X and 1B remaining. Then the chance of getting another ball you want is 1/21 which is better than the 2/100 for a new bag. Do not switch.

#### sandman

##### New Member
My main issue is how do you know when its better to switch to new bag or when to keep going until you get next ball. For example I assume if I drew either red or blue on first marble draw then I should switch right? rather then continue digging through bag for a 1 in 98? After you successfully pull 1 of the 2 first time, how many pulls would it make sense to continue going through bag rather than switch to a new one for the 2 in 98 chance? I was hoping there was a method to know what the average number of pulls needed to pull either or first time is and that would answer question above? Am I right that the average pulls needed to pull either red or blue first time is 34? I didn't do any math, just assumed that because there's two I could spread out marbles like they were midpoints on a line 1-100 and on average the pulls would look something like this

1st pull-------------------34 pulls either r or b-------------------66 pulls remaining r or b-------------------100 pulls
I would assume there's a math model I don't know about you can calc to more precisely predict this

I was hoping there was a real life model without having to resort to simulations.

Last edited:

#### katxt

##### Member
Am I right that the average pulls needed to pull either red or blue first time is 34? I would assume there's a math model I don't know about.
The probability of not getting a R or B after n draws is 98/100*97/99*96/98* ... *(99-n)/(101-n). Most of this cancels to give (100-n)*(99-n)/100/99.
This is 50% when n = 29 approx, so your 34 is not too far out.

#### katxt

##### Member
My main issue is how do you know when its better to switch to new bag or when to keep going until you get next ball.
I gave an example a couple of posts back. If you know how many "good" balls you want are still in the bag, and you know how many balls in total are in the bag, you can work out the probability of getting a good ball if you draw from that bag. You can do the same calculation if you switch to a new bag. Whichever is the most likely to get you a good ball, take that option.

#### sandman

##### New Member
(99-n)/(101-n).
Is this supposed to be (98-n)/(100-n)?

EDIT: I"m sorry, just matters that first term would be 98/100 depending on how you start n

I gave an example a couple of posts back. If you know how many "good" balls you want are still in the bag, and you know how many balls in total are in the bag, you can work out the probability of getting a good ball if you draw from that bag. You can do the same calculation if you switch to a new bag. Whichever is the most likely to get you a good ball, take that option.
I apologize i don't know how to insert symbols and hope math lingo is right
Does this work? For average for drawing the one remaining ball would be summation of (1 + 2 + 3 + .... n remaing balls in bag)/n = average # of pulls to get last desired ball. If I assume average is 29 pulls to get one or other everytime, on average I have 71 remaining balls so (72*35.5)/71 = 36 more pulls to get last ball, more pulls than resesting and getting fresh 29 pull bag so better to assume on average switch bag after first 29 pulls everytime.

I'm still stuck on how to go about 2nd part to determine overall average number total pulls to get both balls. One factor you only need 2 r but 3 b's meaning if you switched every time after first desired ball you could potentially screw yourself later if you draw your 2 r's first, then you would need to go through at least 2 more full bags 1 in 99

Edit: What I'm taking from above post is that at this point its more practical to play every bag by ear and do individual calcs for each bag to get least amount of pulls? Or is there a feasible way without taking Theory of Probability course to know average amount of pulls one could expect every time to get above combination?

Last edited:

#### katxt

##### Member
Is this supposed to be (98-n)/(100-n)?

EDIT: I"m sorry, just matters that first term would be 98/100 depending on how you start n
The probability of not getting a good ball on draw 1 is 98/100 which is (100-n)*(99-n)/100/99 with n = 1.

This is how I see it. Imagine that you have 2R1B in hand and the bag contains 1R1B out of total of 30.
Should you switch or not? There is 1B in the current bag that you want. If you stick, the probability of getting it is 1/30. On the other hand, there is only 1 chance in 100 if you switch, so stick.
Do this calculation before every draw.

#### sandman

##### New Member
You can try a simpler scenario first. How about the bags only contain 4 marbles each 2B 1R 1B? How many draws to get 2R and 3B?

Going back to this scenario, 2 good balls I want out of 4 so the chance to not draw either on first turn = (3-n)/(5-n) = 2/4 = 50%. So On average I only need to draw 1 ball to get either or? This is part I'm stuck on due to only needing 2 rs and 3 bs how should I handle bag switching? It makes more sense to switch after every good ball first time due to needing more draws to get second, but there's the problem that potentially if you atuo switched you could get infinite of one color

Last edited:

#### katxt

##### Member
General rule. Keep drawing until you get a ball you need. Then consider the situation. Switch if the odds are better after switching. With this scheme, it can never take more than 5 bags
Example with 100 bag.
Full bag. 2R3B needed. B comes up at draw 17. Switch because 2 balls out 100 is better odds than 1 ball out of 83.
Full bag. 2R2B now needed. R comes at draw 61. Keep going because 1 ball out of 39 is better than 2 balls out 100. B comes up at 84. Switch.
Full bag. 1R1B now needed. R comes up at draw 27. (1B now needed.) Keep going because 1 ball out of 73 is better than 1 ball out of 100. B comes up at 32. Switch.
Full bag. 1B now needed. B comes up at draw 55. (R was at 27 but that doesn't matter.) Stop
Happy holidays. kat