r****y 发帖数: 1437 | 1 e.g., given a covariance matrix
cov = [ 1 0.02
0.02 1]
how to generate two random number series that have such covariance?
let's make it more specific, two random numbers both follow normal
distribution.
I guess there must be an algorithm invented already by someone for
such thing.
| H****h 发帖数: 1037 | 2 If you have iid rv X_1,...,X_n ~N(0,1), and a matrix A.
Let Y=(Y_1,...,Y_n)^t=AX, where X=(X_1,...,X_n)^t.
Then the covariance matrix for Y is A^tA. | g******n 发帖数: 339 | 3 use chlosky decomposition s.t. cov=d’d, then generate two independent x1~N(
0,1), x2~N(0,1), y=d'(x1,x1)~BVN(0,cov).
【在 r****y 的大作中提到】 : e.g., given a covariance matrix : cov = [ 1 0.02 : 0.02 1] : how to generate two random number series that have such covariance? : let's make it more specific, two random numbers both follow normal : distribution. : I guess there must be an algorithm invented already by someone for : such thing. :
|
|