# Correlation to Covariance Matrix

I am looking to use the CopulaDistribution fucntion, with a "MultiNormal" kernal. However, for the input, O require a covariance matrix. However, I only have a correlation matrix. Is there a way to convert one to the other?

You also need StandardDeviation to get the covariance matrix from the correlation matrix:

corToCov[mat_, sd_] := Transpose[sd Transpose[sd mat]]


Example:

data = RandomReal[5, {10, 5}];
cormat = Correlation[data];
covmat = Covariance[data];
sd = StandardDeviation[data];
covmat ==  corToCov[cormat, sd]
(* True *)


To get the correlation matrix from a covariance matrix (Correlation >> Properties and Relations):

covToCor[cov_, sd_] := Transpose[Transpose[cov/sd]/sd];
cormat == covToCor[covmat, sd]
(* True *)

• What if I do not have the data. All I have is correlation matrix.
– Jim
Dec 5, 2014 at 1:16
• @Jim, i don't know how one can recover the covariance matrix from a correlation matrix without knowing the standard deviation.
– kglr
Dec 5, 2014 at 1:26