Sunday, January 08, 2012

 

Non-Uniform Distribution from a Uniform Distribution

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:

clip_image002[6]

Example: Exponential distribution (to simulate the lifetimes of radioactive nuclei)

clip_image003[4], (τ≥0,and = 0 otherwise)

clip_image004[6]

So inverse is

clip_image001[5]

Ref.

http://en.wikipedia.org/wiki/Cumulative_distribution_function

http://en.wikipedia.org/wiki/Inverse_transform_sampling



    

Powered by Blogger