Latin Hypercube Sampling

How Latin Hypercube compares to standard random sampling


Latin Hypercube Sampling (LHS) is a method of sampling random numbers that attempts to distribute samples evenly over the sample space.

A simple example: imagine you are generating exactly two samples from a normal distribution, with a mean of 0. Although the probability of being positive or negative is equal, a true random number generator might return two samples less than 0, or two samples greater than 0. LHS will always return one sample less than 0 and one sample greater than 0. For two samples, it will divide the sample space in two, and generate one sample from each side.

In practice, this can be used to generate "better" simulation results, with lower standard error levels, with fewer trials. For complex models with many random variables, this means you can generate results in less time.

Visual Example


The charts below are sampling from a normal distribution. Both include 100 samples (to start with). The chart on the left uses standard random number generation. The chart on the right uses Latin Hypercube Sampling.

You can see that the LHS chart is a much smoother curve (and better represents the classic S-curve of the normal distribution).



    

You can change the number of samples and then click Redraw. You'll see that as the number of samples gets higher, the random chart gets closer to a smooth line. But at any number of samples, the LHS chart is always smoother. Click Histogram to see the same charts as histograms and you'll see the same effect — the LHS chart is closer to the classic bell-shape.

What that means is that for a smaller number of samples, Latin Hypercube Sampling will better reflect the underlying distribution. You can get similar results using standard random sampling, but you need to use a higher — sometimes much higher — number of samples.

For more, see wikipedia:

http://en.wikipedia.org/wiki/Latin_hypercube_sampling

LHS is available in the Professional edition of the RiskAMP Add-in. It is enabled by default. To control this setting, click the Advanced Properties button in the Monte Carlo tab.