Solution (source code)

= Solution

For fixed known $r>0$, take the <natural parameter of an exponential family>
$$
\theta=\log\frac{\lambda}{r+\lambda}<0,\qquad b(\theta)=-r\log(1-e^\theta).
$$
The <negative binomial distribution> has <log-likelihood>
$$
\log f(y)=y\theta-b(\theta)+\log\Gamma(y+r)-\log\Gamma(r)-\log\Gamma(y+1).
$$
Thus this is a <negative binomial exponential family>, with <dispersion parameter> $\phi=1$ in the convention of part (a). The carrier contains the <Gamma function> and depends on the fixed size $r$, which need not be an integer. Differentiating the <cumulant function of an exponential family> gives
$$
b'(\theta)=\frac{re^\theta}{1-e^\theta}=\lambda,\qquad b''(\theta)=\frac{re^\theta}{(1-e^\theta)^2}=\lambda+\frac{\lambda^2}{r}.
$$
Therefore
$$
\boxed{\mathbb E Y=\lambda,\qquad \operatorname{Var}(Y)=\lambda+\lambda^2/r.}
$$
The size $r$ controls <overdispersion> relative to a <Poisson distribution>; it is different from the unit <dispersion parameter> used by this fixed-size <generalized linear model>. Another common convention applies to the scaled response $Z=Y/r$: then $b(\theta)=-\log(1-e^\theta)$ and $\phi=1/r$. Keeping track of the response scale prevents confusing these two representations. At $\lambda=0$ the law is concentrated at zero and is obtained as a boundary limit, rather than by a finite <natural parameter of an exponential family>.