A question about an expression definition in Monte Carlo

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
UFSJ
Messages
13
Reaction score
2
Hi,
my question is about the correct means of the expression "computer experiment" in a Monte Carlo simulation. What specifically is an "experiment" in a Monte Carlo simulation? Is the same of "Monte Carlo path" or is the whole process adopted to found a magnetization curve, for example?

If the second answer is the correct, how to know how many Monte Carlo experiments I have to do to obtain a trustworthy result??

Thanks a lot!
 
Physics news on Phys.org
UFSJ said:
Hi,
my question is about the correct means of the expression "computer experiment" in a Monte Carlo simulation. What specifically is an "experiment" in a Monte Carlo simulation? Is the same of "Monte Carlo path" or is the whole process adopted to found a magnetization curve, for example?
In the context of a Monte Carlo simulation, the word "experiment" usually refers to the whole process of estimating one or more parameters. It is analogous to an experiment you might do in a physics lab. To conduct your experiment you set up your equipment and conduct multiple trials, measuring the results at each trial. You may vary the inputs to see how the outputs vary. Then you apply statistical methods to estimate the uncertainty of your results.

A Monte Carlo experiment follows a similar process. You code a computer model and run multiple trials, measuring the results at each trial. You may vary the inputs of the model to see how the outputs vary. Then you use the same statistical methods as you would in a physical experiment to determine uncertainty.

UFSJ said:
If the second answer is the correct, how to know how many Monte Carlo experiments I have to do to obtain a trustworthy result??

For this you need to use statistics. This is going to depend on what form your data takes. If you are estimating a single parameter for example, you can calculate a 95% confidence interval based on the number of trials. For an output curve, you could calculate a 95% confidence interval for each data point and plot error bars.

Here is a tutorial on Monte Carlo methods that gives a quick summary of most of the important aspects. http://statweb.stanford.edu/~owen/pubtalks/MCQMC2012-Owen-Tutorial.pdf
 
As I understand a Monte Carlo Method, you set up a random experiment so that the probability of a given event is proportional to the quantity you wish to calculate.

For example, to determine the area of a triangle, I would place the triangle in a larger rectangle and my random experiment would be to select a point with uniform random distribution in the rectangle. I would then carry out the experiment a number of times and determine the proportion within the triangle. That number [itex]\hat{p}[/itex] would be approximately the ratio of their areas and so the triangle area would be estimated as the product of the proportion times the rectangular area.

The question of how any you need to obtain a "trustworthy result" is relative to how precise you need to be and how trustworthy you mean. You need to set up a confidence interval for the proportion and map that interval to a confidence interval for the quantity you're seeking to estimate. You can select an a priori degree of confidence (say 95% or 99%) and then decide on the precision you want (width of the confidence interval) and solve for the sample size.

The relation is:
[tex]p = \hat{p} \pm \varepsilon,\quad \varepsilon = z_{\alpha/2} \cdot \sqrt{ \frac{\hat{p}(1-\hat{p})}{n}}[/tex]
where [itex]\varepsilon[/itex] is your margin of error with [itex]\alpha[/itex] being the degree of uncertainty, one minus the confidence. Thus for 95% confidence [itex]\alpha = 0.05[/itex]. The [itex]z_{\alpha/2}[/itex] is a critical z-score, tables of which you can find on the internet.

You can, for purposes of solving for n, work with the "worst case scenario" where the proportion is about 1/2.
[tex]\varepsilon = z_{\alpha/2}\sqrt{\frac{1}{4n}}[/tex]
so
[tex]n \approx \left(\frac{\varepsilon}{4z_{\alpha/2}}\right)^2[/tex]
Note that this [itex]\varepsilon[/itex], margin of error is for the proportion and you must scale it for/from the actual quantity you seek to determine.
 
I understood!

Thanks guys!