Optimal bounded influence function for normal location (source code)

= Optimal bounded influence function for normal location
{title2=$h_K(x)=\frac{\max(-K,\min(x,K))}{2\Phi(K)-1}$}

For standard <normal distribution> location estimation, an <influence function> $h$ obeys $\mathbb E[Zh(Z)]=1$. Under $|h|\le C$, minimize $\mathbb E h^2$ by projecting $ax$ onto $[-C,C]$, choosing $a$ to meet that identity. For $C>\sqrt{\pi/2}$ this gives the displayed <Huber score> normalized by $2\Phi(K)-1$, with $C=K/(2\Phi(K)-1)$. Pointwise minimality of $h^2-2axh$ proves global optimality after integration. At $C=\sqrt{\pi/2}$ the only feasible normalized function is $C\operatorname{sgn}(x)$ almost everywhere, the <influence function of the sample median>. The endpoint is a limit of rescaled clipped scores, not the identically zero score obtained by substituting $K=0$ literally.