# Thread:

1. ## 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.

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

$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

4. $\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?
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 11, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8747726082801819, "perplexity_flag": "middle"}