1

On a test, I encountered this super silly problem.

Compute $\int_{-1}^{1}\sqrt{\frac{e^{-x^2}}{2π}}\,dx$ to the nearest hundredth.

We can rewrite this as $\int_{-1}^1\frac{1}{\sqrt{2π}}e^{\frac{-x^2}{2}}\,dx$.

I stared at this in horror for a few seconds, and then I recalled a weird function for the normal distribution... yup, this was it.

Looking at the bounds, -1 to 1 represented within 1 standard deviation. 68-95-99 or something. But the 68 represents 0.68 probability, which is the nearest hundred.

Therefore, the answer was 0.68.

Now, how can I do this without 68-95-99 or whatever rule?

  • If there was a method, the mathematicians didn't make a table for the normal distribution. – Nosrati Mar 14 '17 at 08:08
  • @MyGlasses There could be a method which is just not fun to do (e.g. Taylor expansion). We have log tables even though log can be found by Taylor expansion. – Patrick Stevens Mar 14 '17 at 08:12
  • I meant precise value. Of course Taylor expansion give us a good approximation. – Nosrati Mar 14 '17 at 08:15
  • Using Taylor expansion: $$\int_{-1}^1\frac{1}{\sqrt{2π}}e^{\frac{-x^2}{2}},dx=\int_{-1}^1\frac{1}{\sqrt{2π}}\left(1-\frac{x^2}{2}+\frac{x^4}{8}-\frac{x^6}{48}+\cdots\right)dx$$ some first terms gives us a good approximation of the integral. – Nosrati Mar 14 '17 at 08:18
  • Along with the above there are also all the methods belonging to Riemann sums, like Simpsons Rule – Triatticus Mar 14 '17 at 09:26
  • "super silly" ? Just turn "horror" to "error (function)" and you have it. –  Mar 14 '17 at 09:38
  • +1 for recognizing this on an exam. I think it's just a tricky exam question - for other bounds encountered in practice you'd just use the table or software (Excel, mathematica, ...) as the answers suggest. – Ethan Bolker Mar 14 '17 at 16:57

1 Answers1

2

Knowing that $$\int_{-a}^a\frac{1}{\sqrt{2π}}e^{\frac{-x^2}{2}}\,dx=\text{erf}\left(\frac{a}{\sqrt{2}}\right)$$ you could use Taylor series as MyGlasses commented or some approximation.

I give you one of mine (see here) $$\mathrm{erf}\!\left(x\right)\approx\sqrt{1-\exp\Big(-\frac 4 {\pi}\,\frac{1+\alpha\, x^2}{1+\beta\, x^2}\,x^2 \Big)}$$ using $$\alpha=\frac{10-\pi ^2}{5 (\pi -3) \pi }\qquad \text{and}\qquad \beta=\frac{120-60 \pi +7 \pi ^2}{15 (\pi -3) \pi }$$ Using $a=1$, the approximation gives $0.682682$ for an exact value equal to $0.682689$.

If you want something simpler but, for sure, less accurate, you could use $$\mathrm{erf}\!\left(x\right)\approx \sqrt{1-\exp\Big(-\frac {4x^2} {\pi} \Big)}$$ which, for $a=1$ would give $0.686238$.