Integration of standard normal distribution without upper bound

81 Views Asked by At

Integration of standard normal distribution without upper bound

Hi! Can anyone tell if I have made any mistakes in the calculation above, the function I get out of it doesn't have the right values. Thanks!

Question: Evaluate:$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{k}e^{-x^2/2}dx$$

2

There are 2 best solutions below

0
On

\begin{align} & \int_{-\infty}^k \int_{-\infty}^k e^{-(x^2+y^2)/2} \, dx \, dy \ne \int_0^{2\pi} \int_0^k e^{-r^2/2} r\, dr\, d\theta. \end{align}

If you put $+\infty$ in the three places where $k$ appears above, then the two expressions would be equal.

Draw of picture of the set $\{ (x,y) : x\le k\ \&\ y\le x\}$ and of the set $\{ (x,y): r = \sqrt{x^2+y^2} \le k\}.$

The latter set is a disk of radius $k$ centered at $(0,0)$. The former an unbounded set whose boundary is made of two straight rays that meet each other at a right angle.

0
On

Here we use the standard definitions of Gamma function and the error functions as $$\Gamma(z)=\int_0^{\infty}x^{z-1}e^{-x}dx$$ and $$\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}dt=\frac{1}{\sqrt{\pi}}\int_{-x}^{x}e^{-t^2}dt$$

We make two cases:

Case 1: $k\lt 0$

Hence we have that $$\xi=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^k e^{-x^2/2}dx$$ Now using $x\mapsto -x/\sqrt{2}$ we get $$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^k e^{-x^2/2}dx=\frac{1}{\sqrt{\pi}}\int_{-k/\sqrt{2}}^{\infty}e^{-t^2}dt$$ $$=\frac{1}{\sqrt{\pi}}\left(\underbrace{\int_0^{\infty}e^{-t^2}dt}_{=\displaystyle \frac{\Gamma\left(\frac{1}{2}\right)}{2}=\frac{\sqrt{\pi}}{2}}-\underbrace{\int_0^{-k/\sqrt{2}}e^{-t^2}dt}_{=\frac{\sqrt{\pi}}{2}\text{erf}\left(-\frac{k}{\sqrt{2}}\right)}\right)=\frac{1}{2}-\frac{1}{2}\text{erf}\left(\frac{-k}{\sqrt{2}}\right)$$

Case 2: $k\gt 0$

$$\xi=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^ke^{-x^2/2}dx=\frac{1}{\sqrt{2\pi}}\left(\underbrace{\int_{-\infty}^0 e^{-x^/2}dx }_{I_1}+\underbrace{\int_0^k e^{-x^2/2}dx}_{I_2}\right)$$ Substituting $\displaystyle \frac{-x}{\sqrt{2}}=t$ in $I_1$ and substituting $\displaystyle \frac{x}{\sqrt{2}}=u$ in $I_2$ above we get $$\xi=\frac{1}{\sqrt{\pi}}\left(\underbrace{\int_0^{\infty}e^{-t^2}dt}_{=\displaystyle \frac{\Gamma\left(\frac{1}{2}\right)}{2}=\frac{\sqrt{\pi}}{2}}+\underbrace{\int_0^{k/\sqrt{2}} e^{-u^2}du}_{=\frac{\sqrt{\pi}}{2}\text{erf}\left(\frac{k}{\sqrt{2}}\right)}\right)$$ $$\implies \xi=\frac{1}{2}+\frac{1}{2}\text{erf}\left(\sqrt{k}{\sqrt{2}}\right)$$


Now note that $\displaystyle \text{erf}(-x)=-\text{erf}(x)$. Using this we get that for any $k\in\Bbb{R}$ and $Y\sim N(0,1)$ $$\Bbb{P}(Y\le k)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^k e^{-x^2/2}dx=\frac{1}{2}+\frac{1}{2}\text{erf}\left(\frac{k}{\sqrt{2}}\right)$$ Where $N(0,1)$ is the standard Normal random variable. In general it can be proved for Normal random variable $X\sim N(\mu,\sigma)$ we have that $$\Bbb{P}(X\le k)=\frac{1}{2}+\frac{1}{2}\text{erf}\left(\frac{k-\mu}{\sqrt{2}\sigma}\right)$$