Solution (source code)

= Solution

For an <estimator> with finite second moment, its <bias> and <mean squared error> are
$$
b_\theta=\mathbb E_\theta\widehat\theta-\theta,\qquad R_\theta=\mathbb E_\theta[(\widehat\theta-\theta)^2].
$$
Write $\widehat\theta-\theta=(\widehat\theta-\mathbb E_\theta\widehat\theta)+b_\theta$. On squaring and taking expectations, the cross term vanishes. This proves the <bias-variance decomposition of mean squared error>:
$$
\boxed{R_\theta=\operatorname{Var}_\theta(\widehat\theta)+b_\theta^2.}
$$
For the <sample mean>, independence gives $\mathbb E\bar X=\theta$, $\operatorname{Var}(\bar X)=\theta^2/n$. Thus $k\bar X$ has bias $(k-1)\theta$. Unbiasedness throughout the parameter family requires
$$
\boxed{k=1,\qquad \operatorname{MSE}(\bar X)=\theta^2/n.}
$$
At the single parameter value $\theta=0$, all these estimators are zero almost surely; that special value does not change the requirement of unbiasedness for all $\theta$.