fn ln_pmf(&self, k: u64) -> f64 {
        let k_as_float = k as f64;
        let x = gamma::ln_gamma(self.r + k_as_float)
            - gamma::ln_gamma(self.r)
            - gamma::ln_gamma(k_as_float + 1.0)
            + (self.r * f64::ln(self.p))
            + (k_as_float * f64::ln(1.0 - self.p));
        x
    }
/// Calculates the log probability mass function for the binomial
/// distribution at `x`
///
/// # Formula
///
/// ```ignore
/// ln_gamma(r + k) - ln_gamma(r) - fn_gamma(k + 1) + (r + ln(p)) + (k * ln(1-p))
/// ```
Calculates the log probability mass function for the binomial
distribution at `x`
Calculates the log probability mass function for the binomial distribution at ` x `
fn ln_pmf(&self, k: u64) -> f64 {
        let k_as_float = k as f64;
        let x = gamma::ln_gamma(self.r + k_as_float)
            - gamma::ln_gamma(self.r)
            - gamma::ln_gamma(k_as_float + 1.0)
            + (self.r * f64::ln(self.p))
            + (k_as_float * f64::ln(1.0 - self.p));
        x
    }
fn ln_pmf ( & self , k : u64 ) -> f64 { let k_as_float = k as f64 ; let x = gamma :: ln_gamma ( self . r + k_as_float ) - gamma :: ln_gamma ( self . r ) - gamma :: ln_gamma ( k_as_float + 1.0 ) + ( self . r * f64 :: ln ( self . p ) ) + ( k_as_float * f64 :: ln ( 1.0 - self . p ) ) ; x }
Calculates the log probability mass function for the binomial
distribution at `x`
Calculates the log probability mass function for the binomial distribution at ` x `
&self
k
u64
&self
k
u64
formula
None