DEmpirical CDF
This class provides a representation for a discrete distribution with arbitrary values and assigned probabilities to each value. Allows the specification of the distribution via a pair of arrays containing the values = {v1, v2, ..., vn} and the cumulative probabilities cdf = {c1, c2, ..., 1.0}
where if p1 is the probability associated with v1, p2 with v2, etc. then c1 = p1, c2 = p1 + p2, c3 = p1 + p2 + p3, etc., with cn = 1.0 (the sum of all the probabilities). If cn is not 1.0, then an exception is thrown.
Parameters
an array of values that will be drawn from, which must have distinct values
a cdf corresponding to the values
an optional name/label
Properties
Functions
Gets the parameters for the distribution as an array of paired parameters (value, cumulative probability), e.g., X[] = v1, cp1, v2, cp2, ..., vn, cpn.
Sets the parameters for the distribution. Array of probability points (value, cumulative probability), e.g., X[] = v1, cp1, v2, cp2, ..., vn, cpn, as the input parameters.
Promises to return a random variable that uses the supplied stream number using the supplied stream provider