Integrating a probability density function Let the pdf defined as: $P(x, \bar{x}, \sigma) = \exp\left(\frac{-(x-\bar{x})^2}{2\sigma^2}\right)$. How can we integrate this probability density for some values of $x$ that are higher than a given value $y$ ? That is computing $P(x>y)$.
 A: What you claim to be a probability density function is in fact not a probability density function, and its integral will not give you a probability. 
$$\begin{align*}
\int_y^{\infty}\exp\left(\frac{-(x-\bar{x})^2}{2\sigma^2}\right)\;\mathrm dx
&=\sigma\sqrt{2\pi}\int_y^{\infty}\frac{1}{\sigma\sqrt{2\pi}}\exp\left(\frac{-(‌​x-\bar{x})^2}{2\sigma^2}\right)\;\mathrm dx\\
&=\sigma\sqrt{2\pi}\left[1-\Phi\left(\frac{y-\bar{x}}{\sigma}\right)\right]
\end{align*}$$
where the value of $\Phi(\cdot)$ can be looked up in a table.  
If you must write a computer program to 
compute (an approximation to) the value of the integral 
via explicit numerical integration, try some of the
programs available in various computer languages at 
this site. Alternatively, if
it is not a requirement that
explicit numerical integration must be used,
the approximate value of $\Phi(x)$ can be computed
using the rational function approximations given
in Section 26.2 of 
Abramowitz and Stegun.
These approximations are used in most "scientific"
calculators and even in MATLAB and similar packages.
But if even greater accuracy is required,
more accurate values can be obtained by summing
the first few terms of one of the series for
$\Phi(x)$ that are given in Chapter 26 of Abramowitz 
and Stegun.  These methods are likely to be less 
time-consuming than explicit numerical integration.
