From: Sheng-Yun on
Roger,
I want to generate 12 random data with known distribution, mean values and standard deviations. However, there are correlations between variable 1, 5 and 9 (that is, there are three correlations, P15, P19, and P59). The left variables are independent.
What should I do with three correlations? I do not have statistics toolbox.

Thank you very much.
Shengyun




"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <grodsg$pi3$1(a)fred.mathworks.com>...
> "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <gmlo2a$srg$1(a)fred.mathworks.com>...
> > Elena <elena.k29(a)hotmail.com> wrote in message <30956643.1233931196387.JavaMail.jakarta(a)nitrogen.mathforum.org>...
> > > I want to generate some values for 2 random variables (with known distribution, mean values and standard deviations) but the random variables are not independent. If for example the correlation of these variables is &#961;=0.7 , how can I define this correlation??
> > > ......
> >
> > If you have the Statistics Toolbox, use 'mvnrnd'. The needed covariance matrix would be
> >
> > SIGMA = [s1^2,p*s1*s2;p*s1*s2,s2^2]
> >
> > where s1 and s2 are the specified variances and p the correlation.
> > .......
> > Roger Stafford
>
> Elena, I have noticed an error in my earlier response Feb. 8 in this thread. Where I said, "where s1 and s2 are the specified variances", I should have said, "where s1 and s2 are the specified standard deviations". I hope you were able to make the necessary corrections. Please accept my apologies.
>
> Roger Stafford