Difference between revisions of "Monte Carlo and probabilistic simulation"

Line 15: Line 15:
 
Median Latin hypercube sampling is the default method: It divides each uncertain quantity '''X''' into m equiprobable intervals, where m is the sample size. The sample points are the medians of the m intervals, that is, the fractiles
 
Median Latin hypercube sampling is the default method: It divides each uncertain quantity '''X''' into m equiprobable intervals, where m is the sample size. The sample points are the medians of the m intervals, that is, the fractiles
  
:<code>X<sub>i</sub> where P( ) = (i - 0.5)/m, for i = 1, 2,...m.</code>
+
:<code>X<sub>i</sub> where P() = (i - 0.5)/m, for i = 1, 2,...m.</code>
 
 
 
These points are then randomly shuffled so that they are no longer in ascending order, to avoid nonrandom correlations among different quantities.
 
These points are then randomly shuffled so that they are no longer in ascending order, to avoid nonrandom correlations among different quantities.
+
 
 
=== Random Latin hypercube ===
 
=== Random Latin hypercube ===
 
The random Latin hypercube method is similar to the median Latin hypercube method except that, instead of using the median of each of the m equiprobable intervals, it samples at random from each interval. With random Latin hypercube sampling, each sample is a true random sample from the distribution, as in simple Monte Carlo. However, the samples are not totally independent because they are constrained to have one sample from each of the n intervals.
 
The random Latin hypercube method is similar to the median Latin hypercube method except that, instead of using the median of each of the m equiprobable intervals, it samples at random from each interval. With random Latin hypercube sampling, each sample is a true random sample from the distribution, as in simple Monte Carlo. However, the samples are not totally independent because they are constrained to have one sample from each of the n intervals.

Revision as of 17:15, 2 June 2016


Probabilistic simulation means simulating probabilistic variables by selecting a random sample from each distribution. Analytica offers three sampling methods, Monte Carlo simulation, Median Latin hypercube (the default), and Random Latin hypercube. We describe each of them, and then explain how to select among them.

Monte Carlo sampling

The most widely used sampling method is known as Monte Carlo, named after the randomness prevalent in games of chance, such as at the famous casino in Monte Carlo. In this method, each of the m sample points for each uncertainty quantity, X, is generated at random from X with probability proportional to the probability density (or probability mass for discrete quantities) for X. Analytica uses the inverse cumulative method; it generates m uniform random values, ui, for i = 1, 2,...m, between 0 and 1, using the specified random number method (see below). It then uses the inverse of the cumulative probability distribution to generate the corresponding values of X,

Xi where P() = ui for i = 1, 2,...m

With the simple Monte Carlo method, each value of every random variable X in the model, including those computed from other random quantities, is a sample of m independent random values from the true probability distribution for X. You can therefore use standard statistical methods to estimate the accuracy of statistics, such as the estimated mean or fractiles of the distribution, as for example described in Selecting the Sample Size.

Median Latin hypercube

Median Latin hypercube sampling is the default method: It divides each uncertain quantity X into m equiprobable intervals, where m is the sample size. The sample points are the medians of the m intervals, that is, the fractiles

Xi where P() = (i - 0.5)/m, for i = 1, 2,...m.

These points are then randomly shuffled so that they are no longer in ascending order, to avoid nonrandom correlations among different quantities.

Random Latin hypercube

The random Latin hypercube method is similar to the median Latin hypercube method except that, instead of using the median of each of the m equiprobable intervals, it samples at random from each interval. With random Latin hypercube sampling, each sample is a true random sample from the distribution, as in simple Monte Carlo. However, the samples are not totally independent because they are constrained to have one sample from each of the n intervals.

Choosing a sampling method

The advantage of Latin hypercube methods is that they provide more even distributions of samples for each distribution than simple Monte Carlo sampling. Median Latin hypercube is still more evenly distributed than random Latin hypercube. If you display the PDF of a variable that is defined as a single continuous distribution, or is dependent on a single continuous uncertain variable, using median Latin hypercube sampling, the distribution usually looks fairly smooth even with a small sample size (such as 20), whereas the result using simple Monte Carlo looks quite noisy.

If the variable depends on two or more uncertain quantities, the relative noise-reduction of Latin hypercube methods is reduced. If the result depends on many uncertain quantities, the performance of the Latin hypercube methods might not be discernibly better than simple Monte Carlo. Since the median Latin hypercube method is sometimes much better, and almost never worse than the others, Analytica uses it as the default method. Very rarely, median Latin hypercube can produce incorrect results, specifically when the model has a periodic function with a period similar to the size of the equiprobable intervals. For example:

X := Uniform(1, Samplesize)
Y := Sin(2*Pi*X)

This median Latin hypercube method gives very poor results. In such cases, you should use random Latin hypercube or simple Monte Carlo. If your model has no periodic function of this kind, you do not need to worry about the reliability of median Latin hypercube sampling.

See Also

Comments


You are not allowed to post comments.