# Probability of finding balls on one side of a box [duplicate]

Possible Duplicate:
Balls in a box probabilities

A box is filled out by 1000 balls. the box can be thought as containing V sites and V balls, with V=1000. The box is repeatedly shaken, so that each ball has enough time to visit all 1000 sites. The ball are identical, except for being uniquely numbered (1-1000).

What is the probability that all of the balls labeled 1-100 lie in the left hand side of the box?

What is the probability that exactly P of the balls labeled 1-100 lie in the left hand side of the box?

Using Stirling's approximation, show that this probability is approx. Gaussian. Calculate the mean of P. calculate the root mean square fluctuations of P about the mean. Is the Gaussian approximation good?

-
 You either have small balls or large (long?) boxes! – Jean-Sébastien Oct 23 '12 at 19:49

## marked as duplicate by Ross Millikan, Douglas S. Stones, Henry T. Horton, ncmathsadist, NorbertOct 24 '12 at 7:35

Let's say the first $100$ balls are colored red. You just need to count the number of configurations that satisfy the given constraint (exactly $P$ of the red balls are on the left), then divide by the total number of configurations ($1000!$). We choose $P$ slots on the left to hold red balls, which can be done in ${500}\choose{P}$ ways; we choose $100-P$ slots on the right to hold red balls, which can be done in ${500}\choose{100-P}$ ways; finally, we distribute the $100$ red balls among their chosen slots ($100!$ ways) and the non-red balls among the remaining slots ($900!$ ways). The total number of configurations is $${{500}\choose{P}}{{500}\choose{100-P}}(100!)(900!).$$ Dividing this by $1000!$ gives the desired probability: $$p=\frac{{{500}\choose{P}}{{500}\choose{100-P}}}{{1000}\choose{100}}.$$

-

Suppose you have $500$ white balls and $500$ black balls, and you are interested in the probability of drawing $P$ white balls from a sample of $100$ taken without replacement. This probability is given by the hypergeometric distribution, and $$\mathbb{P}(P \text{ white balls})=\frac{{{500}\choose{P}}{{500}\choose{100-P}} }{{1000}\choose{100}}$$

Now why is this situation the same as your probem? Well imagine that your ball are selecting their sites one at the time. They are in fact making "draws" of left-right sides without replacement. The first $100$ draws is the answer to your problem, and is given by the Hypergeometric distribution above

-

Put $n = 1000, m = 100$ for brevity.

There are $n!$ possible placements of the balls in the box.

Let us choose $m$ positions on the left-hand side of the box, this can be done in $\binom {n/2} m$ ways. The $m$ positions can be filled by the $m$ first balls in $m!$ ways; the other $n - m$ in $(n-m)!$ ways by the other balls.

In total, there are $(n-m)!m!\binom{n/2}m = \dfrac{(n/2)!(n-m)!}{(n/2 -m)!}$ arrangements in the box satisfying the conditions.

Therefore, the probability of one of these occurring is:

$$\frac{(n/2)!(n-m)!}{(n/2-m)!n!} = \frac{500!900!}{400!1000!}$$

With a similar counting argument, the second question can be solved. As I am plainly bad at applied statistics, I can't help you with the last question.

-
 @Jean-Sébastien Apparently; it should not be a surprise, though. Many questions on M.SE need two or three clarifying edits to describe the desired filling of the gaps posed by the OP. I for one have no idea what Gaussian is meant in the third question... Gaussian WRT $P$ or...? – Lord_Farin Oct 23 '12 at 19:58 would you mind explaining the argument for the second case? I am getting thrown by the introduction of additional variables – Alex Trent Oct 23 '12 at 19:59 It is similar. Only, we need to choose $P$ positions in the left of the box, and $m - P = 100 -P$ in the right of the box. Try to write it up - you can always check by verifying that $P = 0$ reduces to the case of the first question, and by considering what $P = 100$ means. – Lord_Farin Oct 23 '12 at 20:02 You are missing a factor of $(n-m)!=900!$, which is needed to account for the possible arrangements of the other $n-m$ balls. – mjqxxxx Oct 23 '12 at 22:35 Of course; thanks for pointing that one out. – Lord_Farin Oct 24 '12 at 12:37