Function geo2_ranvec
Source pub fn geo2_ranvec(nn: i32, p: f64) -> Vec<i32>
Expand description
Save random draws from X ~ Geo(p) distribution into a Vec
where X = the trial on which the first success is observed.
§Parameters
p = probability of success (0 < p <= 1)
§Example
Suppose X ~ Geo(p=0.6). Use
use ruststat::geo2_ranvec;
println!("Random Vec: {:?}", geo2_ranvec(10, 0.6));