Probability problem confusion: 5 marbles placed randomly in 5 boxes

  • #1
tellmesomething
410
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.
 
  • Like
Likes Gavran
  • #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?
 
  • #9
WWGD said:
What is the correct answer?
$$ \frac{1500}{3125}=0,48 $$
 
  • Like
Likes WWGD

FAQ: Probability problem confusion: 5 marbles placed randomly in 5 boxes

What is the probability of all 5 marbles ending up in different boxes?

The probability of all 5 marbles ending up in different boxes is calculated by considering the total arrangements of the marbles and the favorable arrangements. Since there are 5 boxes and 5 marbles, the total arrangements are \(5^5\). The favorable arrangements where each marble goes into a different box are given by the permutations of 5 boxes, which is \(5!\). Therefore, the probability is \( \frac{5!}{5^5} = \frac{120}{3125} \approx 0.0384\) or about 3.84%.

What is the probability that at least one box is empty?

To find the probability that at least one box is empty, it is easier to first calculate the probability that no boxes are empty and then subtract that from 1. The probability that no box is empty is given by the formula \( \frac{5!}{5^5} \). Thus, the probability that at least one box is empty is \( 1 - \frac{5!}{5^5} = 1 - \frac{120}{3125} \approx 0.9616\) or about 96.16%.

How do we calculate the expected number of boxes that contain at least one marble?

The expected number of boxes that contain at least one marble can be calculated using the linearity of expectation. For each box, the probability that it contains at least one marble is \(1 - \left(\frac{4}{5}\right)^5\). Since there are 5 boxes, the expected number of boxes with at least one marble is \(5 \times \left(1 - \left(\frac{4}{5}\right)^5\right) \approx 5 \times (1 - 0.32768) \approx 5 \times 0.67232 \approx 3.3616\).

What happens if we increase the number of marbles or boxes?

If we increase the number of marbles or boxes, the probabilities will change accordingly. For example, increasing the number of boxes while keeping the number of marbles constant will generally increase the probability of having at least one empty box. Conversely, increasing the number of marbles while keeping the number of boxes constant will decrease the probability of having an empty box. The specific probabilities can be recalculated using the same formulas, adjusting for the new numbers.

Are there any applications of this probability problem in real life?

Yes, this probability problem can be applied in various fields such as computer science (specifically in hashing algorithms), operations research, and resource allocation. Understanding how items are distributed across

Back
Top