Normal cumulative distribution function

`p = normcdf(x)`

p = normcdf(x,mu,sigma)

[p,plo,pup] = normcdf(x,mu,sigma,pcov,alpha)

[p,plo,pup] = normcdf(___,'upper')

`p = normcdf(x)`

returns the standard normal
cdf at each value in `x`

. The standard normal distribution
has parameters `mu = 0`

and `sigma = 1`

. `x`

can
be a vector, matrix, or multidimensional array.

`p = normcdf(x,mu,sigma)`

returns
the normal cdf at each value in `x`

using the specified
values for the mean `mu`

and standard deviation `sigma`

. `x`

, `mu`

,
and `sigma`

can be vectors, matrices, or multidimensional
arrays that all have the same size. A scalar input is expanded to
a constant array with the same dimensions as the other inputs. The
parameters in `sigma`

must be positive.

`[p,plo,pup] = normcdf(x,mu,sigma,pcov,alpha)`

returns
confidence bounds for `p`

when the input parameters `mu`

and `sigma`

are
estimates. `pcov`

is the covariance matrix of the
estimated parameters. `alpha`

specifies 100(1 - `alpha`

)%
confidence bounds. The default value of `alpha`

is
0.05. `plo`

and `pup`

are arrays
of the same size as `p`

containing the lower and
upper confidence bounds.

`[p,plo,pup] = normcdf(___,'upper')`

returns
the complement of the normal cdf at each value in `x`

,
using an algorithm that more accurately computes the extreme upper
tail probabilities. You can use `'upper'`

with any
of the previous syntaxes.

The function `normcdf`

computes confidence
bounds for `p`

using a normal approximation to the
distribution of the estimate

$$\frac{X-\widehat{\mu}}{\widehat{\sigma}}$$

and then transforming those bounds to the scale of the output `p`

.
The computed bounds give approximately the desired confidence level
when you estimate `mu`

, `sigma`

,
and `pcov`

from large samples, but in smaller samples
other methods of computing the confidence bounds might be more accurate.

The normal cdf is

$$p=F(x|\mu ,\sigma )=\frac{1}{\sigma \sqrt{2\pi}}{\displaystyle {\int}_{-\infty}^{x}{e}^{\frac{-{(t-\mu )}^{2}}{2{\sigma}^{2}}}}dt$$

The result, *p*, is the probability that a
single observation from a normal distribution with parameters µ
and σ will fall in the interval (-∞ *x*].

The *standard normal* distribution has µ
= 0 and σ = 1.

Was this topic helpful?