Probability problem confusion: 5 marbles placed randomly in 5 boxes

  • #1
tellmesomething
409
45
Homework Statement
Five different marbles are placed in 5 different boxes randomly. Then the probability that exactly two boxes remain empty is (each box can hold any number of marbles) :
Relevant Equations
none
What would be the sample space for this? Wouldn't we have to make groups of like (2,3,0,0,0)/(1,1,1,1,1)/etc
I will cite the source below but they take the sample space as n(S)=##5^5##
Isnt that wrong? We do not have 5 options in marbles for each of the baskets? i As we fill in, the number of marbles decreases,in total we have 5 marbles , not 25 marbles.
https://infinitylearn.com/questions...t-marbles-are-placed-different-boxes-randomly
 
Physics news on Phys.org
  • #2
If we have marbles ##m_1, m_2, m_3, m_4, m_5##, then every (equally likely) possibility can be encoded by writing down the number of the box for each marble. For example:
$$3, 2, 5, 5, 1$$Would represent ##m_1## in box 3, ##m_2## in box 2, ##m_3## and ##m_4## in box 5 and ##m_5## in box 1. You should check this and convince yourself that there is a one-to-one correspondence between the (equally likely) possibilities and these five-digit numbers.

There are clearly ##5^5## such five-digit numbers. And, for ##n## balls in ##k## boxes, there are ##k^n## equally likely possibililities.

Counting how many of these possibilities leave precisely two boxes empty is not that easy.
 
  • #3
PeroK said:
If we have marbles ##m_1, m_2, m_3, m_4, m_5##, then every (equally likely) possibility can be encoded by writing down the number of the box for each marble. For example:
$$3, 2, 5, 5, 1$$Would represent ##m_1## in box 3, ##m_2## in box 2, ##m_3## and ##m_4## in box 5 and ##m_5## in box 1. You should check this and convince yourself that there is a one-to-one correspondence between the (equally likely) possibilities and these five-digit numbers.

There are clearly ##5^5## such five-digit numbers. And, for ##n## balls in ##k## boxes, there are ##k^n## equally likely possibililities.

Counting how many of these possibilities leave precisely two boxes empty is not that easy.

Thanks! i understood that its talking about each marble having 5 baskets to go to


i guess for that we can make groups (1,1,3,0,0) or (2,2,1,0,0) so 5C2 is number of ways i can select two empty boxes
And for the sequence 1,1,3,0.0
(5C1*4C1*3C3)*3
For the sequence (2,2,1,0,0)
(5C2*3C2*1C1)*3
So final fav outcomes:
((5C1*4C1*3C3)*3 + (5C2*3C2*1C1)*3)*5C2
 
Last edited:
  • #4
tellmesomething said:
Thanks! i understood that its talking about each marble having 5 baskets to go to


i guess for that we can make groups (1,1,3,0,0) or (2,2,1,0,0) so 5C2 is number of ways i can select two empty boxes
And for the sequence 1,1,3,0.0
(5C1*4C1*3C3)*3
For the sequence (2,2,1,0,0)
(5C2*3C2*1C1)*3
So final fav outcomes:
((5C1*4C1*3C3)*3 + (5C2*3C2*1C1)*3)*5C2
I'm not sure that's quite right. The group (1,1,3,0,0) is defined by the two boxes with one ball and the box with three balls. There are ##5 \times \binom 4 2## of those. Each one has ##\binom 5 3## ways to choose the three balls; then two ways to choose the other two balls.

What total do you get for the number of ways by your method?
 
  • #5
I'm thinking of ##C_{5,3}## to choose the nonempty box, times the stars-and-bars for ##x_1+x_2+x_3=5; x_i>0 , x_i \in \mathbb N##.
 
  • #6
PeroK said:
I'm not sure that's quite right. The group (1,1,3,0,0) is defined by the two boxes with one ball and the box with three balls. There are ##5 \times \binom 4 2## of those. Each one has ##\binom 5 3## ways to choose the three balls; then two ways to choose the other two balls.

What total do you get for the number of ways by your method?
My total is 1500. I will try to explain what I did, I hope you can do the same since I don't understand what you did.

The first group (1,1,3,0,0)
5C1=is the number of ways i can choose one marble out of the 5 for the first basket
For each of these marbles, we have 4C1 choices for the second basket
For each of the one marble in the second basket, there are 3C3 ways of selecting three more marbles for the 3rd basket.
Therefore 5C1*4C1*3C3
But wait, this doesnt count the case where the 3 marbles could be in the first basket or the second basket. Therefore we multiply the answer by 3.
This was for the fixed position (1,1,3,0,0)
For all other positions we can simply multiply this with 5C2., Samme reasoning for (2,2,1,0,0)

Edit:This does give me the correct answer but id like to understand your method as well.
 
  • Like
Likes PeroK
  • #7
tellmesomething said:
Edit:This does give me the correct answer but id like to understand your method as well.
Yes, that looks good. I just counted them a different way.

There is completely different approach based on inclusion/exclusion. First we want the number of ways that precisely the first two boxes are empty. Then the total number of ways is this times ##\binom 5 2## to cover the cases where precisely any two boxes are empty.

We have ##3^5## ways that all the balls can be in the last three boxes. But, this includes cases where the third box is empty (and all the balls are in the last two boxes). There are ##2^5## of those. There are also ##2^5## cases where the 4th or 5th box is empty. We need to exclude all these cases from our total. This gives us ##3^5 - 3(2^5)##.

But, the case where the 3rd and 4th boxes were empty has been excluded twice. As has the case where the 3rd and 5th boxes or the 4th and 5th boxes were empty. So, we have to add these back in once each. This gives:
$$N = \binom 5 2 (3^5 - 3(2^5) + 3(1^5)) = 1500$$This method of inclusion and exclusion works more generally, where it becomes harder to count all the separate patterns.

In fact, if you look it up, you can find the general formula. The number of ways to put ##n## distinct balls in ##m## distinct boxes with precsiely ##k## boxes left empty is:
$$N(n, m, k) = \binom m k \sum_{j=0}^{m - k-1}(-1)^j\binom{m - k}{j}(m-k-j)^n$$
 
  • Like
Likes jim mcnamara
  • #8
tellmesomething said:
My total is 1500. I will try to explain what I did, I hope you can do the same since I don't understand what you did.

The first group (1,1,3,0,0)
5C1=is the number of ways i can choose one marble out of the 5 for the first basket
For each of these marbles, we have 4C1 choices for the second basket
For each of the one marble in the second basket, there are 3C3 ways of selecting three more marbles for the 3rd basket.
Therefore 5C1*4C1*3C3
But wait, this doesnt count the case where the 3 marbles could be in the first basket or the second basket. Therefore we multiply the answer by 3.
This was for the fixed position (1,1,3,0,0)
For all other positions we can simply multiply this with 5C2., Samme reasoning for (2,2,1,0,0)

Edit:This does give me the correct answer but id like to understand your method as well.
What is the correct answer?
 
Back
Top