Cdf.Binomial Method |
Namespace: Imsl.Stat
Method Cdf.Binomial evaluates the distribution function of a binomial random variable with parameters n and p with p=pin. It does this by summing probabilities of the random variable taking on the specific values in its range. These probabilities are computed by the recursive relationship
To avoid the possibility of underflow, the probabilities are
computed forward from 0, if k is not greater
than n times p, and are computed backward
from n, otherwise. The smallest positive machine
number, , is used as the starting
value for summing the probabilities, which are rescaled by
if forward computation is
performed and by
if backward
computation is done. For the special case of p = 0,
Cdf.Binomial is set to 1; and for the case p = 1,
Cdf.Binomial is set to 1 if k = n and to 0 otherwise.