- All Implemented Interfaces:
public class CorrelatedRandomVectorGeneratorextends Objectimplements RandomVectorGeneratorA
RandomVectorGeneratorthat generates vectors with with correlated components.
Random vectors with correlated components are built by combining the uncorrelated components of another random vector in such a way that the resulting correlations are the ones specified by a positive definite covariance matrix.
The main use for correlated random vector generation is for Monte-Carlo simulation of physical problems with several variables, for example to generate error vectors to be added to a nominal vector. A particularly interesting case is when the generated vector should be drawn from a Multivariate Normal Distribution. The approach using a Cholesky decomposition is quite usual in this case. However, it can be extended to other cases as long as the underlying random generator provides
Sometimes, the covariance matrix for a given simulation is not strictly positive definite. This means that the correlations are not all independent from each other. In this case, however, the non strictly positive elements found during the Cholesky decomposition of the covariance matrix should not be negative either, they should be null. Another non-conventional extension handling this case is used here. Rather than computing
C = UT.Uwhere
Cis the covariance matrix and
Uis an upper-triangular matrix, we compute
C = B.BTwhere
Bis a rectangular matrix having more rows than columns. The number of columns of
Bis the rank of the covariance matrix, and it is the dimension of the uncorrelated random vector that is needed to compute the component of the correlated vector. This class handles this situation automatically.