normal.cdf

normal.cdf, function

def pure normal.cdf(mu: number, sigma: number, x: number): number

Returns the cumulative probability of the normal distribution with mean mu and standard deviation sigma, evaluated at x.

Examples

table T = with
  [| as Mu, as Sigma, as X |]
  [| 0, 1, -1 |]
  [| 0, 1,  0 |]
  [| 0, 1,  1 |]
  [| 10, 0, 9 |]
  [| 10, 0, 10 |]

show table "normal.cdf" with
  T.Mu
  T.Sigma
  T.X
  normal.cdf(T.Mu, T.Sigma, T.X) as "P[X <= x]"

This outputs the following table:

Mu Sigma X P[X <= x]
0 1 -1 0.1586553
0 1 0 0.5
0 1 1 0.8413447
10 0 9 0
10 0 10 1

Remarks

When sigma is zero, normal.cdf(mu, 0, x) behaves like the cumulative distribution of a point mass at mu: it returns 0 for x < mu, and 1 for x >= mu.

normal.cdf is the continuous counterpart of cdf for a parametric normal distribution.

Errors

Calling normal.cdf with a negative sigma results in an error message:

’normal.cdf()’: sigma must be non-negative, but found -1.

See also

User Contributed Notes
0 notes + add a note