2
$\begingroup$

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

  • 1
    A closed form requires the (nonelementary) error function $\mathrm{erf}(x)$; is that what you want?2011-05-08
  • 0
    Can I do by explicit finding a primitive without using any additional functions?2011-05-08
  • 0
    [Risch says no.](http://dx.doi.org/10.1016/S0747-7171(85)80037-7)2011-05-08
  • 0
    @Kolya No. See Risch algorithm2011-05-08
  • 0
    @Kolya: Wouldn't you be satisfied with an expression of the form $\alpha [\Phi(\beta) - \Phi(\gamma)]$, where $\Phi$ is the standard normal distribution function?2011-05-08
  • 0
    Maybe yes. It works.2011-05-08
  • 0
    $\Phi$ and $\mathrm{erf}$ are essentially equivalent...2011-05-08
  • 0
    @J. M.: Of course, but probably in elementary courses $\Phi$ is more commonly used.2011-05-08
  • 0
    @Shai: I suppose; my bias is because I tend to use the error function in my applications more...2011-05-08

1 Answers 1

3

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.