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

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?

• The integral of the whole PDF is of course 1, that's how the normalization constant was selected. As for how to do that analytically, it is a famous problem, look up the Gaussian integral.
– Ian
Feb 16, 2020 at 2:47
• If $f$ is a PDF for a random variable $X$, then $\int_{-\infty}^\infty f(x) \, dx = P( -\infty < X < \infty) = 1$. Feb 16, 2020 at 3:24

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

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

Thus, the integral is $$1$$.

• This is circular reasoning. You haven't proven your claim that the function is a PDF, you've simply assumed it. Feb 16, 2020 at 9:30
• It is not circular reasoning. OP acknowledges that they know that the function is a PDF, and PDFs are literally defined to integrate to unity. Feb 16, 2020 at 14:29
• Reread his post: "How can I calculate the area under the PDF for the Normal Distribution?". Feb 16, 2020 at 23:05
• I have read it. They include the word 'PDF,' so what I said stands. Feb 16, 2020 at 23:07
• What you're doesn't make any sense. Firstly, he asked how to calculate its area, and you haven't don't that. Secondly, why are we assuming the normal distribution is a PDF? Because the OP said it was? I'd recommend updating your answer to actually prove your claim instead of simply asserting it. Feb 17, 2020 at 3:58

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