Results 1 to 7 of 7

Math Help - Simulation

  1. #1
    Member
    Joined
    Mar 2006
    Posts
    125

    Simulation

    Good evening,

    I need a wee help with this proof:

    E[e^-x^2] = 1/sqrt((2*sigma^2)+1)

    I need to use Monte Carlo for the proof...

    thanks !
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by WeeG View Post
    Good evening,

    I need a wee help with this proof:

    E[e^-x^2] = 1/sqrt((2*sigma^2)+1)

    I need to use Monte Carlo for the proof...

    thanks !
    Your problem is incorectly stated, the expectation E(e^{-x^2}) is a pure number and does not depend on the parameter \sigma, but does depend on the distribution of x (not just its standard deviation).

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Mar 2006
    Posts
    125
    of course you are right, I forgot to write the first line of the question...

    X~N(0,sigma^2)

    sorry for that !!
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by WeeG View Post
    of course you are right, I forgot to write the first line of the question...

    X~N(0,sigma^2)

    sorry for that !!
    I'm not entirely clear what you mean by prove in this case. As most Monte-Carlo methods will give as estimate of the integral rather than its exact value (here I exclude tricks like Martin Baal's martingale based variance reduction technique which for his toy problem gave the exact value of the pertinent integral).

    What we can do is by a bit of manipulation show that:

    E(e^{-x^2})=\frac{k}{\sqrt{2\sigma^2+1}}

    when x \sim N(0,\sigma^2), for some k (a very specific k given by the integral remaining after the jiggery-pokerry required to get all the \sigma dependence outside the integral).

    Then show that k \approx 1 by Monte-Carlo methods.

    RonL
    Last edited by CaptainBlack; December 1st 2006 at 11:38 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by CaptainBlack View Post
    I'm not entirely clear what you mean by prove in this case. As most Monte-Carlo methods will give as estimate of the integral rather than its exact value (here I exclude tricks like Martin Baal's martingale based variance reduction technique which for his toy problem gave the exact value of the pertinent integral).

    What we can do is by a bit of manipulation show that:

    E(e^{-x^2})=\frac{k}{\sqrt{2\sigma^2+1}}

    when x \sim N(0,\sigma^2), for some k (a very specific k given by the integral remaining after the jiggery-pokerry required to get all the \sigma dependence outside the integral).

    Then show that k \approx 1 by Monte-Carlo methods.

    RonL

    To demonstrate:

    Code:
    This is EULER, Version 2.3 RL-06.
    Type help(Return) for help.
    Enter command: (20971520 Bytes free.)
    Processing configuration file.
    Done.
    >
    >sigma=2;  ..set a nominal sigma of 2
    >
    >x=normal(1,10000)*sigma;..genrt sample of X~N(0,sigma^2)
    >ii=exp(-x^2);  ..calculate exp(-x^2) for the sample of X 
    >
    >..now estimate the expectation as the average:
    >..============================================
    >
    >{expectation,sdexp}=mean(ii)
         0.335965 
    >
    >..estimate k as the expectation times sqrt(2*sigma^2+1)
    >..=====================================================
    >
    >kk=expectation*sqrt(2*sigma^2+1) 
           1.0079 
    >
    >..estimate the standard error of expectation:
    >..-------------------------------------------
    >
    >SEexp=sdexp/sqrt(length(ii))
       0.00335965 
    >
    >..estimate the se of the estimate of kk:
    >..--------------------------------------
    >
    >SEkk=SEexp*sqrt(2*sigma^2+1) 
         0.010079 
    >
    RonL
    Last edited by CaptainBlack; December 1st 2006 at 11:49 PM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Mar 2006
    Posts
    125
    thanks a million, I'll try to translate this code to R and see I can use it
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Mar 2006
    Posts
    125
    the code works, I tried it on R, it's superb !
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Simulation
    Posted in the Statistics Forum
    Replies: 1
    Last Post: March 6th 2010, 09:47 AM
  2. Simulation help
    Posted in the Math Software Forum
    Replies: 0
    Last Post: February 11th 2010, 07:16 PM
  3. Simulation
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: January 17th 2010, 07:47 PM
  4. Replies: 0
    Last Post: December 15th 2009, 01:24 AM
  5. SImulation Help!!!!!!!!!!!!!!!!!!!
    Posted in the Statistics Forum
    Replies: 1
    Last Post: August 31st 2008, 03:20 AM

Search Tags


/mathhelpforum @mathhelpforum