1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Monte Carlo Integration-reliability of the error estimate for funcs not square integr

  1. Dec 5, 2009 #1
    Hi!

    I need help with the monte carlo integration: reliability of the error estimate for functions that are not square integrable.

    I'm supposed to investigate this topic.*Hence my first question is what is a function that is not square integrable? I found that such a function is 1/sqrt(x) on the interval 0 to 1. Apparently a function is not square integrable if the integral of its absolute value squared is not finite on that integral... I thought the for f(x)= 1/sqrt(x) that will be -1?
    Anyway I evaluated the integrals for 1/sqrt(x) from 0 to 1 (which is 2 analytically) for dofferent number of sample points. Indeed the estimated errors are nowhere close the actual errors...

    Can anyone explain why does this happen? And why is 1/sqrt(x) not square integrable?
     
  2. jcsd
  3. Dec 5, 2009 #2

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Re: Monte Carlo Integration-reliability of the error estimate for funcs not square in

    The integral of 1/x is infinite. Therefore the variance of your estimator is infinite. That is why Monte Carlo doesn't work.
     
  4. Dec 5, 2009 #3
    Re: Monte Carlo Integration-reliability of the error estimate for funcs not square in

    Will that be also true for exp(-x^2)? I get a NaN as the error estimate oddly only in this case.
     
  5. Dec 6, 2009 #4

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Re: Monte Carlo Integration-reliability of the error estimate for funcs not square in

    Several questions:

    1. What is the domain of x?
    2. Exactly what is the prob. distribution function (or prob. density function)?
    3. What is NaN (Sodium Nitride???)?
     
  6. Dec 6, 2009 #5

    ideasrule

    User Avatar
    Homework Helper

    Re: Monte Carlo Integration-reliability of the error estimate for funcs not square in

    In computing, NaN stands for "not a number", which usually means an infinity or undefined value has popped up.
     
  7. Dec 7, 2009 #6

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Re: Monte Carlo Integration-reliability of the error estimate for funcs not square in

    If exp(-x^2) is supposed to be your density function (although there will be a constant attached to it to make it integrate to 1), then the variance is known.
    exp(-.5x^2)/ √(2π) is the density for the standard normal with mean 0 and variance 1.
     
    Last edited: Dec 7, 2009
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Monte Carlo Integration-reliability of the error estimate for funcs not square integr
Loading...