7. Simulate random variable with given cumulative distribution function