# Can't compute the integral in this probability

Let X,Y be independent random variables following $N(0,1)$. What is the probability $P(X \geq 0, X+Y \geq 0)$?

I know this will be $\displaystyle\int_0^{\infty}\int_{-x}^{\infty}\frac{1}{2\pi}e^{-\frac{x^2+y^2}{2}}dydx$ the problem is I cannot evaluate the latter. Can someone help please?

• there is NO closed expression integration over 'y' gives error function – Jose Garcia Feb 7 '17 at 10:27
• @JoseGarcia Doesn't mean $\int_0^\infty \Phi(x)e^{-x^2/2}$ doesn't have a closed form expression. – spaceisdarkgreen Feb 7 '17 at 10:32
• I know that, but the double integral should be computable with some trick. This comes from having a random Gaussian walk and asking the probability that both x_1 and x_2 are positive. – Ted Feb 7 '17 at 10:32
• mathforum.org/library/drmath/view/52137.html - see the third from last integral – Cato Feb 7 '17 at 10:32
• Oh, great, thanks Cato! Polar coordinates do the trick! – Ted Feb 7 '17 at 10:36

We need to compute $$\int_0^\infty \Phi(x) \frac{1}{\sqrt{2\pi}}e^{-x^2/2}dx$$ where $\Phi(x) = \int_{-\infty}^x e^{-t^2/2}dt/\sqrt{2\pi}=\int_{-x}^\infty e^{-t^2/2}dt/\sqrt{2\pi}$ is the normal cumulative distribution function.
Since $\Phi'(x) = e^{-x^2/2}/\sqrt{2\pi},$ this can be rewritten $$\int_0^\infty\Phi(x)\Phi'(x)dx= \int_{1/2}^1\Phi d\Phi = 3/8$$ where we changed variables to $\Phi = \Phi(x).$
More generally if you want the probability that $a < X < b$ and $X+Y>0,$ you get $$\int_a^b\Phi(x)\Phi'(x)dx = \frac{1}{2}(\Phi(b)^2-\Phi(a)^2).$$
Using polar coordinates and thinking about the shape of the domain we get : $$\frac{1}{2\pi} \int_0^\infty \int_{-x}^\infty \exp(\frac{-x^2-y^2}{2}) \ dx dy = \frac{1}{2\pi} \int_{-\pi/4}^{\pi/2} d\phi\ \int_0^\infty dr\ \exp(-r^2/2)\cdot r =$$ $$\frac{\pi/2 + \pi/4}{2\pi} \int_0^\infty \exp(-r^2/2)\cdot r\ dr = \frac{\pi/2 + \pi/4}{2\pi} \cdot 1 = \frac{3}{8}$$
• should be $-\pi/4$ to $\pi/2.$ You just caught the sign error too, – spaceisdarkgreen Feb 7 '17 at 10:51
• Almost... now double check $\int_0^\infty e^{-r^2/2}rdr$ – spaceisdarkgreen Feb 7 '17 at 10:54