A method for simulation of a random variable X. Suppose, for example, that X is continuous, with probability density function (pdf) f, and suppose that it is easy to simulate a random variable, Y, which has a pdf g that satisfies f(y)≤cg(y), for all y, where c is a constant. The rejection method then has three stages: (i) generate y, an observation of Y; (ii) generate a pseudo-random number u in the interval 0 < u < 1; (iii) if f(y)≥ucg(y), set x equal to y; otherwise return to (i).