# EM algorithm and Mean residual life

I am reading Robert Hogg's (Introduction to Mathematical Statistics) EM algorithm.

In example 6.6.1 (page 370 in the 7th version), please help to explain how the following integral

$$\int_a^\infty(z-\theta_0)\frac{1}{\sqrt{2\pi}}\frac{\exp \left\{{-(z-\theta_0)^2/2}\right \}}{1-\Phi(a-\theta_0)}dz$$

is equal to

$$\frac{1}{1-\Phi(a-\theta_0)}\phi(a-\theta_0)$$

where $$\phi(x)=(2\pi)^{-1/2}\exp\left\{-x^2/2\right\}$$

or the book made some mistakes here?

I also think this post might give a little help.

Thanks

We know that $$\int U'\exp \{U\} = \exp \{U\}$$ then $$\int_a^\infty (z-\theta_0)\exp\{-(z-\theta_0)^2/2\} dz = \left[-\exp\{-(z-\theta_0)^2/2\}\right]_a^\infty = \exp\{-(a-\theta_0)^2/2\}$$
$$\int_a^\infty (z-\theta_0)\frac{1}{\sqrt{2\pi}}\frac{\exp\{-(z-\theta_0)^2/2\}}{1-\Phi(a-\theta_0)} dz =\\\frac{1}{\sqrt{2\pi}}\frac{1}{1-\Phi(a-\theta_0)}\exp\{-(a-\theta_0)^2/2\}\\ = \frac{1}{1-\Phi(a-\theta_0)}\frac{1}{\sqrt{2\pi}}\exp\{-(a-\theta_0)^2/2\}\\=\frac{1}{1-\Phi(a-\theta_0)}\phi(a-\theta_0)$$