Hello, Im currently trying to learn about the metropolis algorithm and it's use in integration.
I read about montecarlo integration and read about metropolis as a pathway to do montecarlointegration in a more efficient way.
Im trying to integrate some given function numerically since it is in general not possible to integrate it arithmetically. This function is a black box, meaning I can only draw samples from it (evaluate it for a given x). In addition this function might have n dimensions.
I searched online for examples of how to use samples generated by the metropolis algorithm to approximate the integral of a simple 1d function.
I found some but they take the mean of the samples and the scale it using the integral value over the whole domain ( for example ]-inf; +inf[ ), since this integral is what I wanted to calculate in the first place this doesn't solve my problem.
I was wondering if someone in this forum could explain to me step by step how to integrate some simple 1d funciton using samples generated by metropolis.
( for example f(x)=e^-(x^2) )
Thanks for your help in advance.
I read about montecarlo integration and read about metropolis as a pathway to do montecarlointegration in a more efficient way.
Im trying to integrate some given function numerically since it is in general not possible to integrate it arithmetically. This function is a black box, meaning I can only draw samples from it (evaluate it for a given x). In addition this function might have n dimensions.
I searched online for examples of how to use samples generated by the metropolis algorithm to approximate the integral of a simple 1d function.
I found some but they take the mean of the samples and the scale it using the integral value over the whole domain ( for example ]-inf; +inf[ ), since this integral is what I wanted to calculate in the first place this doesn't solve my problem.
I was wondering if someone in this forum could explain to me step by step how to integrate some simple 1d funciton using samples generated by metropolis.
( for example f(x)=e^-(x^2) )
Thanks for your help in advance.