pub fn nb2_cdf(x: i32, r: i32, p: f64) -> f64Expand description
Computes cumulative distribution function (cdf) for X ~ NB(r,p)
where X = the trial on which the rth success is observed.
§Parameters
r = r,r+1,r+2,...p= probability of success (0 <= p <= 1)
§Support
x = r,r+1,r+2,...
§Example
Suppose X ~ NB(r=2, p=0.6). To compute P(X <= 3), use
use ruststat::nb2_cdf;
println!("P(X<=x): {}", nb2_cdf(3, 2, 0.6));