a man draws balls from an infinitely large box containing either white and black balls , assume statistical independence. the man draws 1 ball each time and stops once he has at least 1 ball of each color .
if the probability of drawing a white ball is p , and and q=1-p is that of drawing a black ball , what is the:
a) average no. of balls drawn
b)average no. of white/black balls drawn
c)variance of no. of white/black balls drawn
Defining N,W,B as the total no. of balls , no. of white/black balls respectively ,
the probability generating functions (pgf) for N,W,B are respectively
θ(x)=Σpx(qx)^B from B=1 to infinity + Σqx(px)^W from W=1 to infinity
=Σ(p(qx)^B+q(px)^B)x from B=1 to infinity
α(x)=Σq(px)^W from W=1 to infinity
β(x)=Σp(qx)^B from B=1 to infinity
The Attempt at a Solution
<N>=dθ/dx at x=1
=p/q + q/p +1
<W>=dα/dx at x=1 =p/q
<B>=dβ/dx at x=1 = q/p
<W^2>=d[x*dα/dx]/dx at x=1 =p(p+1)/q^2
<B^2>=d[x*dβ/dx]/dx at x=1 =q(q+1)/p^2
my concern is , why doesn't <N>=<W>+<B> ?
It seems to contradict N=W+B .
Also , the expression I've got for <N> has a local minimum at (p,<N>)=(0.5,3)
which is also a bit weird