Is there a closed form expression for $\int_{- \infty}^\infty \int_{-\infty}^y \frac{1}{2 \pi} e^{-(1/2) ( x^2+y^2 )} \mathrm{d}x\,\mathrm{d}y$?
I have been trying to evaluate the integral:
$$\int_{- \infty}^\infty \int_{-\infty}^y \frac{1}{2 \pi} e^{-(1/2) ( x^2+y^2 )}\mathrm {d}x\,\mathrm{d}y$$
I know of course that the integral equals $1$ over $[-\infty,\infty] \times [-\infty,\infty]$ but I do not quite know how to handle the present case. Are there any tricks here?
Thank you.
Your integral is the probability: $$\mathbb{P}[X\leq Y]$$ where $X$ and $Y$ are two independent normal variables $N(0,1)$,
hence the value of the integral is just $\frac{1}{2}$, since: $$\mathbb{P}[X\leq Y]=\mathbb{P}[Y\leq X],\qquad \mathbb{P}[X\leq Y]+\mathbb{P}[Y\leq X]=1.$$
Jack D'Aurizio's answer is good, but since you said in comments under it that you wanted a different point of view, let's try this: \begin{align} u & = (\cos45^\circ)x-(\sin45^\circ)y = \tfrac{\sqrt{2}}2 x - \tfrac{\sqrt{2}}2 y \\ v & = (\sin45^\circ)x+(\cos45^\circ)y = \tfrac{\sqrt{2}}2 x + \tfrac{\sqrt{2}}2 y \end{align} This is just a $45^\circ$ rotation of the coordinate system, suggested by the fact that your boundary line $y=x$ is just a $45^\circ$ rotation of one of the coordinate axes.
Then simplify $u^2+v^2$ and find that it comes down to $x^2+y^2$.
Solving the system of two equations above for $x$ and $y$, one gets \begin{align} x & = \phantom{-}\tfrac{\sqrt{2}}2 u + \tfrac{\sqrt{2}}2 v \\ y & = -\tfrac{\sqrt{2}}2 u + \tfrac{\sqrt{2}}2 v \end{align} By trivial algebra, the condition that $x\le y$ now becomes $u\le0$.
If you know about Jacobians, you get $$ du\,dv = \left|\frac{\partial(u,v)}{\partial(x,y)}\right|\,dx\,dy = \left|\frac{\partial u}{\partial x}\cdot\frac{\partial v}{\partial y} - \frac{\partial u}{\partial y}\cdot\frac{\partial v}{\partial x}\right|\,dx\,dy = 1\,dx\,dy. $$ Hence your iterated integral becomes $$ \int_{-\infty}^\infty\int_{-\infty}^0 \frac 1{2\pi} e^{-(u^2+v^2)/2}\,du\,dv = \int_{-\infty}^\infty \int_{-\infty}^0 \left\{\frac 1{2\pi} e^{-v^2/2}\right\} e^{-u^2/2}\,du\,dv $$ The part in $\{\text{braces}\}$ does not depend on $u$, so this is $$ \int_{-\infty}^\infty\left( \frac 1{2\pi} e^{-v^2/2} \int_{-\infty}^0 e^{-u^2/2}\,du \right)\,dv. $$ Now the inside integral does not depend on $v$, so it pulls out: $$ \int_{-\infty}^\infty e^{-v^2/2}\,dv \cdot \frac1{2\pi} \int_{-\infty}^0 e^{-u^2/2}\,du $$ and this is of course $$ \int_{-\infty}^\infty \frac1{\sqrt{2\pi}} e^{-v^2/2}\,dv \cdot \int_{-\infty}^0 \frac1{\sqrt{2\pi}} e^{-u^2/2}\,du. $$ The first integral comes to $1$ and the second, by a simple symmetry argument, is $1/2$.
Set $x=r\cos \theta,y=r\sin \theta$, then we have
$$\int_{- \infty}^\infty \int_{-\infty}^y e^{-(1/2) ( x^2+y^2 )}\mathrm {d}x\,\mathrm{d}y=\int_{0}^\infty \left(\int_{-3\pi/4}^{\pi/4} e^{-r^2/2}\mathrm {d}\theta\,\right)r\,\mathrm{d}r=\pi \int_{0}^\infty e^{-r^2/2}r\,\mathrm{d}r=\pi$$
So the original integral is equal to $(1/2)$.
This method as well as @MichaelHardy's method also works for the integrals like:
$$\int_{- \infty}^\infty \int_{-\infty}^{a y} e^{-(1/2) ( x^2+y^2 )}\mathrm {d}x\,\mathrm{d}y, \text{ }a \in \mathbb{R}$$
The results are the same. This is because the function to be integrated ($e^{-r^2/2}$) is rotational invariant (independent of $\theta$) and $x=a y$ is a straight line going through the origin and divides the plane into 2 halfs of equal size.