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

13 views (last 30 days)
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:
But above require functional form. Any suggestions/help how do I integrate the PDF using Montecarlo method to get corresponding CDF?

Sign in to comment.

Accepted Answer

Abhishek Kumar
Abhishek Kumar on 8 Dec 2020
Hi Poulomi, as I understand you have PDF of your desired function as convolution of two random functions(assuming f1,f2), you also have the file exchange script as you have mentioned hence you can use the following strategy.
(desired PDF as pdf)
pdf = conv(f1,f2);
"integralN_mc" being the function created under the script, you can use other variations of the functions as described in the script as well.
Please do share what input random functions you are using for further help if your query is not resolved.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by