How does one directly (by finding primitive) compute an integral which corresponds to the normal distribution:
$\int_{a}^{b} e^{{-(x-a)^2}/{2s^2}} \,\mathrm{d}x$
How does one directly (by finding primitive) compute an integral which corresponds to the normal distribution:
$\int_{a}^{b} e^{{-(x-a)^2}/{2s^2}} \,\mathrm{d}x$
Assuming you want to calculate $\int_a^b {e^{ - (x - \mu )^2 /(2\sigma ^2 )} \,dx}$, where $\mu$ and $\sigma^2$ stand for the mean and variance of a normal distribution, respectively, then $ I:=\int_a^b {e^{ - (x - \mu )^2 /(2\sigma ^2 )} \,dx} = \frac{{\sqrt {2\pi \sigma ^2 } }}{{\sqrt {2\pi \sigma ^2 } }}\int_a^b {e^{ - (x - \mu )^2 /(2\sigma ^2 )} \,dx} = \sqrt {2\pi \sigma ^2 } {\rm P}(a \le X \le b), $ where $X$ is a Normal$(\mu,\sigma^2)$ random variable. Hence, since $(X - \mu )/\sigma \sim {\rm Normal}(0,1)$, $ I = \sqrt {2\pi \sigma ^2 } {\rm P}\bigg(\frac{{a - \mu }}{\sigma } \le \frac{{X - \mu }}{\sigma } \le \frac{{b - \mu }}{\sigma }\bigg) = \sqrt {2\pi \sigma ^2 } \bigg[\Phi \bigg(\frac{{b - \mu }}{\sigma }\bigg) - \Phi \bigg(\frac{{a - \mu }}{\sigma }\bigg)\bigg], $ where $\Phi$ is the distribution function of the Normal$(0,1)$ distribution.