cdf function

Computes the cumulative distribution for a given random variable