Probability/Combinatorics: # ways of picking 5 from 3 groups of 6

  • Thread starter Thread starter Master1022
  • Start date Start date
  • Tags Tags
    Groups
AI Thread Summary
The discussion focuses on calculating the probability of selecting exactly two colors from a bag of 18 marbles (6 red, 6 blue, 6 yellow) when picking 5 marbles without replacement. Two methods are proposed: one using a pure counting argument and another framing the problem as an equation with constraints on the colors chosen. The first method calculates the probability as 65/238, while the second suggests a different approach leading to a probability of 4/7. Participants clarify the use of set notation and the reasoning behind the equations, with a consensus that the first method's result is correct. The conversation highlights the complexities of combinatorial probability and the importance of clear notation in mathematical discussions.
Master1022
Messages
590
Reaction score
116
Homework Statement
We have a bag of 18 marbles: 6 red, 6 blue, and 6 yellow. Now I randomly select 5 marbles from the bag without replacement. What is the probability that I have picked out EXACTLY 2 colors?
Relevant Equations
Combinatorics
Hi,

I was attempting the following question and was getting slightly stuck.

Question: We have a bag of 18 marbles: 6 red, 6 blue, and 6 yellow. Now I randomly select 5 marbles from the bag without replacement. What is the probability that I have picked out EXACTLY 2 colors?

Attempt: I tried to think about this problem in two different ways:

1) Pure counting argument such that ##p = \frac{\text{Number of ways which we pick 2 colors}}{\text{Total number of ways of picking 5 from 18}} ##

So my logic was as follows:
- there are ##\begin{pmatrix} 3 \\ 2 \end{pmatrix}## ways of picking 2 out of the three colors
- Then for each of those pairs of colors (let us call them A and B), we can do: (1 from A, 4 from B), (2 from A, 3 from B), (3 from A, 2 from B), (4 from A, 1 from B). This can be written more formally as:
\begin{pmatrix} 6 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix} + \begin{pmatrix} 6 \\ 2 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 3 \end{pmatrix} + \begin{pmatrix} 6 \\ 3 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 2 \end{pmatrix} + \begin{pmatrix} 6 \\ 4 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix}

and thus this becomes:
\begin{pmatrix} 3 \\ 2 \end{pmatrix} \left( \begin{pmatrix} 6 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix} + \begin{pmatrix} 6 \\ 2 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 3 \end{pmatrix} + \begin{pmatrix} 6 \\ 3 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 2 \end{pmatrix} + \begin{pmatrix} 6 \\ 4 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix} \right)

I am slightly confused on how to get the total number of ways of picking 5 from 3 groups of 6. I mean I can see the obvious ## \begin{pmatrix} 18 \\ 5 \end{pmatrix} ##, but doesn't that double count some groupings?? This was asked as an interview question, so I don't think I would have time to write down very elaborate alternative methods.

This would lead to:
p = \frac{\begin{pmatrix} 3 \\ 2 \end{pmatrix} \left( \begin{pmatrix} 6 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix} + \begin{pmatrix} 6 \\ 2 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 3 \end{pmatrix} + \begin{pmatrix} 6 \\ 3 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 2 \end{pmatrix} + \begin{pmatrix} 6 \\ 4 \end{pmatrix} \cdot \begin{pmatrix} 6 \\ 4 \end{pmatrix} \right)}{\begin{pmatrix} 18 \\ 5 \end{pmatrix}} = \frac{65}{238}

2) The other 'method' was to frame the problem like: "how many solutions are there to the equation ## x_1 + x_2 = 5 ## where ## x_1 \geq 1 ## and ## x_2 \geq 1 ##.
- so there are still ##\begin{pmatrix} 3 \\ 2 \end{pmatrix}## ways of picking 2 out of the three colors
- then there would be ##\begin{pmatrix} (5 - 2) + (2 - 1) \\ (2 - 1) \end{pmatrix} = \begin{pmatrix} 4 \\ 1 \end{pmatrix} ## ways choosing the groups...

- For the total number of ways to pick 5 from 18, we could use a similar framing of ## x_1 + x_2 + x_3 = 5 ##, but instead just have ## x_1 , x_2, x_3 \geq 0 ##. This leads to ## \begin{pmatrix} 5 + (3 - 1) \\ (3 - 1) \end{pmatrix} = \begin{pmatrix} 7 \\ 2 \end{pmatrix} ##

This would lead to:
p = \frac{\begin{pmatrix} 4 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 3 \\ 2 \end{pmatrix}}{\begin{pmatrix} 7 \\ 2 \end{pmatrix}} = \frac{4}{7}

Can anyone help to reconcile which one of these methods is more appropriate for this problem?

Many thanks.
 
  • Like
Likes Delta2
Physics news on Phys.org
I would simply do:$$P = 3P(R+B) = 3(P(RB) - 2P(R))$$I'll let you work out the notation!
 
PeroK said:
I would simply do:$$P = 3P(R+B) = 3(P(RB) - 2P(R))$$I'll let you work out the notation!
Thanks @PeroK ! Unfortunately, I have been looking at this for a while and am a bit confused. Here is what I have made of it. We are using the probability rule:

P(A \cup B) = P(A) + P(B) - P(A \cap B)

You have P(R + B) as the ##P(R \cup B)##, but then I don't understand why the final term in the equation is ## P(R \cap B) - 2 \cdot P(R) ## instead of ## 2 P(R) - P(R \cap B) ##? (is that a correct understanding?
 
Master1022 said:
Thanks @PeroK ! Unfortunately, I have been looking at this for a while and am a bit confused. Here is what I have made of it. We are using the probability rule:

P(A \cup B) = P(A) + P(B) - P(A \cap B)

You have P(R + B) as the ##P(R \cup B)##, but then I don't understand why the final term in the equation is ## P(R \cap B) - 2 \cdot P(R) ## instead of ## 2 P(R) - P(R \cap B) ##? (is that a correct understanding?
Well, ##R + B## must indicate one of the events you are looking for; namely, only Red and Blue balls and at least one of each. I'm not sure I understand the idea of translating to set notation? Why not leave things as they are?

Do you understand the factor of ##3##?

I didn't want to make it too easy, so I wrote ##-2P(R)## instead of the more suggestive ##-P(R) - P(B)##.
 
  • Like
Likes Master1022
PS I just checked the answer: ##65/238## is correct.
 
PeroK said:
Well, ##R + B## must indicate one of the events you are looking for; namely, only Red and Blue balls and at least one of each.
Oh I was thinking in terms of Venn diagrams, when R + B (with + being a union), but I guess that isn't what you meant? Then what does (RB) represent - I would have thought that meant both red and blue colored balls.

PeroK said:
I'm not sure I understand the idea of translating to set notation? Why not leave things as they are?
Hmm, that is what came to mind when I saw the form of that equation...

PeroK said:
Do you understand the factor of ##3##?
I think that is from the 3C2 = 3 (i.e. the number of ways to choose 2 colors from 3)

PeroK said:
I didn't want to make it too easy, so I wrote ##-2P(R)## instead of the more suggestive ##-P(R) - P(B)##.
I understood the symmetry part of it (##P(R) = P(B)##) so we can combine them. I think my question was why the equation was ##P(RB) - 2P(R)## instead of the other way around (i.e. ##2P(R) - P(RB)##)
 
Master1022 said:
I understood the symmetry part of it (##P(R) = P(B)##) so we can combine them. I think my question was why the equation was ##P(RB) - 2P(R)## instead of the other way around (i.e. ##2P(R) - P(RB)##)
I guess I should come clean:

##R + B## was only red and blue with at least one of each.

##RB## was only red and blue (i.e. no yellows) and includes the cases of all red and all blue. I guess I could have used ##no \ Y## instead.

##R## is all red.
 
Actually the 18C5 makes sense if I think about the Vandermonde Identity.
 
Back
Top