
Multiply this matrix with the Cholesky decomposed upper triangular version of the correlation matrix. For this case, the R matrix will be of size where k is the number of samples we wish to generate and we allocate the k samples in three columns, where the columns indicate the place holder for each variable X, Y and Z. Generate three sequences of uncorrelated random numbers R – each drawn from a normal distribution. The correlated random sequences (where X, Y, Z are column vectors) that follow the above relationship can be generated by multiplying the uncorrelated random numbers R with U. Equivalently, lower triangular matrix can also be used, in which case the order of output needs to be reversed.įor this decomposition to work, the correlation matrix should be positive definite. We will consider Upper triangular matrix here. Where U and L are upper and lower triangular matrices. The method discussed here, seeks to decompose the given correlation matrix using Cholesky decomposition.

Similarly, if a matrix need to be decomposed into square-root equivalent, the matrix need to be positive definite. As with any scalar values, positive square root is only possible if the given number is a positive (Imaginary roots do exist otherwise). Generating Correlated random number using Cholesky Decomposition:Ĭholesky decomposition is the matrix equivalent of taking square root operation on a given matrix. Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.The Cholesky Decomposition method is discussed here. Spectral Decomposition ( also called Eigen Vector Decomposition) method.Two most common methods finding the solution are The problem can be addressed in many ways. Now, the task is to generate three sets of random numbers X, Y and Z that follows the relationship above. We take arbitrary correlation value ( 0.3) for the relationship between Y and Z. Putting all these relationships in a compact matrix form, gives the correlation matrix. Obviously the variable X correlates with itself 100% – i.e, correlation-coefficient is 1.Correlation co-efficient between X and Z is 0.3.Correlation co-efficient between X and Y is 0.5.Let’s say we would like to generate three sets of random sequences X, Y, Z with the following correlation relationships. The diagonal elements (correlations of variables with themselves) are always equal to 1.

It is a symmetric matrix with the element equal to the correlation coefficient between the and the variable. Correlation MatrixĬorrelation matrix defines correlation among N variables. Generation of multiple sequences of correlated random variables, given a correlation matrix is discussed here. In the previous post, a method for generating two sequences of correlated random variables was discussed.
