Monte Carlo, Sampling, Random Numbers, Discrete Random Variables, Rejection Method.
is in the range [a,b] and u2 is in the range [0,1], it means we are going to fill the total area of this rectangular with some random dots. If the below condition is satisfied it mean the random point (random dot) is inside the region under f(x) (see picture above). And if the condition is not