# Showing MSE of $\bar{X}\mathbf1_{\bar{X}>0}$ is less than that of $\bar X$ when sampling from $\mathcal N(\theta,1)$ population

Let $$(X_1,X_2,\cdots,X_n)$$ be a random sample drawn from a $$\mathcal{N}(\theta,1)$$ population where $$\theta>0$$.

I am trying to compare the estimators $$T=\bar{X}\mathbf1_{\bar{X}>0}$$ and $$\bar X$$ of $$\theta$$. In doing so, I have to prove that the estimator $$T$$ is better than the usual estimator $$\bar X$$ of $$\theta$$ in terms of having less mean square error (MSE).

We know that $$\bar{X}$$ is unbiased for $$\theta$$, so that $$\text{MSE}_{\theta}(\bar X)=\text{Var}_{\theta}(\bar X)=\frac{1}{n}$$ for all $$\theta$$.

We also know that $$\bar X\sim\mathcal{N}(\theta,\frac{1}{n})$$. So we have the truncated expectations

$$\text{E}_{\theta}(\bar X\mid\bar X>0)=\theta+\frac{1}{\sqrt n}\cdot\frac{\phi(\sqrt n\theta)}{\Phi(\sqrt n\theta)}$$

and $$\text{E}_{\theta}((\bar X-\theta)^2\mid\bar X>0)=\frac{1}{n}\left[1-\frac{\sqrt n\theta\,\phi(\sqrt n\theta)}{\Phi(\sqrt n\theta)}\right]$$

So, \begin{align}\text{E}_{\theta}(T)&=\text{E}_{\theta}(T\mid\bar X>0){\Pr}_{\theta}(\bar X>0)+\text{E}_{\theta}(T\mid\bar X<0){\Pr}_{\theta}(\bar X<0)\\&=\text{E}_{\theta}(\bar X\mid\bar X>0){\Pr}_{\theta}(\bar X>0)\\&=\theta\,\Phi(\sqrt n\theta)+\frac{1}{\sqrt n}\phi(\sqrt n\theta)\quad\forall\,\theta\end{align}

Clearly, $$T$$ is biased for $$\theta$$ while $$\bar X$$ is not.

MSE of $$T$$ is \begin{align}\text{MSE}_{\theta}(T)&=\text{E}_{\theta}(T-\theta)^2\\&=\text{E}_{\theta}((T-\theta)^2\mid\bar X>0){\Pr}_{\theta}(\bar X>0)+\text{E}_{\theta}((T-\theta)^2\mid\bar X<0){\Pr}_{\theta}(\bar X<0)\\&=\text{E}_{\theta}((\bar X-\theta)^2\mid\bar X>0)\Phi(\sqrt n\theta)+\theta^2\,\Phi(-\sqrt n\theta)\\&=\Phi(\sqrt n\theta)\left(\frac{1}{n}-\theta^2\right)+\theta^2-\frac{\theta}{\sqrt n}\phi(\sqrt n\theta)\\&\stackrel{?}{<}\frac{1}{n}=\text{MSE}_{\theta}(\bar X)\quad\forall\,\theta\end{align}

I am not sure if I have computed all the expectations correctly. If I have done them correctly, then I am still unable to see how the MSE of $$T$$ is less than that of $$\bar X$$.

Based on the suggestion of a friend, this is solved almost too easily if one does not try to find the explicit expressions of the two MSE's. I think the following is okay:

Let $f_{\bar X}$ denote the density of $\bar X$.

We have $\displaystyle\text{MSE}_{\theta}(\bar X)=\int_{-\infty}^0 (x-\theta)^2f_{\bar X}(x)\,\mathrm{d}x+\int_0^\infty(x-\theta)^2f_{\bar X}(x)\,\mathrm{d}x$

and $\displaystyle\text{MSE}_{\theta}(T)=\int_{-\infty}^0 \theta^2f_{\bar X}(x)\,\mathrm{d}x+\int_0^\infty(x-\theta)^2f_{\bar X}(x)\,\mathrm{d}x$

Therefore, $\displaystyle\text{MSE}_{\theta}(T)-\text{MSE}_{\theta}(\bar X)=\int_{-\infty}^0 \left(\theta^2-(x-\theta)^2\right)f_{\bar X}(x)\,\mathrm{d}x$

Now, $\theta^2-(x-\theta)^2=x(2\theta-x)$.

So $\theta>0\,,\,x<0\implies2\theta-x>-x>0\implies x(2\theta-x)<0$

And $f_{\bar X}(\cdot)$ is always non-negative, leading to $\text{MSE}_{\theta}(T)-\text{MSE}_{\theta}(\bar X)<0$ for all $\theta$.

(Lesson learnt is not to always look for exact expressions when one requires only the sign of the difference of the two expressions.)