pub fn unif_per(p: f64, a: f64, b: f64) -> f64
Expand description
Computes a percentile for X ~ Unif(a,b)
.
§Note
Determines the value of x
such that P(X <= x) = q
.
§Parameters
-infinity < a < infinity
-infinity < b < infinity
a < b
§Support
a < x < b
§Example
Suppose X ~ Unif(a=0.0, b=1.0)
. To find the 80th percentile, use q=0.80
and
use ruststat::unif_per;
println!("Percentile: {}", unif_per(0.8, 0.0, 1.0));