'Generate two random arrays according to correlation coefficient
For example, I know the correlation coefficient between Array1 and Array2 is 0.68, and the length of Array1 and Array2 are 100. How to generate the random value for Array1 and Array2? Thanks in advance.
Update
One method provided by Michael Szczesny is using the multivariate_normal, but if I give the r = [ [1,0],[0,4] ] and I will get two arrays. Using the two arrays to calculate the r is not 0, but 0.05 (for example). how to explain this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
