If $\displaystyle f(x)=ax^{-a-1}$ where a is positive, how do I generate random variables from a uniform random number generator? Any help would be greatly appreciated.

Printable View

- Jan 30th 2010, 08:48 PMbrogersGenerating random variables
If $\displaystyle f(x)=ax^{-a-1}$ where a is positive, how do I generate random variables from a uniform random number generator? Any help would be greatly appreciated.

- Jan 30th 2010, 11:41 PMCaptainBlack
Let $\displaystyle F(x)$ be the cumulative distribution for a continuous random variable $\displaystyle X$, and let $\displaystyle Y \sim U(0,1)$. Then:

$\displaystyle Z=F^{-1}(Y)$

has cumulative distribution $\displaystyle F(z)$.

Hence if $\displaystyle y$ is a sample from the $\displaystyle U(0,1)$, $\displaystyle z=F^{-1}(y)$ is a sample from the distribution with cumulative distribution $\displaystyle F(z)$

CB