# Expectation of the number of drawings

An urn contains B black and W white balls. What is the expected number of drawings required to get a ball of each color ? With or without replacement, up to you.

With replacement, am I right to think that it is

$$2bw+3b^2w+4b^3w\cdots+2wb+3w^2b+4w^3b\cdots=bw\sum_{k=0}^\infty (k+2)(b^k+w^k)=bw\left(\frac{1+w}{w^2}+\frac{1+b}{b^2}\right)=1+\frac WB+\frac BW$$ where $b$ and $w$ are the fractions of both colors ?

• Without replacement, the number of draws cannot exceed $\max\{B,W\} + 1$, no? – Dilip Sarwate Nov 17 '15 at 16:27
• Ooops, sorry, I mean with. – Yves Daoust Nov 17 '15 at 16:29
• This is the coupon collector problem. The search turns up many threads that provide explicit formulas. – whuber Nov 17 '15 at 17:00
• @whuber: all entries I found are about equiprobable coupons. For two coupons, the expectation is $2H_2=3$, which matches my solution. – Yves Daoust Nov 17 '15 at 17:06
• Many of the methods described in the answers apply with almost no change to varying probabilities. – whuber Nov 17 '15 at 18:14

With replacement, the urn always has $B+W$ balls. Conditioned on the first ball being Black, the (conditional) expected waiting time to get one ball of each color is $1 + \frac{B+W}{W}$ where the fraction is the expected waiting time to get a White ball. Similarly, conditioned on the first ball being White, the (conditional) expected waiting time to get one ball of each color is $1 + \frac{B+W}{B}$. Now put these answers together to get the unconditional waiting time.