0

# Distribution of m balls into n boxes

Sun 24 Jun, 2012 01:24 am
If 4 distinct balls are distributed over 4 distinct boxes. After distribution in the boxes only 90% of each ball is visible in each box. Then what is the probability of 4 balls seen in 4 boxes and similarly the probability of four balls seen in 3 boxes, 2 boxes, 1 boxes respectively.
• Topic Stats
• Top Replies
Type: Question • Score: 0 • Views: 2,377 • Replies: 14
No top replies

markr

1
Sun 24 Jun, 2012 10:59 am
@muna27,
There are 4^4=256 ways to distribute 4 distinct balls among 4 distinct boxes.
There are 24 ways to distribute them among all 4 boxes.
There are 144 ways to distribute them among 3 of the 4 boxes.
There are 84 ways to distribute them among 2 of the 4 boxes.
There are 4 ways to distribute them to a single box.

I have no idea what 90% of each ball being visible has to do with anything. Perhaps you meant to say each ball has a 90% probability of being seen in the box that it is in. In that case, since you require that all 4 balls are seen, after computing the probability for each distribution, you must multiply it by 0.9^4 = 0.6561.
muna27

1
Sun 24 Jun, 2012 04:51 pm
@markr,
Hi Markr,
Yes each ball has a 90% probability of being seen in the box. According to you if I multiply 0.9^4 to each probability distribution i.e. 0.9^4*(24/256+144/256+84/256+4/256)=0.6561. Since the total probability is 1 then how do you explain the quantity (1-0.6561)
markr

1
Sun 24 Jun, 2012 09:14 pm
@muna27,
Because there is a non-zero probability that you will see only 3, 2, 1, or 0 balls.
muna27

1
Sun 24 Jun, 2012 09:30 pm
@markr,
Thanks you very much, it is quite informative but how can estimate that non zero probability of seeing 3, 2, 1 or 0 separately. Is there any general formula for that ? that can be applicable for more number of balls in more boxes.
markr

1
Mon 25 Jun, 2012 12:31 am
@muna27,
If the probability of seeing each ball is p, then the probability of seeing m out of n balls is:

C(n,m) * p^m * (1-p)^(n-m)

where C(n,m) is n!/[m! * (n-m)!]

You can interpret the above equation as:
The number of ways to choose m out of n balls times the probability that those m balls will be visible times the probability that the remaining balls will not be visible.
muna27

1
Mon 25 Jun, 2012 04:58 am
@markr,
Thanks a lot. I think this formula is correct when all the balls are in one box or each box has only one ball. For example if all the balls are in 2 boxes and 2 balls are seen then the total no. of combination is C(4,2)=6; Out of which 3 ways they can be seen in 2 boxes and another 3 ways they can be seen in 1 box. According to this formula probability of 2 balls seen in 2 boxes is C(4,2)*p^2*(1-p)^(4-2)*(84/256). But 3* p^2*(1-p)^(4-2)*(84/256) is the probability of 2 balls seen out of 4 balls in one boxes and 3*p^2*(1-p)^(4-2)*(84/256) is the probability of 2 balls seen out of 4 balls in 2 boxes. Is there any general formula to write what is the probability of number of balls observed in 1 box and 2 boxes. If my explanation is not understandable then please let me know.
markr

1
Mon 25 Jun, 2012 01:31 pm
@muna27,
The formula is correct in general, but it has nothing to do with balls being distributed among boxes.

I'm not sure what it is you're after. Perhaps you could complete this problem statement:

Given n balls, m boxes, and probability p of each ball being visible, what is the probability of observing <fill in this part>.
muna27

1
Mon 25 Jun, 2012 01:51 pm
@markr,
Given n balls, m boxes, and probability p of each ball being visible, what is the probability of observing balls in 1 box, 2 boxes, 3 boxes and 4 boxes. I am looking for a general formula for the above. For example if 'p=1' then probability of observing balls in 1 box=4/256, in 2 boxes =84/256, in 3 boxes=144/256 and in 4 boxes=24/256. If probability 'p<1' of each ball is being visible then what is the probability of observing balls in 1 box, 2 boxes, 3 boxes and 4 boxes. Is there any general formula for this. Thanks a lot.

markr

1
Mon 25 Jun, 2012 02:34 pm
@muna27,
Ah, that's clear. I'm at work now, but I'll give it a shot later.
muna27

1
Mon 25 Jun, 2012 02:55 pm
@markr,
Thanks a lot. I know how to calculate the probability of observing balls in 1 box=4/256, in 2 boxes =84/256, in 3 boxes=144/256 and in 4 boxes=24/256 if p=1. But looking for a formula when 'p<1'.

markr

2
Tue 26 Jun, 2012 12:16 am
@muna27,
Hmmm. I don't think this can be done with a simple formula. Here's what I've got:

Let F(b,k,c) be the number of ways to distribute b distinguishable balls into exactly k out of c distinguishable containers. This function will be used in a more complicated function below. As you already know from above:
F(4,0,4) = 0
F(4,1,4) = 4
F(4,2,4) = 84
F(4,3,4) = 144
F(4,4,4) = 24

Here are some more values of F to help with the 4 balls/4 boxes problem:
F(3,0,4) = 0
F(3,1,4) = 4
F(3,2,4) = 36
F(3,3,4) = 24
F(3,3,4) = 0
F(2,0,4) = 0
F(2,1,4) = 4
F(2,2,4) = 12
F(2,3,4) = 0
F(2,4,4) = 0
F(1,0,4) = 0
F(1,1,4) = 4
F(1,2,4) = 0
F(1,3,4) = 0
F(1,4,4,) = 0
F(0,0,4) = 1
F(0,1,4) = 0
F(0,2,4) = 0
F(0,3,4) = 0
F(0,4,4) = 0

For other numbers of balls and boxes, you'll need to compute the various values for F. I don't know of a simple formula for this.

Let G(b,k,c,p) be the probability of observing balls in exactly k out of c distinguishable containers when there are b distinguishable balls each with probability p of being visible.

G(b,k,c,p) = SUM(v=0 to b, {[C(b,v)*p^v*(1-p)^(b-v)]*[c^(b-v)]*[F(v,k,c)]/[c^b]}

The curly and square brackets are only there so I can reference them in the descriptions below.

To compute G, you need to sum the expression inside the curly brackets letting v range from 0 to b.

The expression in the first set of square brackets is the same formula I gave you in an earlier post. It computes the probability that exactly v balls will be visible.

The expression in the second set of square brackets is the number of ways to distribute the invisible balls. Each invisible ball can go in any container.

The expression in the third set of square brackets is the function I defined above. I gave you the values you'll need for the 4 ball/4 box problem.

The expression in the fourth set of square brackets is the total number of ways to distribute all of the balls. Each ball can go in any container.

I get:
G(4,0,4,.9) = 0.0001
G(4,1,4,.9) = 0.0442
G(4,2,4,.9) = 0.4158
G(4,3,4,.9) = 0.4784
G(4,4,4,.9) = 0.0615

markr

0
Tue 26 Jun, 2012 02:04 pm
@markr,
I should be able to give you more information about function F tonight. It involves Stirling numbers of the second kind.
muna27

1
Tue 26 Jun, 2012 03:00 pm
@markr,
Thanks a lot. I know how to calculate F.
0 Replies

Relk

1
Wed 4 Jul, 2012 06:48 am
@muna27,
good discussn people.
plz keep it up...
0 Replies

### Related Topics

Probability of 11 cards - Question by ptkaisen
Probability - Question by sean2
Exercise in Probability!!! - Question by evinda
Winning chance - Question by ghodhereek
Family Wine Tasting - Question by mrmac
what is the probability of... #4 - Question by w0lfshad3
Probability of Occurrences - Question by ShyWho12

1. Forums
2. » Distribution of m balls into n boxes