Trait rv::traits::Cdf[][src]

pub trait Cdf<X>: Rv<X> {
    fn cdf(&self, x: &X) -> f64;

    fn sf(&self, x: &X) -> f64 { ... }
}

Has a cumulative distribution function (CDF)

Required Methods

The value of the Cumulative Density Function at x

Example

The proportion of probability in (-∞, μ) in N(μ, σ) is 50%

use rv::dist::Gaussian;
use rv::traits::Cdf;

let g = Gaussian::new(1.0, 1.5).unwrap();

assert!((g.cdf(&1.0_f64) - 0.5).abs() < 1E-12);

Provided Methods

Survival function, 1 - CDF(x)

Implementors