binomialCDF

fun binomialCDF(j: Int, n: Int, p: Double): Double

Allows static computation of the CDF assumes that distribution's range is {0,1, ...,n} Uses the recursive logarithmic algorithm

Return

the cumulative probability at j

Parameters

j

value for which cdf is needed

n

num of trials

p

prob of success


fun binomialCDF(j: Int, n: Int, p: Double, recursive: Boolean): Double

Allows static computation of the CDF assumes that distribution's range is {0,1, ..., n}

Return

the cumulative probability at j

Parameters

j

value for which cdf is needed

n

num of trials

p

prob of success

recursive

true indicates that the recursive logarithmic algorithm should be used