How to implement MonteCarlo integration of probability density function to obtain CDF
Show older comments
Hello:
I have a probability density function obtained from convolution process of two random variables. Hence, I don't have the functional form of the PDF. Now, I am interested to integrate the PDF numerically using Montecarlo method. I came across a few file exchage page, for example: https://de.mathworks.com/matlabcentral/fileexchange/53477-monte-carlo-integration
But above require functional form. Any suggestions/help how do I integrate the PDF using Montecarlo method to get corresponding CDF?
4 Comments
Jeff Miller
on 11 Oct 2019
By convolution, you mean the sum of the two random variables, right?
Do you have the functional forms of the PDFs or CDFs for each of the two separate random variables?
Would you be happy with the convolution PDF/CDF obtained by some other numerical means, or does it have to be specifically with the Monte Carlo method?
Poulomi Ganguli
on 11 Oct 2019
John D'Errico
on 11 Oct 2019
Edited: John D'Errico
on 11 Oct 2019
Note that trapezoidal rule integration is not an EXACT integral. It is an approximation. The magnitude of the error will be impacted by the increment, generally larger for larger increments. So why are you surprised at the result?
Poulomi Ganguli
on 11 Oct 2019
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!