Solution (source code)

= Solution

For the <probability generating function> $G(t)=\mathbb E[t^X]$, differentiation gives
$$
\boxed{G'(1)=\mathbb E[X]=\mu,\qquad
G''(1)=\mathbb E[X(X-1)]=\sigma^2+\mu^2-\mu}.
$$
The second <derivative> is a <factorial moment>, not the raw <second moment>.

In the <Galton-Watson process>, condition on $X_n=m$. The next generation is a sum of $m$ independent offspring counts, and so its conditional generating function is $G(t)^m$. Averaging over $X_n$ gives
$$
\boxed{G_{n+1}(t)=\mathbb E[G(t)^{X_n}]=G_n(G(t))}.
$$
The conditional mean is $m\mu$ and the <conditional variance> is $m\sigma^2$. Thus iterated <expectation> gives $\mathbb E[X_n]=\mu^n$ from one ancestor, and the <law of total variance> gives $v_{n+1}=\mu^2v_n+\sigma^2\mu^n$, $v_0=0$. Iterating yields the <branching-process generation moments>
$$
\boxed{v_n=\sigma^2\mu^{n-1}\sum_{j=0}^{n-1}\mu^j
=\sigma^2\frac{\mu^{n-1}(\mu^n-1)}{\mu-1}\quad(\mu\ne1,\ n\geq1)}.
$$
For the critical case $\mu=1$, the correct limiting value is $v_n=n\sigma^2$. If $\mu=0$, nonnegative offspring are zero almost surely, so every later generation has zero mean and <variance>; handle this directly rather than use an ambiguous zero power. At generation zero the mean is one and <variance> zero.

The <branching-process extinction criterion> states that extinction <probability> is the smallest fixed point of $G$ in $[0,1]$: probabilities of extinction by successive generations are the iterates of $G$ from zero, increasing to that fixed point. Here the equation is $4q^3-7q+3=0$, factoring as $(q-1)(2q-1)(2q+3)=0$. The two admissible roots are $1/2$ and one, so
$$
\boxed{\mathbb P(\text{eventual extinction})=\frac12}.
$$