Skip to main content

normal_two_sided_probability

Function normal_two_sided_probability 

Source
pub fn normal_two_sided_probability(z: f64) -> f64
Expand description

Two-sided standard-normal probability P(|Z| ≥ |z|).

The exact symmetric identity is erfc(|z|/√2). Evaluating that identity directly avoids both the cancellation in 2·(1 − Φ(|z|)) and an unnecessary rounding from multiplying a one-sided tail by two.