Solution (source code)

= Solution

Write $e=y-g_\theta(x)$ and $h_\theta(x)=\partial g_\theta(x)/\partial\theta$. Holding the <nuisance parameter> $\eta$ fixed, the parametric <score function> is the <derivative> with respect to $\theta$ of the one-observation <log-likelihood>. The joint <probability density function> is
$$
p_{\theta,\eta}(x,y)=\eta(x)\frac1{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{(y-g_\theta(x))^2}{2\sigma^2}\right).
$$
Because $\partial e/\partial\theta=-h_\theta(x)$, differentiating gives
$$
\boxed{\dot\ell_{\theta,\eta}(x,y)=\frac{h_\theta(x)(y-g_\theta(x))}{\sigma^2}=\frac{h_\theta(x)e}{\sigma^2}.}
$$
For instance $E_\eta h_\theta(X)^2<\infty$ ensures a <square-integrable> <score function>. Its <expected value> is zero by <independence> and the centered <normal distribution> of the error. This is the <Gaussian regression score>.