Conditional bias-corrected normal mean estimate (source code)

= Conditional bias-corrected normal mean estimate
{title2=$m=d+(w/\sqrt{I_1})\phi(d\sqrt{I_1}-f)/\Phi(d\sqrt{I_1}-f)$}

Consider <independent random variables>[independent] stage <mean>[means] $X\sim N(\delta,1/I_1)$ and $Y\sim N(\delta,1/I_2)$, with positive known information $I_1,I_2$. Continue to stage two only if $X\sqrt{I_1}\geq f$. The pooled <mean> is $M=wX+(1-w)Y$, where $w=I_1/(I_1+I_2)$. Write $m$ for its observed value. Its <conditional mean> under a candidate <statistical parameter>[parameter] $d$ is
$$
g(d)=d+\frac{w}{\sqrt{I_1}}\frac{\phi(d\sqrt{I_1}-f)}{\Phi(d\sqrt{I_1}-f)}.
$$
Here $\phi$ and $\Phi$ are the <standard normal distribution>[standard normal] <probability> density and cumulative <probability distribution>[distribution] <functions>. The <Conditional bias-corrected normal mean estimate> solves $g(d)=m$. This inverts the selection-shifted <mean> instead of ignoring the fact that the first-stage <mean> exceeded a threshold.

For the upper-tail <inverse Mills ratio> $\lambda(a)=\phi(a)/(1-\Phi(a))$, $g'(d)=1-w\lambda'(f-d\sqrt{I_1})$. The <variance> of a truncated <standard normal distribution>[standard normal] variable gives $0<\lambda'(a)<1$, hence $1-w<g'(d)<1$. Since $0<w<1$, $g$ is strictly increasing and ranges over the whole real line; the root exists uniquely. Differentiating the <multivariate normal distribution>[joint normal] <likelihood function>[likelihood] conditional on continuation shows that the same root maximizes that <conditional likelihood>. Inverting a <conditional mean> does not itself make an <estimator> <conditionally unbiased estimator>[conditionally unbiased]. The separate <Rao-Blackwell estimator after interim selection> provides that property in the equal-information setting.