Expected Value Review Question Help; Discrete Mathematics I'm studying for my discrete exam and I can't figure out this problem in the review, any help is appreciated.
When Jane and Bob have a child, this child is a boy with probability
1/2 and a girl with probability 1/2, independent of the gender of previous children. Jane 
and Bob stop having children as soon as they have a girl. 
What are the random variables:
B = the number of boys that Jane and Bob have
G = the number of girls that Jane and Bob have.
What are the expected values E(B) and E(G)
 A: The mean number of girls is obviously $1$.
For the mean number of boys, call having a boy a failure. We want to find the expected number of failures until the first success. We could do it by summing an infinite series, or by conditioning, or by thinking.
Let $a$ be the expected number of failures. If there is a success on the first trial  (probability $1/2$), then the number of failures is $0$. If there is a failure on the first trial, the conditional expectation of the number of additional failures, given there was a failure on the first trial, is $a$. Thus in that case the expected total number of failures is $1+a$. Thus
$$a=(1/2)(0)+(1/2)(1+a).$$
Solve for $a$. We get $a=1$.  The expected number of boys is also $1$.
If we think about it, the result is obvious. On any birth, the expected number of boys is the same as the expected number of girls. 
Remarks: $1.$ With the series approach, we end up summing the infinite series
$$\frac{1}{4}+\frac{2}{8}+\frac{3}{16}+\frac{4}{32}+\cdots.$$
There are arious methods for summing this sort of series. The problem has been solved repeatedly on MSE.
$2.$ If you already know that the geometric with parameter $p$ has expectation $\frac{1}{p}$, then you can see that the expected total number of children is $2$, and hence the expected number of boys is $1$.
