• an insect lays $N \stackrel{d}{=} \mathrm{Pn}(\lambda)$ eggs
  • the probability of each egg hatching is $p$
  • the events of eggs hatching are mutually indepndent,

evaluate the expected value of the number of eggs that hatch and the variance.

I'm struggling with finding the variance, so I'll show my working out for expected value and then ask about the variance.

Let $X$ be the number of eggs that hatch.

$\begin{align} \mathbb{E}(X) &= \mathbb{E}(\mathbb{E}(X|N))\\ &= \mathbb{E}(X|N = 0)P(N = 0) + \mathbb{E}(X|N = 1)P(N = 1) + \dots\\ &= 0\cdot P(N = 0) + pP(N = 1) + 2p(N = 2) + \dots\\ &= p\lambda e^{-\lambda} + 2p\frac{\lambda^2e^{-\lambda}}{2!} + 3p\frac{\lambda^3e^{-\lambda}}{3!} + \dots\\ &= \sum_{n = 1}^{\infty} p\frac{\lambda^ne^{-\lambda}}{(n - 1)!}\\ &= e^{-\lambda}p\lambda\sum_{n = 1}^{\infty} \frac{\lambda^{n - 1}}{(n - 1)!}\\ &= p\lambda \end{align}$

$\begin{align} \mathbb{V}(X) &= \mathbb{E}(X^2) - \mathbb{E}(X)^2\\ \mathbb{E}(X^2) &= \dots\\ &= p\lambda e^{-\lambda} + 2p\frac{\lambda^2e^{-\lambda}}{1!} + 3p\frac{\lambda^3e^{-\lambda}}{2!} + \dots\\ &= \sum_{n = 1}^{\infty} np\frac{\lambda^ne^{-\lambda}}{(n - 1)!} \end{align}$

Surely the series converges but how do you get the closed form when there's an $n$?

  • $\begingroup$ Could you simplify and calculate $\sum\limits_{n = 1}^{\infty} (n-1)p\frac{\lambda^ne^{-\lambda}}{(n - 1)!} +\sum\limits_{n = 1}^{\infty} p\frac{\lambda^ne^{-\lambda}}{(n - 1)!}$ ? $\endgroup$
    – Henry
    Aug 19, 2022 at 13:20
  • $\begingroup$ This is called binomial thinning. The number of eggs that hatch is Poisson distibuted with mean $p\lambda$. See my answer here: stats.stackexchange.com/questions/540266/… $\endgroup$ Aug 20, 2022 at 10:03
  • $\begingroup$ @Henry: thanks! I get $p\lambda^2 + p\lambda$. $\mathbb{V}(X) = p\lambda^2 + p\lambda - p^2\lambda^2$, but that's not right, is it? $\endgroup$
    – johnsmith
    Aug 20, 2022 at 13:15
  • $\begingroup$ Your should get $E[X^2]=p^2\lambda^2 +p\lambda$ and $V(X)=p\lambda$ as this is also a Poisson distribution. So you may have another error: your expression for $E[X^2]$ of $p\lambda e^{-\lambda} + 2p\frac{\lambda^2e^{-\lambda}}{1!} + 3p\frac{\lambda^3e^{-\lambda}}{2!} + \dots$ looks dubious $\endgroup$
    – Henry
    Aug 20, 2022 at 15:29

1 Answer 1


The process of thinning out the number of eggs laid to the number of eggs hatched is called binomial thinning, and the distribution of the number of eggs that hatch is known to be Poisson with mean $p\lambda$. The mean and variance are therefore both $p\lambda$. See for example my answer here: Binomial-binomial is binomial?.

You can also derive the mean and variance directly, without summing any infinite series:

\begin{align} E(X) &= E_N(E(X|N))\\ &= E_N(pN)\\ &= p\lambda \end{align}

\begin{align} \mbox{var}(X) &= E_N(\mbox{var}(X|N))+\mbox{var}_N(E(X|N))\\ &= E_N(Np(1-p))+\mbox{var}_N(Np)\\ &= \lambda p(1-p) + \lambda p^2\\ &= p\lambda\\ \end{align}

The formula I have used here to express the unconditional variance in terms of the conditional mean and variance is called the law of total variance or the variance decomposition formula, see https://en.wikipedia.org/wiki/Law_of_total_variance. It is a frequently-used formula for conditional or hierarchical models.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.