How can i do monte carlo analysis

I have two independent random variables. let's say X and Y. they a don't have any relation. now how can I do joint PDF, how can I take the limit state function and contour lines? please anyone can help me with this?

 Accepted Answer

Jeff Miller
Jeff Miller on 6 Jul 2018
If X & Y are independent, then pdf_joint(x,y) = pdf_x(x) * pdf_y(y). You should be able to get contour lines from that. I'm not sure about a limit state function, because I don't know what that is.

2 Comments

I mean limit state function(performance function) which is used to evaluate Z axis... can you share any matlab function for monte carlo analysis using two independent random variables
Sorry I do not really understand what you are trying to do, so I do not know if I have any function that would be useful to you.
To do a monte carlo analysis with two independent random variables, you can just generate random values for each variable separately, and then compute whatever function of those variables you would like to examine. Repeat this process many times and tabulate the different values that you get for your function. That is my understanding, at least, of monte carlo analysis.
MATLAB has many built-in functions for generating random values and many more functions that are helpful for analyzing each new random monte carlo data set. I cannot be more specific without knowing exactly what random variables you would like to generate and how you would like to analyze them.
To go back to your original question about the joint pdf, I would say you do not need to worry about this if the variables are independent. Just generate the variables separately. You only need to think about the joint pdf if you are simulating a situation where the variables are dependent rather than independent.
Hope that helps...

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!