discrete Inverse CDF
Randomly selects from the array using the supplied cdf, NO checking of arrays
Return
the randomly selected value
Parameters
array
array to select from
cdf
the cumulative probability associated with each element of array
stream
the source of randomness