# Monte Carlo Method

• Dec 1st 2009, 07:50 PM
statmajor
Monte Carlo Method
Determine a method to generate random observations for the extreme valued pdf given by:

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

So I start by finding it's CDF:

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

and this is where I get stuck. Any help would be appreciated.
• Dec 1st 2009, 08:03 PM
pickslides
$\int e^{x-e^x} dx= -e^{-e^x}$
• Dec 2nd 2009, 12:15 AM
CaptainBlack
Quote:

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

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

So I start by finding it's CDF:

$\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:

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

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

CB
• Dec 2nd 2009, 08:38 AM
statmajor
$\int^{x}_{-\infty}e^{t-e^t} dt = -e^{-e^t} |^x_{-\infty} = 1 -e^{-e^x}$

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

U ~ Uniform(0,1)

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

Is this correct?