pub struct Pareto3Dist {
pub mu: f64,
pub sigma: f64,
pub gamma: f64,
}Expand description
Struct for the Pareto (type III) distribution X ~ Pareto3(mu, sigma, gamma).
§Parameters
-infinity < mu < infinitysigma > 0gamma > 0
§Support
x >= mu
§Example
Suppose X ~ Pareto3(mu=0.0, sigma=1.0, gamma=2.0). Use
use ruststat::Pareto3Dist;
let mut mydist = Pareto3Dist{mu:0.0, sigma:1.0, gamma:2.0};
println!("Probability density function f(1.5): {}", mydist.pdf(1.5));
println!("Cumulative distribution function P(X<=110.0): {}", mydist.cdf(1.5));
println!("99th percentile: {}", mydist.per(0.99));
println!("Random draw: {}", mydist.ran());
println!("Random vector: {:?}", mydist.ranvec(5));
println!("Mean: {}", mydist.mean());
println!("Variance: {}", mydist.var());
println!("Standard deviation: {}", mydist.sd());Fields§
§mu: f64§sigma: f64§gamma: f64Implementations§
Source§impl Pareto3Dist
impl Pareto3Dist
pub fn pdf(&mut self, x: f64) -> f64
pub fn cdf(&mut self, x: f64) -> f64
pub fn per(&mut self, x: f64) -> f64
pub fn ran(&mut self) -> f64
pub fn ranvec(&mut self, n: u64) -> Vec<f64>
pub fn mean(&mut self) -> f64
pub fn var(&mut self) -> f64
pub fn sd(&mut self) -> f64
Auto Trait Implementations§
impl Freeze for Pareto3Dist
impl RefUnwindSafe for Pareto3Dist
impl Send for Pareto3Dist
impl Sync for Pareto3Dist
impl Unpin for Pareto3Dist
impl UnsafeUnpin for Pareto3Dist
impl UnwindSafe for Pareto3Dist
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