Inverse method; Suppose that it is desired to obtain a number a random sample x from the (continuous or discrete) probability density function f(x). the inverse method first determines a closed form expression of the cumulative density function f(x), for all defined values of y. Given R is a random value obtained from a uniform (0,1) distribution, and assuming that F is the invers of F, the steps of the method are as follows.