# The Method of Inverse Transforms

The Method of Inverse Transforms

This Demonstration illustrates the method of inverse transforms, which can be used to generate random numbers from a particular continuous or discrete probability distribution. By passing random numbers on the unit interval through the inverse of the cumulative distribution function (CDF), a sample of a random variable governed by that CDF is obtained. Each output is collected in a bin of an evolving histogram. During each iteration, the dotted red line running from the axis to the graph of the CDF to the axis illustrates the method explicitly. With multiple samples, you can obtain an approximation of the probability density function (PDF) associated with the given random variable. In this Demonstration, an assortment of continuous and discrete random variables are considered.

y

x