[−][src]Struct mathru::stats::distrib::Binomial
Binomial distribution
Fore more information: https://en.wikipedia.org/wiki/Binomial_distribution
Methods
impl Binomial
[src]
Trait Implementations
impl Discrete<u32, f64> for Binomial
[src]
fn pmf<'a>(&'a self, x: u32) -> f64
[src]
Probability mass function
Arguments
x
Random variable x &isin ࡃ
Example
extern crate mathru; use mathru::stats::distrib::{Discrete, Binomial}; let distrib: Binomial = Binomial::new(&5, &0.3); let x: u32 = 0; let p: f64 = distrib.pmf(x);
fn cdf<'a>(&'a self, x: f64) -> f64
[src]
Cumulative distribution function
Arguments
x
Random variable
Example
extern crate mathru; use mathru::stats::distrib::{Discrete, Binomial}; let distrib: Binomial = Binomial::new(&5, &0.3); let x: f64 = 0.4; let p: f64 = distrib.cdf(x);
fn mean<'a>(&'a self) -> f64
[src]
Expected value
Example
extern crate mathru; use mathru::stats::distrib::{Discrete, Binomial}; let distrib: Binomial = Binomial::new(&5, &0.3); let mean: f64 = distrib.mean();
fn variance<'a>(&'a self) -> f64
[src]
Variance
Example
extern crate mathru; use mathru::stats::distrib::{Discrete, Binomial}; let distrib: Binomial = Binomial::new(&5, &0.3); let var: f64 = distrib.variance();
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,