\problemdata
{godot}

\begin{problem}{\bf Waiting for Godot}  

A couple plans to have children until they have a boy,
whom they'd like to name Godot.  What
is the expected number of children that they will have, and what is the
variance?

\hint You may need to reread Section 2.6 in
\href{http://theory.lcs.mit.edu/classes/6.042/fall01/lectures/l7.pdf}{Lecture
  Notes 7} on how to sum a series using differentiation.

\begin{problemparts}

%\solution{The probability of having a single child (a boy) is
%$\frac{1}{2}$, the probability of having two children (a girl and then
%a boy) is $\frac{1}{4}$, and so forth; the probability of having $k$
%children is $\frac{1}{2^k}$.  Therefore, the expected number of
%children is:

%\begin{eqnarray*}
%\expect{\text{children}}& = &  \sum_{k=1}^{\infty} k \cdot \frac{1}{2^k} \\
%                       & = &   2
%\end{eqnarray*}


\solution{
\medskip
\textbf{Solution:}

Let $C$ be the expected number of children up to and including
the first boy. 
Each time the couple has a child, the probability that it is a boy is $1/2$.
Thus
$$\expect{C} = 2$$
as shown in lecture.
We can compute the variance as follows:
\[
\variance{C}
         = \expect{C^2} - \expect{C}^2 
         = \sum_{k=1}^{\infty} k^2 \cdot \left(\frac{1}{2}\right)^k - 2^2 
         = \frac{\frac{1}{2} + (\frac{1}{2})^2}{(1 - \frac{1}{2})^3} - 4 
         = 6 - 4
         = 2
\]
The sum is computed by differentiating the
formula for the sum of an infinite geometric sequence.
}

\end{problemparts}
\end{problem}






