math

Bell Curve Integral

Suppose you want to integrate

$$ \int_{-\infty}^{\infty}{\sum_{i=0}^{n}{ a_i \cdot x^i \cdot \frac{e^\frac{-(x-\mu)^2}{-2\sigma^2} }{\sigma \sqrt{2\pi}}} dx} $$

where $a_i$, $\mu$, and $\sigma$ are all constants.

Why would you want to do this? Well, suppose $x$ were a normally distributed random variable, your utility function was a polynomial, and you wanted to compute the expected utility given different $\mu$ amd $\sigma$ parameters.

You may think a polynomial utility function is weird, but the concept is surprisingly powerful Taylor series. In Wikipedia.

Well, these terms are just the moments of the normal distribution, which are not terribly easy to compute Normal distribution. In Wikipedia. However, if we consider a slightly different problem:

$$ \int_{-\infty}^{\infty}{\sum_{i=0}^{n}{ a_i \cdot {\left(x - \mu \right)}^i \cdot \frac{e^\frac{-(x-\mu)^2}{-2\sigma^2} }{\sigma \sqrt{2\pi}}} dx} $$

We find this is just the sum of the central moments of the normal distribution, which are much more straightforward to compute Normal distribution. In Wikipedia:

$$E[(X - \mu)^p] = \begin{cases} 0 & \text{if }p\text{ is odd,} \\ \sigma^p (p-1)!! & \text{if }p\text{ is even.} \end{cases}$$

and so the altered problem is just equal to

$$ a_0 + \sum_{i=1}^{n}{ a_{2i} \cdot {\left(x - \mu \right)}^{2i} \cdot \sigma^{2i}(2i-1)!! } $$

where $!!$ denotes a double factorial Double factorial. In Wikipedia.

Wikipedia contributors. (2021, April 26). Taylor series. In Wikipedia, The Free Encyclopedia. Retrieved 22:45, April 30, 2021, from https://en.wikipedia.org/w/index.php?title=Taylor_series&oldid=1019945653 Wikipedia contributors. (2021, April 27). Normal distribution. In Wikipedia, The Free Encyclopedia. Retrieved 22:48, April 30, 2021, from https://en.wikipedia.org/w/index.php?title=Normal_distribution&oldid=1020223857 Wikipedia contributors. (2021, February 19). Double factorial. In Wikipedia, The Free Encyclopedia. Retrieved 22:57, April 30, 2021, from https://en.wikipedia.org/w/index.php?title=Double_factorial&oldid=1007674561