Probability problem of choosing a ball from a box

nguyen

New member
Joined
Nov 12, 2023
Messages
6
I'd like to set up a game for our friends with the following rule:
+ There are 10 balls in a box, consisting of 1 green, 2 red, 3 yellow, and 4 colorless balls.
+ The rules of the game are simple: keep picking up one ball at a time until you encounter either 1 green ball, 2 red balls, or 3 yellow balls.
I'm interested in creating a table that calculates the probability of drawing the entire set of balls by the Nth attempt:

DrawnGreenRedYellow
1P=1/10P1P=0P=0
2P=(9*1)/10P2P=2!/10P2P=0
3P=3!/10P3
4
5
6
7
The calculation is really difficult for the following cases, please help me find a general calculation
 
I'd like to set up a game for our friends with the following rule:
+ There are 10 balls in a box, consisting of 1 green, 2 red, 3 yellow, and 4 colorless balls.
+ The rules of the game are simple: keep picking up one ball at a time until you encounter either 1 green ball, 2 red balls, or 3 yellow balls.
I'm interested in creating a table that calculates the probability of drawing the entire set of balls by the Nth attempt:

DrawnGreenRedYellow
1P=1/10P1P=0P=0
2P=(9*1)/10P2P=2!/10P2P=0
3P=3!/10P3
4
5
6
7
The calculation is really difficult for the following cases, please help me find a general calculation
Please show us what you have tried and exactly where you are stuck.

Please follow the rules of posting in this forum, as enunciated at:

READ BEFORE POSTING

Please share your work/thoughts about this problem
 
I'd like to set up a game for our friends with the following rule:
+ There are 10 balls in a box, consisting of 1 green, 2 red, 3 yellow, and 4 colorless balls.
+ The rules of the game are simple: keep picking up one ball at a time until you encounter either 1 green ball, 2 red balls, or 3 yellow balls.
I'm interested in creating a table that calculates the probability of drawing the entire set of balls by the Nth attempt:

DrawnGreenRedYellow
1P=1/10P1P=0P=0
2P=(9*1)/10P2P=2!/10P2P=0
3P=3!/10P3
4
5
6
7
The calculation is really difficult for the following cases, please help me find a general calculation
This cannot be answered as posted because you did not tell us if the balls are drawn with or without replacement.
 
I'm interested in creating a table that calculates the probability of drawing the entire set of balls by the Nth attempt
Obviously you don't really mean "the entire set of balls" (which will always happen on the nth draw, assuming the selections are without replacement); my best guess is that you mean all the balls of some particular color.

Do you mean, the probability that on the nth draw (without replacement) you will take the last (only) green, or the last red, or the last yellow, or the last colorless ball, respectively? Or that you will have done so on or before that draw?

Or do you mean something else? Clarity of wording is extremely important in problems like this.
 
Please show us what you have tried and exactly where you are stuck.

Please follow the rules of posting in this forum, as enunciated at:

READ BEFORE POSTING

Please share your work/thoughts about this problem
Sorry, maybe I didn't explain clearly, I tried to calculate a few cases as shown in the table and I have difficulty with the following cases. So I hope to find a way to solve it with a code or a general formula or whatever so I can fill out the table easily.
 
Obviously you don't really mean "the entire set of balls" (which will always happen on the nth draw, assuming the selections are without replacement); my best guess is that you mean all the balls of some particular color.

Do you mean, the probability that on the nth draw (without replacement) you will take the last (only) green, or the last red, or the last yellow, or the last colorless ball, respectively? Or that you will have done so on or before that draw?

Or do you mean something else? Clarity of wording is extremely important in problems like this.
That's right, I want to calculate the probability of getting the last color of 3 colors (red, green, yellow) at the Nth time. Below is an example illustrating the rules of the game:
+The first time I took a red ball and put it out of the box, the game did not stop because this was not the last ball of that color.
+The second time I took a colorless ball and put it out of the box, the game did not stop (the game will never stop with a colorless ball).
+The third time I took a green ball, the game stopped because there was only 1 green ball or was this the last green ball.
So I will determine the prize for this person by determining which ball was last stopped on (green) and the number of times the ball was drawn (3rd).
 
getting the last color of 3 colors (red, green, yellow) at the Nth time
That's not really what you mean; presumably you mean getting the last ball of one of the three colors.
Below is an example illustrating the rules of the game:
+The first time I took a red ball and put it out of the box, the game did not stop because this was not the last ball of that color.
+The second time I took a colorless ball and put it out of the box, the game did not stop (the game will never stop with a colorless ball).
+The third time I took a green ball, the game stopped because there was only 1 green ball or was this the last green ball.
So I will determine the prize for this person by determining which ball was last stopped on (green) and the number of times the ball was drawn (3rd).
An example like this helps a lot. In particular, it makes little lapses (like saying "which ball was last stopped on (green)", when you clearly mean "which color"). And "the number of times the ball was drawn (3rd)" clearly means "a ball", not that particular ball. The more words you use, the better (up to a point). That's something I often tell people whose first language is not English (or mathematical English, for that matter).

You hadn't mentioned the prize (and still haven't said how it is determined), but that doesn't affect the probabilities, so it's appropriate to omit that.

Now that we understand the problem (I think), we can look at your work. The first entry on the second row says that (according to you) the probability that the second ball drawn will be green (stopping the game) is (9*1)/10P2. Presumably you mean that the two balls chosen have to be a non-green (9 ways) and then a green (1 way), out of a total of 10P2 = 45, making the probability 9/45 = 1/5. Good. You are consistently treating the balls as distinguishable, and the order as significant.

The other formulas you show are similarly appropriate.

Now we just need to see why you are stuck on the rest. Can you show us your thinking for the two missing entries on the third row, so we can see how you are thinking?
 
When the next number of balls is drawn, things become more difficult. My approach is to list out the cases and that gets really time consuming when there are a lot of drawn balls. So I need suggestions on how to approach the problem effectively.
My goal is to have this problem calculated automatically (I may change the total number of balls and the number of each type of ball).
That's not really what you mean; presumably you mean getting the last ball of one of the three colors.

An example like this helps a lot. In particular, it makes little lapses (like saying "which ball was last stopped on (green)", when you clearly mean "which color"). And "the number of times the ball was drawn (3rd)" clearly means "a ball", not that particular ball. The more words you use, the better (up to a point). That's something I often tell people whose first language is not English (or mathematical English, for that matter).

You hadn't mentioned the prize (and still haven't said how it is determined), but that doesn't affect the probabilities, so it's appropriate to omit that.

Now that we understand the problem (I think), we can look at your work. The first entry on the second row says that (according to you) the probability that the second ball drawn will be green (stopping the game) is (9*1)/10P2. Presumably you mean that the two balls chosen have to be a non-green (9 ways) and then a green (1 way), out of a total of 10P2 = 45, making the probability 9/45 = 1/5. Good. You are consistently treating the balls as distinguishable, and the order as significant.

The other formulas you show are similarly appropriate.

Now we just need to see why you are stuck on the rest. Can you show us your thinking for the two missing entries on the third row, so we can see how you are thinking?
 
When the next number of balls is drawn, things become more difficult. My approach is to list out the cases and that gets really time consuming when there are a lot of drawn balls. So I need suggestions on how to approach the problem effectively.
You did fine in the parts you show, using permutations rather than listing everything. And I explained what you did in a way that can be extended.

Let's take the next case, where the third ball is the one green. This means the three balls you got are two non-green, followed by the green. How many ways can this happen? There are 9 non-green and 1 green; so the two non-greens can be chosen in 9P2 ways, and the one green in 1P1 = 1 way. This gives a probability of 9P2 * 1P1 / 10P3 = 72/720 = 1/10.

Well, no, it's not quite that simple, because you really want this case to exclude cases where the first two balls made a winner, namely if both were red. So you want the probability that none of the events in higher rows occurred, and the third ball is green. (And other cases will be more involved than that.) I think your calculations in one row will depend on all the calculations from the previous row; a spreadsheet, rather then just a stand-alone formula for each probability, may be appropriate.
 
You did fine in the parts you show, using permutations rather than listing everything. And I explained what you did in a way that can be extended.

Let's take the next case, where the third ball is the one green. This means the three balls you got are two non-green, followed by the green. How many ways can this happen? There are 9 non-green and 1 green; so the two non-greens can be chosen in 9P2 ways, and the one green in 1P1 = 1 way. This gives a probability of 9P2 * 1P1 / 10P3 = 72/720 = 1/10.

Well, no, it's not quite that simple, because you really want this case to exclude cases where the first two balls made a winner, namely if both were red. So you want the probability that none of the events in higher rows occurred, and the third ball is green. (And other cases will be more involved than that.) I think your calculations in one row will depend on all the calculations from the previous row; a spreadsheet, rather then just a stand-alone formula for each probability, may be appropriate.
I think your calculation has a bit of a problem, there is a case where the first 2 balls are red, so a 3rd draw cannot appear. This is one of the difficulties I mentioned.
 
I think your calculation has a bit of a problem, there is a case where the first 2 balls are red, so a 3rd draw cannot appear. This is one of the difficulties I mentioned.
That's the difficulty I mentioned!
Well, no, it's not quite that simple ...

What we want to see is what you plan to do about it. I suggested a partial strategy.
 
Top