Monte Carlo Method

• Dec 1st 2009, 06:50 PM
statmajor
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.
• Dec 1st 2009, 07:03 PM
pickslides
$\displaystyle \int e^{x-e^x} dx= -e^{-e^x}$
• Dec 1st 2009, 11:15 PM
CaptainBlack
Quote:

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
• Dec 2nd 2009, 07:38 AM
statmajor
$\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?