NORMAL_DATASET
Generate Multivariate Normal Random Datasets


NORMAL_DATASET is a MATLAB program which creates a multivariate normal random dataset and writes it to a file.

The multivariate normal distribution for the M dimensional vector X has the form:

        pdf(X) = (2*pi*det(A))**(-M/2) * exp(-0.5*(X-MU)'*inverse(A)*(X-MU))
      
where MU is the mean vector, and A is a positive definite symmetric matrix called the variance-covariance matrix.

To create X, an MxN matrix containing N samples from this distribution, it is only necessary to

  1. create an MxN vector Y, each of whose elements is a sample of the 1-dimensional normal distribution with mean 0 and variance 1;
  2. determine the upper triangular Cholesky factor R of the matrix A, so that A = R' * R;
  3. compute X = MU + R' * Y.

Usage:

r = normal_dataset m n seed mu a
where The data is written to the file normal_m_n.txt.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

NORMAL_DATASET is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

CVT_DATASET, a MATLAB program which computes a Centroidal Voronoi Tessellation and writes it to a file.

FAURE_DATASET, a MATLAB program which creates a Faure quasirandom dataset;

GRID_DATASET, a MATLAB program which creates a grid sequence and writes it to a file.

HALTON_DATASET, a MATLAB program which creates a Halton sequence and writes it to a file.

HAMMERSLEY_DATASET, a MATLAB program which creates a Hammersley sequence and writes it to a file.

HEX_GRID_DATASET, a MATLAB program which creates a hexagonal grid dataset and writes it to a file.

IHS_DATASET, a MATLAB program which creates an improved distributed Latin hypercube dataset and writes it to a file.

LATIN_CENTER_DATASET, a MATLAB program which creates a Latin Center Hypercube dataset;

LATIN_EDGE_DATASET, a MATLAB program which creates a Latin Edge Hypercube dataset;

LATIN_RANDOM_DATASET, a MATLAB program which creates a Latin Random Hypercube dataset;

LCVT_DATASET, a MATLAB program which computes a latinized Centroidal Voronoi Tessellation and writes it to a file.

NIEDERREITER2_DATASET, a MATLAB program which creates a Niederreiter quasirandom dataset with base 2;

NORMAL, a MATLAB library which computes normally distributed pseudorandom values.

SOBOL_DATASET, a MATLAB program which computes a Sobol quasirandom sequence and writes it to a file.

UNIFORM_DATASET, a MATLAB program which generates a dataset of uniform pseudorandom values and write them to a file.

VAN_DER_CORPUT_DATASET, a MATLAB program which creates a van der Corput quasirandom sequence and writes it to a file.

Reference:

  1. Paul Bratley, Bennett Fox, Linus Schrage,
    A Guide to Simulation,
    Springer Verlag, pages 201-202, 1983.
  2. Donald Knuth,
    The Art of Computer Programming,
    Volume 2: Seminumerical Algorithms,
    Addison Wesley, 1969.

Source Code:

Examples:

You can go up one level to the MATLAB source codes.


Last revised on 08 December 2009.