Given a uniformly distributed random variable x (such as the output from a standard Random Number Generator), how do we generate some other non-uniform distribution, q(y)?
Solution: Generate x, and take y = f(x). But how do we calculate f() given q() ?
The required function is the inverse cumulative distribution function given by:
Example: Exponential distribution (to simulate the lifetimes of radioactive nuclei)
So inverse is
Ref.
http://en.wikipedia.org/wiki/Cumulative_distribution_function