1. ## Monte Carlo Method

Determine a method to generate random observations for the extreme valued pdf given by:

$\displaystyle e^{x-e^x} \ \ \ \ \ - \infty < x < \infty$

So I start by finding it's CDF:

$\displaystyle \int^{x}_{-\infty}e^{x-e^x} dx$

and this is where I get stuck. Any help would be appreciated.

2. $\displaystyle \int e^{x-e^x} dx= -e^{-e^x}$

3. Originally Posted by statmajor
Determine a method to generate random observations for the extreme valued pdf given by:

$\displaystyle e^{x-e^x} \ \ \ \ \ - \infty < x < \infty$

So I start by finding it's CDF:

$\displaystyle \int^{x}_{-\infty}e^{x-e^x} dx$

and this is where I get stuck. Any help would be appreciated.
It is advisable not to use the same variable name for the dummy variable of integration and the limit of integration. Instead write this as:

$\displaystyle \int^{x}_{-\infty}e^{\xi-e^{\xi}} d\xi$

(or use whatever name you want for the dummy variable but not $\displaystyle x$)

CB

4. $\displaystyle \int^{x}_{-\infty}e^{t-e^t} dt = -e^{-e^t} |^x_{-\infty} = 1 -e^{-e^x}$

$\displaystyle y = 1 -e^{-e^x} => 1 - y = e^{-e^x}$
$\displaystyle ln(1 -y) = -e^x => -ln(1 -y) = e^x => ln(-ln(1 -y)) = x$

U ~ Uniform(0,1)

$\displaystyle ln(-ln(1 - U)) = F^{-1}(u) = X$

Is this correct?