MATLAB Answers

How to implement MonteCarlo integration of probability density function to obtain CDF

12 views (last 30 days)
Poulomi Ganguli
Poulomi Ganguli on 11 Oct 2019
Commented: Poulomi Ganguli on 11 Oct 2019
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

Show 1 older comment
Poulomi Ganguli
Poulomi Ganguli on 11 Oct 2019
I have tried with trapz method but I want to check the result using Monte Carlo method since using trapz the obtained CDF series sometimes less than 1.
John D'Errico
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?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!