A family that would count n members would look like: n= 2parents + number of girls born + 1 son, or more precisely $\displaystyle n=k+3$, where k is the number of girls born prior to the birth of a son.

First you set up a random variable X that would count the members of the family. Its values would be $\displaystyle x_0=3=2+0+1$, $\displaystyle x_1=4=2+1+1$, $\displaystyle x_2=5=2+2+1$, $\displaystyle x_3=6=2+3+1$, .... You get the pattern, right? $\displaystyle x_k=k+3$ where $\displaystyle k$ is the number of girls born before the first son.

Then you should assign probabilities to those values.

$\displaystyle p_k=P(X=k+3)=(0.5)^{k} \cdot 0.5 = (0.5)^{k+1}$, where $\displaystyle (0.5)^{k}$ means that the$\displaystyle k$ members are girls born prior to a son being born, and he is born with the probability $\displaystyle 0.5$. So you can

So now you have

$\displaystyle X\sim\left(\begin{array}{ccccc}3 & 4 & 5 & 6 & \cdots \\ 0.5 & (0.5)^{2} & (0.5)^{3} & (0.5)^{4} & \cdots \end{array}\right)$

Next, find the expected value of that random variable:

$\displaystyle \sum\limits_{k=0}^{\infty}x_k\cdot p_k & =\sum\limits_{k=0}^{\infty}(k+3)(0.5)^{k+1}= \frac{1}{2} \sum\limits_{k=0}^{\infty}(k+3)(0.5)^{k}= $

$\displaystyle =\frac{1}{2} \left(\sum\limits_{k=0}^{\infty}k(0.5)^{k}+3\cdot \sum \limits_{k=0}^{\infty}(0.5)^{k}\right)= \frac{1}{2}\left(2+3\cdot 2\right)=4. $

I think that would be the size of the average family, unless I'm wrong, eh?!