# Find a distribution and probability.

Consider a box with $n$ black and $m$ white balls, we randomly pick some $k$ of them(balls picked one by one), but if we pick white ball we get it back to box. Now we want to build a distribution for this task and find probability that we pick exactly $r$ black balls.

EDIT

My attempt : Suppose we pick some $i$ white balls , then there is $\binom{m+i-1}{i}$ (that's number of ways to pick it without order with returning) ways to pick it. Now there are $\binom{n}{k-i}$ (because we should choose $k-i$ balls from $n$ black balls) ways to pick black ball , so there are $\sum_{i=0}^{k}\binom{m+i-1}{i} \binom{n}{k-i}$ (all possible ways to pick them) ways to pick $k$ balls from box. Now the probability of choosing exactly $r$ black balls is : $\displaystyle \frac{\binom{n}{r}\binom{m+k-r-1}{k-r}}{\sum_{i=0}^{k}\binom{m+i-1}{i}\binom{n}{k-i}}$

I've edited some wrong assumption.

First of all : am I right ? If yes , does there some chances to simplify the sum ?

• If you pick up the balls only once what is the sense in getting white balls back to box? May it be that you are interested in getting exactly $r$ black balls after say $N$ steps? – user Mar 7 '18 at 10:14
• @user I pick up some $k$ balls. It make sense to return white balls. – openspace Mar 7 '18 at 10:30
• May it be that you pick up the balls one by one and in the case if it is a white ball you put it back in the box, and $k$ is not the number of balls but the number of trials? – user Mar 7 '18 at 14:58
• "Suppose we pick some $i$ white balls , then there is $A^i_m=m!/(m−i)!$ (because balls are get back to box) ways to pick it." This statement is wrong. There are $m^i$ such ways. Consider for example the case that all $i$ times the same white ball was picked up. – user Mar 8 '18 at 23:06
• @user no , suppose we have three balls and we select two of them. Let $\{1,2,3\}$ be balls then we can make a pairs (1,2), (1,3) , (1,1) , (2,2) ,(2,3) and (3,3) , and that's equal to $3! /(3-2)! = 6$ – openspace Mar 9 '18 at 9:33

## 1 Answer

Let us assume that all balls are numbered and record the number and the color of the picked ball in each trial. Assume altogether $r$ black balls were picked up after $k$ trials. There are $\binom{n}{r}$ ways to choose the balls and $\binom{k}{r}$ ways to choose the trials which have given the balls. Besides the balls can be permuted between the chosen trials in $r!$ ways. The rest $k-r$ trials give white balls and this can happen in $m^{k-r}$ ways. Thus the overall number of $k$ trials resulting in $n$ black balls is $$N(k,r)=r!\binom{n}{r}\binom{k}{r}m^{k-r},$$ and the corresponding probability: $$P(k,r)=\frac{N(k,r)}{\sum_{r=0}^kN(k,r)}.$$

• What is $l_{i}$? – openspace Mar 8 '18 at 14:54
• And what is the problem in my answer? – openspace Mar 8 '18 at 15:17
• @openspace I have added an explanation for the meaning of indices $l_i$. What concerns your answer I am not quite sure what do you mean with $A^i_m$. Have you already checked both versions? – user Mar 8 '18 at 15:51
• $A_{m}^{i} = \frac{m!}{(m-i)!}$ – openspace Mar 8 '18 at 15:57
• Please add in your question the idea behind using the value. I do not see how the possibility to draw the same white ball again is accounted for. – user Mar 8 '18 at 16:07