# Conserve correlation with simulate data

let me explain you the process, I have random variables in a matrix $$X_1$$: $$260\times3$$.

I have my correlation matrix $$\rho_1$$: $$3\times3$$ from my matrix $$X_1$$.

Now I use a Cholesky decomposition and I create $$X_2$$ from the covariance in $$X_1$$.

As expected correlation $$\rho_2$$ of $$X_2$$ and $$\rho_1$$ of $$X_1$$ are very close.

When I create $$X_3$$ as the $$X_1$$ in which the first column has been replaced by the first one in $$X_2$$, the correlation matrix is very far from $$\rho_1$$ and $$\rho_2$$.

1) I don’t really get why as my correlation matrix are very close between $$X_1$$ and $$X_2$$ so I was expected $$X_3$$ to have a correlation close to the two other ?

2) Is there a way to perform this simulation / using Cholesky to in the end keep the two last column of $$X_1$$ and recreate the first one while keeping the correlation (or very close) of $$X_1$$ ?

• If your sample is rank dependent, (you said you set X3=X1), then there's no way to estimate the covariance matrix without having some form of quasi-inverse of the precision matrix. Depending on what linear algebra package you use, setting the correlation of two identical columns to 0 can be one valid form of a quasi inverse matrix. – AdamO Apr 8 '19 at 19:29