where U is a uniformly distributed random number from 0 to 1, and P denotes cumulative probability in a given cumulative
density function. To better demonstrate the algorithm, we made a schematic diagram in Fig. 5. Based on the algorithm and
the given probability functions (Fig. 5), the randomly generated x is equal to 10 in corresponding to U = 0.05 (between 0
and 0.1), or x is equal to 30 as U = 0.6 (between 0.5 and 0.7), and so on.