Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'False covariance' topicStudent Support Forum > General > "False covariance"

Next Comment >Help | Reply To Topic
Author Comment/Response
J. Karrey
05/13/13 06:44am

Here I try to generate 10`000 pairs of correlated random numbers distributed according to multivariate LogNormal distribution. Note the correlation matrix input.

mu={4,5};
stdev={3,2};

correlationMatrix={{1,0.5},{0.5,1}};

covarianceMatrix=DiagonalMatrix[stdev].correlationMatrix.DiagonalMatrix[stdev];

dist=LogMultinormalDistribution[mu,covarianceMatrix];

rnd=RandomVariate[dist,10^4];

Correlation[rnd]

The correlation-to-covariance transformation seems to be perfectly correct.But the sample correlation is radically different from the input correlation matrix:

{{1., 0.0984389}, {0.0984389, 1.}}

Why? What am I doing wrong?

URL: ,

Subject (listing for 'False covariance')
Author Date Posted
False covariance J. Karrey 05/13/13 06:44am
Re: False covariance Peter Pein 05/21/13 2:21pm
Re: False covariance Peter Pein 05/21/13 4:12pm
Next Comment >Help | Reply To Topic