What is the area under a PDF for a normal distrubution?

950 Views Asked by At

I have been trying to calculate the area under the graph of a PDF (Probability density function) for a normal distribution. The standard form of its PDF is $$\frac{e^{-(x-\mu)^2/2\sigma^2}}{\sqrt{2\pi}\sigma}$$ where $\mu$ is mean and $\sigma$ is standard deviation. The indefinite integral of this is $$\frac{1}{2}\operatorname{erf} \left(\frac{x-\mu}{\sqrt2\sigma}\right)+C$$ where $\operatorname{erf}$ is the error function (https://www.wikiwand.com/en/Error_function) and $C$ is the constant of integration. When I apply the limits from $-\infty$ to $\infty$, Wolfram Alpha is unable to compute it.

How then can I calculate the area under the PDF for the Normal Distribution?

3

There are 3 best solutions below

5
On BEST ANSWER

By definition, a probability density function must integrate to unity.

Thus, the integral is $1$.

0
On

$$Q=\int_0^\infty e^{-x^2} dx.$$

$$Q^2 = \int_0^\infty \int_0^\infty e^{-x^2-y^2} dx\,dy= \int_0^\frac{\pi}{2} \int_0^\infty e^{-r^2} r\,dr\,d\theta=\frac{\pi}{4}.$$

$$Q=\frac{\sqrt{\pi}}{2}.$$

A normalized Gaussian will integrate to 1 over the real line. That’s necessary to be a probability distribution.

We can check this.

$$\int_{-\infty}^\infty e^{-p^2} dp = 2Q=\sqrt{\pi}.$$

Let $p=\frac{x-\mu}{\sigma\sqrt{2}}$ so that $dp = \frac{1}{\sigma\sqrt{2}}dx$:

$$\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^\infty e^{-\frac{(x-\mu)^2}{2\sigma^2}} dx =\frac{1}{\sqrt{\pi}}\int_{-\infty}^\infty e^{-p^2} dp = 1.$$

0
On

Both Wolfram Alpha and Mathematica return the correct answer for an input of $\infty$ in the error function.

$$\textrm{Erf}(x) = \frac{1}{\sqrt{\pi}} \int_{-x}^x e^{-p^2}dp = \frac{2}{\sqrt{\pi} }\int_{0}^x e^{-p^2}dp. $$

enter image description here

enter image description here