pub struct Normal<T> { /* private fields */ }Expand description
Normal distribution
Fore more information: https://en.wikipedia.org/wiki/Normal_distribution
Implementations§
Trait Implementations§
Source§impl<T> Continuous<T> for Normal<T>
impl<T> Continuous<T> for Normal<T>
Source§fn quantile(&self, p: T) -> T
fn quantile(&self, p: T) -> T
Quantile: function of inverse cdf
The Percentage Points of the Normal Distribution Author(s): Michael J. Wichura Year 1988 Journal of the Royal Statistical Society 0.0 < p < 1.0
§Panics
if p <= 0.0 || p >= 1.0
Source§fn mean(&self) -> T
fn mean(&self) -> T
Expected value
§Example
use mathru::{
self,
statistics::distrib::{Continuous, Normal},
};
let distrib: Normal<f64> = Normal::new(0.0, 0.2);
let mean: f64 = distrib.mean();Source§fn variance(&self) -> T
fn variance(&self) -> T
Variance
§Example
use mathru::{
self,
statistics::distrib::{Continuous, Normal},
};
let distrib: Normal<f64> = Normal::new(0.0, 0.2);
let var: f64 = distrib.variance();Source§fn skewness(&self) -> T
fn skewness(&self) -> T
Skewness
§Example
use mathru::{
self,
statistics::distrib::{Continuous, Normal},
};
let mean: f64 = 1.0;
let variance: f64 = 0.5;
let distrib: Normal<f64> = Normal::new(mean, variance);
assert_eq!(0.0, distrib.skewness());impl<T: Copy> Copy for Normal<T>
Auto Trait Implementations§
impl<T> Freeze for Normal<T>where
T: Freeze,
impl<T> RefUnwindSafe for Normal<T>where
T: RefUnwindSafe,
impl<T> Send for Normal<T>where
T: Send,
impl<T> Sync for Normal<T>where
T: Sync,
impl<T> Unpin for Normal<T>where
T: Unpin,
impl<T> UnsafeUnpin for Normal<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Normal<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more