Solution (source code)

= Solution

The mass function is the mixture
$$
p_{\pi,\lambda}=(1-\pi)\delta_0
+\pi\operatorname{Poisson}(\lambda),
$$
so it is nonnegative and sums to one. Its first two moments are
$$
\mathbb E[Y]=\pi\lambda,
\qquad
\mathbb E[Y^2]=\pi(\lambda+\lambda^2).
$$
Therefore
$$
\operatorname{Var}(Y)
=\pi\lambda+\pi(1-\pi)\lambda^2.
$$
For $0<\pi<1$ this is strictly larger than the mean, so the <Zero-inflated Poisson distribution> models overdispersion. At $\pi=1$ it reduces to an ordinary Poisson distribution, and at $\pi=0$ it is degenerate at zero.