fn cdf(&self, x: f64) -> f64 {
        // NOTE: this differes from the MathNet.Numerics implementation that throws
        // at x < -1 and returns non-null values for x below but close to 0.
        // Including the two if guards allows the test suite to pass. I'm not sure if x < 0 is even
        // well defined for the negative binomial distribution. The scipy implementation
        // likewise gives 0 for x below 0

        if x < 0.0 {
            0.0
        } else if x == f64::INFINITY {
            1.0
        } else {
            1.0 - beta::beta_reg(x + 1.0, self.r, 1.0 - self.p)
        }
    }
/// Calulcates the cumulative distribution function for the
/// negative binomial distribution at `x`
///
/// # Formula
///
/// ```ignore
/// 1 - I_(1 - p)(x + 1, r)
/// ```
///
/// where `I_(x)(a, b)` is the regularized incomplete beta function
Calulcates the cumulative distribution function for the
negative binomial distribution at `x`
Calulcates the cumulative distribution function for the negative binomial distribution at ` x `
fn cdf(&self, x: f64) -> f64 {
        // NOTE: this differes from the MathNet.Numerics implementation that throws
        // at x < -1 and returns non-null values for x below but close to 0.
        // Including the two if guards allows the test suite to pass. I'm not sure if x < 0 is even
        // well defined for the negative binomial distribution. The scipy implementation
        // likewise gives 0 for x below 0
        if x < 0.0 {
            0.0
        } else if x == f64::INFINITY {
            1.0
        } else {
            1.0 - beta::beta_reg(x + 1.0, self.r, 1.0 - self.p)
        }
    }
fn cdf ( & self , x : f64 ) -> f64 { // NOTE: this differes from the MathNet.Numerics implementation that throws // at x < -1 and returns non-null values for x below but close to 0. // Including the two if guards allows the test suite to pass. I'm not sure if x < 0 is even // well defined for the negative binomial distribution. The scipy implementation // likewise gives 0 for x below 0 if x < 0.0 { 0.0 } else if x == f64 :: INFINITY { 1.0 } else { 1.0 - beta :: beta_reg ( x + 1.0 , self . r , 1.0 - self . p ) } }
Calulcates the cumulative distribution function for the
negative binomial distribution at `x`
Calulcates the cumulative distribution function for the negative binomial distribution at ` x `
&self
x
f64
&self
x
f64
formula
None