lhsnorm
Latin hypercube sample from normal distribution
Syntax
X = lhsnorm(mu,sigma,n)
X = lhsnorm(mu,sigma,n,flag
)
[X,Z] = lhsnorm(...)
Description
X = lhsnorm(mu,sigma,n)
returns ann-by-pmatrix,X
, containing a latin hypercube sample of sizen
from ap-dimensional multivariate normal distribution with mean vector,mu
, and covariance matrix,sigma
.
X
is similar to a random sample from the multivariate normal distribution, but the marginal distribution of each column is adjusted so that its sample marginal distribution is close to its theoretical normal distribution.
X = lhsnorm(mu,sigma,n,
controls the amount of smoothing in the sample. Ifflag
)flag
is'off'
, each column has points equally spaced on the probability scale. In other words, each column is a permutation of the valuesG(0.5/n), G(1.5/n), ..., G(1-0.5/n)
, whereG
is the inverse normal cumulative distribution for that column's marginal distribution. Ifflag
is'on'
(the default), each column has points uniformly distributed on the probability scale. For example, in place of0.5/n
you use a value having a uniform distribution on the interval(0/n,1/n)
.
[X,Z] = lhsnorm(...)
also returnsZ
, the original multivariate normal sample before the marginals are adjusted to obtainX
.
References
[1] Stein, M. "Large sample properties of simulations using latin hypercube sampling."Technometrics. Vol. 29, No. 2, 1987, pp. 143–151. Correction, Vol. 32, p. 367.