# `stats`::`normalCDF`

Cumulative distribution function of the normal distribution

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```stats::normalCDF(`m`, `v`)
```

## Description

`stats::normalCDF(m, v)` returns a procedure representing the cumulative distribution function of the normal distribution with mean `m` and variance `v`.

The procedure `f := stats::normalCDF(m, v)` can be called in the form `f(x)` with an arithmetical expression `x`. The value ```1/2 + 1/2* erf((x - m)/sqrt(2*v))``` is returned.

If x is a floating-point number and both m and v can be converted to floating-point numbers, this value is returned as a floating-point number. Otherwise, a symbolic expression is returned.

Numerical values for m and v are only accepted if they are real and v is positive.

## Environment Interactions

The function is sensitive to the environment variable `DIGITS` which determines the numerical working precision.

## Examples

### Example 1

We evaluate the cumulative distribution function with mean m = 2 and variance at various points:

```f := stats::normalCDF(2, 3/4): f(-infinity), f(-3), f(PI), f(infinity)```
` `
`f(-100.0), f(-3.0), f(float(PI)), f(10.0), f(100.0)`
` `
`delete f:`

### Example 2

We use symbolic arguments:

`f := stats::normalCDF(m, v): f(3), f(x)`
` `

When numerical values are assigned to m and v, the function f starts to produce numerical values:

`m := 4: v := PI: f(3), f(3.0)`
` `
`delete f, m, v:`

## Parameters

 `m` The mean: an arithmetical expression representing a real value `v` The variance: an arithmetical expression representing a positive real value