Monte Carlo, Sampling, Random Numbers, Discrete Random Variables, Rejection Method.
obtain an x that is uniformly distributed in range [a,b] or its probability distribution function’s range [a,b] is uniform. It is easy to generate (simulate) a uniform random number in an interval [a,b]. Just use what recently generated in the rang [0,1] and then calculate this: 3- The third step