[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Monte-Carlo integration for computing mean of multidimensiona
[Help-gsl] Monte-Carlo integration for computing mean of multidimensional random variate functions
Sat, 5 Dec 2009 18:06:14 +0100
I'd like to compute the following integral:
I = \int_xl^xu dx \int_yl^yu dy ... f(x, y, ...) g(x,y, ...)
where f(x,y, ...) is any of the GSL probability density function and
g(x,y, ...) is a function depending on random variates (x,y, ...).
As the GSL probability density functions allow us to either draw
random variates according to the probability distribution of the
density functions, or to get the value of the probability density
functions at some points (x,y,...), I am wondering how to compute an
approximation of the mean of g(x,y,...) according to the probability
density function f(x,y,...).
I am thinking about two ways of computing this integral:
1. Use the GSL Monte-Carlo integration methods to compute an
approximation of the integral of the function h(x,y,...) = f(x,y,...)
g(x,y,...), without using the fact that f(x,y,...) is a probability
density function ;
2. Program my own Monte-Carlo integration algorithm (without the GSL
Monte-Carlo methods) using f(x,y,...) as the Monte-Carlo integration's
probability density function.
The second way seems to me better than the first one, since the first
way would compute an approximation of the mean of a random function
using the Monte-Carlo method's probability density function, that has
nothing to do with the random function's probability density
function... On other hand, the second method requires to recode many
things that are already provided by the GSL's Monte-Carlo integration
Am I right? What would you advise me?
Thank you very much in advance for your help,
- [Help-gsl] Monte-Carlo integration for computing mean of multidimensional random variate functions,
Florent Teichteil <=