# A question about an expression definition in Monte Carlo

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!

tnich
Homework Helper
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.

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

jambaugh
Gold Member
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 $\hat{p}$ 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:
$$p = \hat{p} \pm \varepsilon,\quad \varepsilon = z_{\alpha/2} \cdot \sqrt{ \frac{\hat{p}(1-\hat{p})}{n}}$$
where $\varepsilon$ is your margin of error with $\alpha$ being the degree of uncertainty, one minus the confidence. Thus for 95% confidence $\alpha = 0.05$. The $z_{\alpha/2}$ 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.
$$\varepsilon = z_{\alpha/2}\sqrt{\frac{1}{4n}}$$
so
$$n \approx \left(\frac{\varepsilon}{4z_{\alpha/2}}\right)^2$$
Note that this $\varepsilon$, 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!!