Probability of distance between two normal (or Gaussian) variables

50 Views Asked by At

I have this non-mandatory Probability exercise:

Let $X_1,X_2\sim \text{N}(0,1)$ be two independent normal variables. Solve $$\text{P}(|X_1-X_2|\leq a)=\frac{1}{2},$$ for $a>0$.

This is what I've tried:

Firstly, since $X_1,X_2$ are independent normal variables, we have $(X_1,X_2)\sim \text{N}(0,I)$, where $I$ is the $2\times 2$ identity matrix. Notice that $X_1-X_2=(1,-1)(X_1,X_2)^T\sim\text{N}(0,2)$, knowing how a linear transformation affects a Gaussian distribution (see here). That is, the mean is $\mu=0$ and standard deviation is $\sigma=2$. Therefore,

\begin{split}\text{P}(|X_1-X_2|\leq a)&=\text{P}(X_1-X_2\in [-a,a])\\ &=\int_{-a}^{a}\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}dx\\ &=\frac{1}{\sqrt{2\pi}}\int_0^ae^{-x^2/8}dx.\end{split} However, solving for $a$ is not easy. WolframAlpha gives the solution $$a=2\sqrt{2}\text{erf}^{-1}\left(\frac{1}{2}\right)\approx 1.34898,$$ where $\text{erf}$ is the error function. I've checked that this number doesn't have any known expressions involving only elementary functions. On the other hand, I have also arrived to this solution by a different reasoning, using that $$|X_1-X_2|\leq a\iff (X_1-X_2)^2\leq a^2,$$ and $(X_1-X_2)^2\sim 2^2\chi_1^2$, where $\chi_1^2$ is the Chi-square distribution with $1$ degree of freedom.

Since this exercise is designed to be done by hand, what have I done wrong?