Solution (source code)

= Solution

Write the exponential-dispersion density as
$$
f(y_i;\theta_i,\phi)
=\exp\left\{\frac{y_i\theta_i-b(\theta_i)}{\phi}+c(y_i,\phi)\right\}.
$$
With the canonical link, $\theta_i=\eta_i=x_i^T\beta$. Therefore
$$
\boxed{
\mathbb E Y_i=b'(x_i^T\beta),
\qquad
\operatorname{Var}(Y_i)=\phi b''(x_i^T\beta)}.
$$
Known prior weights replace $\phi$ by $\phi/w_i$.