We can easily extend the idea of one-dimensional latin hypercube sampling into two dimensions as well.įor two variables, x and y, we can divide the sample space of each variable into n evenly spaced regions and pick a random sample from each sample space to obtain random values across two dimensions. The benefit of this approach is that it ensures that at least one value from each region is included in the sample. The idea behind one-dimensional latin hypercube sampling is simple: Divide a given CDF into n different regions and randomly choose one value from each region to obtain a sample of size n. However, if we used latin hypercube sampling to obtain this sample then it would be guaranteed that one value would be above 0 and one would be below 0 because we could specifically partition the sample space into one region with values above 0 and one region with values below 0, then select a random sample from each region.
Latin hypercube excel generator#
If we used a true random number generator to obtain this sample, it’s possible that both values could be greater than 0 or that both values could be less than 0. Suppose we’d like to obtain a sample of 2 values from a dataset that is normally distributed with a mean of 0 and a standard deviation of 1. To wrap your head around the idea of latin hypercube sampling, consider the following simple example: It is widely used to generate samples that are known as controlled random samples and is often applied in Monte Carlo analysis because it can dramatically reduce the number of simulations needed to achieve accurate results. Latin hypercube sampling is a method that can be used to sample random numbers in which samples are distributed evenly over a sample space.