Expected number of balls for an Urn problem with and without replacement Let's say an urn has two types of balls, $a$ and $b$. Balls $a$ are not put in the urn when pulled but balls $b$ get put back in the urn when drawn. What is the expected number of $a$ balls after $m$ draws?
 A: This is an interesting problem, but I'm afraid that there will be no simple general solution.
Assume that initially there are $a$ balls of type A and $b$ balls of type B. Denote by $k$ the running number of A-balls, and let $p_m(k)$ $(0\leq k\leq a)$ be the probability that after $m$ drawings there are exactly $k$ A-balls left in the urn. Then $p_0(k)=\delta_{k\,a}$, and the $p_m(k)$ satisfy the recursion
$$p_{m+1}(k)={b\over b+k}p_m(k)+{k+1\over b+k+1}p_m(k+1)\qquad(m\geq0)\ .$$
This recursion can be used to numerically compute the $p_m(k)$ for not all too large numerical data $a$, $b$, $m$.
Nevertheless there is one thing that we can compute explicitly, namely the expected number of draws for finding all A-balls. When there are $k$ A-balls left in the urn the probability of drawing such a ball in the next draw is ${k\over k+b}$. The expected number of draws necessary to obtain the next A-ball in this situation therefore is (exponential distribution!)  ${k+b\over k}=1+{b\over k}$. It follows that the expected number  of drawings necessary to find all A-balls is given by 
$$E_{\rm all}=\sum_{k=1}^a \left(1+{b\over k}\right)=a+ b H_a\approx a +b\,\log a\ ,$$
whereby $H_.$ denotes the harmonic numbers.
