Skip to main content

Function: norm_cdf()

norm_cdf(x): number

Defined in: src/models/cricket_wp.ts:259

Standard normal CDF at full double precision (a scipy.stats.norm.cdf equivalent).

Parameters​

x​

number

The z-score; NaN returns NaN.

Returns​

number

Phi(x) in [0, 1].

Remarks​

Relative error ~1e-15 in the left tail (Laplace continued fraction below -sqrt(2), erf series between, symmetry above); agrees with scipy to ~6e-14 relative at worst for |x| >= 20. Not mounted on sdv.cricket; import it from this module.

Example​

import { norm_cdf } from './cricket_wp.js';
norm_cdf(0); // 0.5
norm_cdf(-1.96); // 0.0249...