Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: MONTE CARLO
Posted:
Jul 31, 2013 3:56 PM


?? im trying a classical method and i will see...
thank you again for your reply
george bartekltg <bartekltg@gmail.com> wrote in message <ktbbgp$1rv$1@node1.news.atman.pl>... > W dniu 20130731 16:23, george veropoulos pisze: > > > bartekltg <bartekltg@gmail.com> wrote in message > > <ktarnp$144$1@node2.news.atman.pl>... > >> W dniu 20130731 10:59, george veropoulos pisze: > >> > Dear friend > >> > > >> > I would like find the integral > >> > > >> > fxi(x)=integral{a(x)}{b(x)} {1/w *fE0(w)*fz(x/w)}dw > >> > > >> > a(x) , b(x) is the limits of integration > >> > fE0(w) is distribution of random variable E0 > >> > fz(x/w) is distribution of random variable z > >> > >> so fE0(w) fz(x/w) are just functions of w. > >> > >> > there a methods like monte carlo to find this integral > >> > because is veru difficult to applied a classical methids > >> like quadl > >> > >> Why it is difficult? How you function look like? > >> > >> Classical method is way better than MC in one dimension! > >> > >> When function is smooth, use quadgk. This is very powerful > >> 15th order GaussKronrod formula. > >> > >> If there is 'problem' for some "w"s, like uncontinuous nth > >> derivatives (n<15 :), use waypoints. > >> > >> bartekltg > >> > > > > a problem is the limits of intregration are not clear... > > I see limits are a(x) b(x). For every x we have clear limits. > > You also need clear limits for MC integration! > The simplest (not the best:) way to do MC is: > > probes = a + rand(1000,1)*(ba); > mc_quadrature = sum(function ( probes)) > or, if your function can't handle vector input, using arrayfun > > As you see, wee neet to know limits. > > bartekltg > >



