public double Cdf(int k) { if (k < 0) { return(0); } if (k > N) { return(1); } return(BetaFunction.RegularizedIncompleteValue(N - k, 1 + k, 1 - P)); }
/// <summary> /// Cumulative distribution function /// </summary> public double Cdf(double x) => BetaFunction.RegularizedIncompleteValue(Alpha, Beta, x);
public double Cdf(double x) { double p = 0.5 * BetaFunction.RegularizedIncompleteValue(0.5 * df, 0.5, df / (df + x.Sqr())); return(x > 0 ? 1 - p : p); }