10
$\begingroup$

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.

$\endgroup$
1
  • 3
    $\begingroup$ I think you can exploit the simmetry of the integrand by noting that the line $y=x$ divides the plane in half. $\endgroup$ – Gennaro Marco Devincenzis Sep 6 '14 at 15:22
14
$\begingroup$

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.$$

$\endgroup$
7
  • $\begingroup$ That makes sense intuitively but could you please explain a little more why that is? There is no closed form then, right? $\endgroup$ – JohnK Sep 6 '14 at 15:26
  • 1
    $\begingroup$ $f(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}$ is the pdf of a $N(0,1)$ random variable, and $\frac{1}{2}$ looks as a very closed form to me. $\endgroup$ – Jack D'Aurizio Sep 6 '14 at 15:29
  • $\begingroup$ Yes but what allows us to say that the value of that probability is 1/2? $\endgroup$ – JohnK Sep 6 '14 at 15:31
  • 3
    $\begingroup$ Symmetry: $$\mathbb{P}[Y\leq X]=\mathbb{P}[X\leq Y],\quad \mathbb{P}[Y\leq X]+\mathbb{P}[X\leq Y] = 1.$$ $\endgroup$ – Jack D'Aurizio Sep 6 '14 at 15:32
  • $\begingroup$ Simple yet elegant! Intuitively, it can also be seen by plotting the region $0<x<y<\infty$ since the integrand is even function (i.e. symmetry). +1 $\endgroup$ – Tunk-Fey Sep 6 '14 at 15:44
7
$\begingroup$

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$.

$\endgroup$
10
  • $\begingroup$ Thank you very much. I'll just have to understand how come that substitution rotates the coordinate system. $\endgroup$ – JohnK Sep 6 '14 at 16:48
  • $\begingroup$ nice result! you may simplify your answer by showing that $\int_{-\infty}^0 e^{-u^2}\,du=(1/2)\int_{-\infty}^{\infty} e^{-u^2}\,du$ as early in your answer as possible. $\endgroup$ – mike Sep 6 '14 at 16:52
  • 1
    $\begingroup$ Think of what that substitution does to $(x,y)=(1,0)$ and to $(x,y)=(0,1)$ and then you'll be well on your way to understanding why it's a rotation. But even if you didn't know it's a rotation, you should still be able to follow the argument. $\endgroup$ – Michael Hardy Sep 6 '14 at 16:52
  • 1
    $\begingroup$ . . . however, it is also the case that if you know nothing of Jacobians, you can understand that $du\,dv=dx\,dy$ by using the fact that the transformation is a rotation. Rotations multiply volumes by $1$, so the thing to multiply $dx\,dy$ by to get $du\,dv$ is $1$. ${}\qquad{}$ $\endgroup$ – Michael Hardy Sep 6 '14 at 16:54
  • 1
    $\begingroup$ The intuition behind Jacobians is often not made explicit in second-year calculus courses where the concept is introduced. But if the value of the Jacobian $|\partial(u,v)/\partial(x,y)|$ at a particular point is, for example $6$, that means that at that point an infinitesimal area in the $x,y$ plane is transformed to an infinitesimal area $6$ times as big in the $u,v$ plane. Determinants generally area what you multiply by a volume to get the volume it is transformed to. And the determinant is negative if the orientation gets reversed. $\endgroup$ – Michael Hardy Sep 6 '14 at 17:03
4
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Glad to see polar coordinates work too, thank you. $\endgroup$ – JohnK Sep 6 '14 at 18:27
1
$\begingroup$

Ah, I realise just now I'd misread to start with. Algebraically, we can solve it by noting that the value of the integral is the same under the change of variables $u=-x$, and since summing the two resulting integrals results in the $[-\infty,\infty] \times [-\infty,\infty]$ case, the answer is $1/2$.

i.e.:

$$\int_{- \infty}^\infty \int_{-\infty}^y \frac{1}{2 \pi} e^{-1/2 (x^2+y^2)} \,\mathrm{d}x\,\mathrm{d}y = \int_{- \infty}^\infty \int_{-y}^\infty \frac{1}{2 \pi} e^{-1/2 \left( x^2+y^2 \right)}\,\mathrm{d}x\,\mathrm{d}y.$$

$LHS+RHS=\int_{- \infty}^\infty \int_{-\infty}^\infty \frac{1}{2 \pi} e^{-1/2 (x^2+y^2)}\,\mathrm{d}x\,\mathrm{d}y=1$, and $LHS=RHS$, so your integral is $1/2$.

EDIT: I guess I was a little bit short. There are several ways of showing $LHS+RHS$ is what I quote, but here is a simple, uninformative one.

$LHS+RHS=\int_{- \infty}^\infty \int_{-\infty}^\infty \frac{1}{2 \pi} e^{-1/2 (x^2+y^2)}\,\mathrm{d}x\,\mathrm{d}y-\int_{- \infty}^\infty \int_{-y}^y\frac{1}{2 \pi} e^{-1/2 (x^2+y^2)}\,\mathrm{d}x\,\mathrm{d}y$.

Now, Let $I=\int_{- \infty}^\infty \int_{-y}^y\frac{1}{2 \pi} e^{-1/2 (x^2+y^2)}\,\mathrm{d}x\,\mathrm{d}y$. Use substitution $u=-y$. Then

$I=-\int_{\infty}^{-\infty} \int_{u}^{-u}\frac{1}{2 \pi} e^{-1/2 (x^2+u^2)}\,\mathrm{d}x\,\mathrm{d}u=\int_{-\infty}^{\infty} \int_{u}^{-u}\frac{1}{2 \pi} e^{-1/2 (x^2+u^2)}\,\mathrm{d}x\,\mathrm{d}u=-I$, hence as $I=-I$, $I=0$.

I think it could also be done by splitting the integration range up. (e.g. looking at the integrals on $(-\infty,0]$ and $[0,\infty)$)

$\endgroup$
2
  • 1
    $\begingroup$ If you do not mind how is that LHS+RHS equal that integral? $\endgroup$ – JohnK Sep 6 '14 at 16:09
  • $\begingroup$ @JohnK there you go :) $\endgroup$ – ShakesBeer Sep 7 '14 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.