negBinomialPMF

fun negBinomialPMF(j: Int, r: Double, p: Double, recursive: Boolean = true): Double

Allows static computation of prob mass function assumes that distribution's range is {0,1, ...}

Return

the probability

Parameters

j

value for which prob is needed

r

num of successes

p

prob of success, must be in range (0,1)

recursive

true indicates that the recursive logarithmic algorithm should be used