MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi everyone,

I am looking for a way of simulating correlation matrices of fixed dimension in (at least) two ways.

First, I would like to determine the "uniform" distribution over the "correlation matrices space" and being able to sample from it (even defining what "uniform" means is not such an easy task !!!).

Second, I would like to get some parametric law for which sampled correlation matrices would be such that :

-the expectations of the eigenvalues are equal to some fixed set of values.

-we have a certain amount of "control" over the second moments of those eigenvalues through the parameters set.

I hope I made myself clear enough, and thank's for any leads or references to acheive such a thing. From my point of view this is a surprisingly complex problem and I thought it might raise some interest among you.

So far I tried an approach using diagonalization through orthogonal matrices and eigenvalues which was not really a success...

Edit :

Here are a few facts (sometimes empirical) that have come up when trying a diagonalization approach by an orthogonal matrix and a set of eigenvalues.(i.e. $C=\Omega Diag(\lambda_1,...,\lambda_n)\Omega^T$ with (I hope) obvious notations).

Naively, you can think that it would suffice to sample uniformly and independently a set of eigenvalue in the n-simplex and uniformly sample from orthogonal matrices space, after what you "do" the mutliplication to get a correlation matrix that is uniformly sampled in the correlation matrices sapce. But...

If your are given a set of eigenvalues (for your correlation matrix), then you can't sample (uniformly) an orthogonal matrix and get a correlation matrix after multiplication.

There are $n(n-3)/2$ degrees of freedom among the parameters of the orthogonal matrix to get a correlation matrix, when the space O(n) is a $n(n-1)/2$ dimensional space (the diagonal of the correlation matrix are constrained to be equal to 1 and that makes n equations). The "submanifolds" of O(n) that is so defined (to be compatible orthogonal matrices with respect to a set of eigenvalues) is really hard to express in a way that could be usefull.

Also, a fact that has (empirically) appeared is that sampling uniformly from orthognonal matrix space, then I thnik taht almost surely the eigenvalues that are compatible to get a correlation matrix are simply (1,...,1). So the correlation matrix is simply the identity matrix $I_n$ and this is I think the real surpising fact to me (not too surprisng though if you consider the degrees of freedom in the problem)


share|cite|improve this question
Perhaps the inverse-wishart distribution may help – Or Zuk May 19 '11 at 16:34

This article [Harry Joe, Generating random correlation matrices based on partial correlations, Journal of Multivariate Analysis, 97 (10), pp. 2177-2189 (2006)] addresses the question. The author gives a simple construction for generating a correlation matrix that is uniform over the space of positive definite correlation matrices. And there is an associated R command.

share|cite|improve this answer
@Didier Piau : Thank you very much for the reference unfortunately I could'nt access the pdf, anyway I'll try to get it. I'm quite sure the article should answers fully the first part of my question. But I'm not sure it can address the second part, so I let the question open if you don't mind. Regards – The Bridge May 19 '11 at 18:35
You are absolutely right and I should have mentioned myself that HJ's paper deals (presumably) with only the first part of your question. – Did May 20 '11 at 6:06
Hi, a paper by Higham and Davies 'numerically stable generation of correlation matrices and their factors' (google ives it right away), gives a way to sample a correl matrix given its spectrum. Coupling this with a Dirichlet law over a n-scaled Simplex of dimension n (with proper weights) sounds pretty close to what I want to achieve, but this methods doesn't give a lot of information about the resulting law over correl matrix space. ahhh almost done... – The Bridge May 23 '11 at 20:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.