# ERF Function

Returns the value of the (normal) error function.

## Syntax

### Required Argument

#### argument

specifies a numeric
constant, variable, or expression.

## Details

The ERF function returns
the integral, given by

$\begin{array}{c}ERF\left(x\right)=\frac{2}{\sqrt[\phantom{\rule{0ex}{0ex}}]{\phantom{\rule{0.212em}{0ex}}\pi \phantom{\rule{0.212em}{0ex}}}}\underset{0}{\overset{x}{\int}}{\epsilon}^{{-z}^{2}}dz\hfill \end{array}$
## Example

You can use the ERF
function to find the probability (p) that a normally distributed random
variable with mean 0 and standard deviation will take on a value
less than X. For example, the quantity that is given by the following
statement is equivalent to PROBNORM(X):

p=.5+.5*erf(x/sqrt(2));

The following SAS statements
produce these results.