Normal cumulative distribution function
The normcdf
function uses the complementary error
function erfc
. The relationship
between normcdf
and erfc
is
The complementary error function
erfc(x)
is defined as
The normcdf
function computes confidence bounds for
p
by using the delta method.
normcdf(x,mu,sigma)
is equivalent to
normcdf((x–mu)/sigma,0,1)
. Therefore, the
normcdf
function estimates the variance of
(x–mu)/sigma
using the covariance matrix of
mu
and sigma
by the delta
method, and finds the confidence bounds of (x–mu)/sigma
using the estimates of this variance. Then, the function transforms the
bounds to the scale of p
. The computed bounds give
approximately the desired confidence level when you estimate
mu
, sigma
, and
pCov
from large samples.
normcdf
is a function specific to normal
distribution. Statistics and Machine Learning Toolbox™ also offers the generic function cdf
, which supports various
probability distributions. To use cdf
, create a NormalDistribution
probability
distribution object and pass the object as an input argument or specify the
probability distribution name and its parameters. Note that the
distribution-specific function normcdf
is faster
than the generic function cdf
.
Use the Probability Distribution Function app to create an interactive plot of the cumulative distribution function (cdf) or probability density function (pdf) for a probability distribution.
[1] Abramowitz, M., and I. A. Stegun. Handbook of Mathematical Functions. New York: Dover, 1964.
[2] Evans, M., N. Hastings, and B. Peacock. Statistical Distributions. 2nd ed., Hoboken, NJ: John Wiley & Sons, Inc., 1993.