# Evaluation of probability related integral

I have encountered the following integral in my research which does not give-in to my attempts: $$\int_\mathbb{R} x \left( \frac{1}{\sigma_1} \phi\left(\frac{x}{\sigma_1}\right) \Phi\left(\frac{x-\mu}{\sigma_2}\right) + \frac{1}{\sigma_2} \phi\left(\frac{x-\mu}{\sigma_2}\right) \Phi\left(\frac{x}{\sigma_1}\right) \right) dx$$ where $\phi(x)$ denote probability density function and $\Phi(x)$ a cumulative density function of the standard normal distribution. $\sigma_1$ and $\sigma_2$ are positive, and $\mu$ is real.

I would appreciate hints on how to evaluate it. Thank you!

Let's rewrite the integral a little. Denote $X$ a Gaussian random variable with zero mean and variance $\sigma_1^2$, and $Y$ an independent Gaussian random variable with mean $\mu$ and variance $\sigma_2^2$. Then your integral reads: $$\begin{eqnarray} \int_\mathbb{R} \left( x f_X(x) F_Y(x) + x f_Y(x) F_X(x) \right) \mathbb{x} &=& \int_\mathbb{R} x f_X(x) F_Y(x) \mathbb{x} + \int_\mathbb{R} y f_Y(y) F_X(y) \mathbb{y} \\ &=& \mathbb{E}\left( X [ Y \leqslant X] + Y [X < Y] \right) \\ &=& \mathbb{E}\left(\max(X,Y) \right) = \mathbb{E}\left(\max(X-Y, 0)+Y \right) \\ &=& \mathbb{E}\left(\max(X-Y, 0) \right) + \mu \end{eqnarray}$$ where $[X<Y]$ denotes Iverson bracket. But difference of random variables $Z := X-Y$ is also a Gaussian random variable, as a linear combination of Gaussians, with mean and variance $$m:= \mathbb{E}(Z) = \mathbb{E}(X) -\mathbb{E}(Y) = -\mu \qquad s^2 := \mathbb{Var}(Z) = \mathbb{Var}(X)+\mathbb{Var}(Y) = \sigma_1^2 + \sigma_2^2$$ Thus the integral is reduced to evaluating $\mathbb{E}\left( \max(Z, 0)\right)$: $$\begin{eqnarray} \mathbb{E}\left( \max(Z, 0)\right) &=& \int_0^\infty z f_Z(z) \mathrm{d} z = \int_0^\infty \frac{z}{s} \frac{1}{\sqrt{2 \pi}} \exp\left(-\frac{1}{2} \frac{(z-m)^2}{s^2} \right) \mathrm{d} z \\ &=& m \int_0^\infty f_Z (z) \mathrm{d} z + s \left. \left(-\frac{1}{\sqrt{2\pi}} \exp\left(-\frac{(z-m)^2}{2s^2} \right)\right) \right|_{z=0}^{z=\infty} \\ &=& m \cdot \Phi\left(\frac{m}{s}\right) + s \cdot \phi\left(\frac{m}{s}\right) \end{eqnarray}$$ Thus: $$\begin{eqnarray} \int_\mathbb{R} x \left( \frac{1}{\sigma_1} \phi\left(\frac{x}{\sigma_1}\right) \Phi\left(\frac{x-\mu}{\sigma_2}\right) + \frac{1}{\sigma_2} \phi\left(\frac{x-\mu}{\sigma_2}\right) \Phi\left(\frac{x}{\sigma_1}\right) \right) dx = \\ \mu \Phi\left(\frac{\mu}{\sqrt{\sigma_1^2+\sigma_2^2}}\right) + \sqrt{\sigma_1^2+\sigma_2^2} \phi\left(\frac{\mu}{\sqrt{\sigma_1^2+\sigma_2^2}}\right) \end{eqnarray}$$
Is that the expected value of the max of two independent normals ? If so, you have the following simple argument: with m = min(X,Y), M = Max(X,Y), m+M = X+ Y and M-m = |X - Y|. As you have the expectations of the rhs (this is special to normal) you can find expected value of m,M. The first is $\mu$ and the second is the expected value of the absolute value of a $N(\mu, \sigma_1^2 + \sigma_2^2)$, which is straightforward. If answer to first question is 'yes' one expects this comes to same expression as in previous.
• i added a little detail, the issue it comes down to, $\mathbb E |X|$ where X is normal , really is straightforward. I've no reason to think previous post (Sasha) is incorrect. – mike Sep 14 '12 at 19:33