Generating a string of random standard normal variables that are correlated
Mostra commenti meno recenti
Hi Everyone,
I'm a sort of newbie, I would like to know how and what the implications are of 'Generating a string of random standard normal variables that are correlated with each other'.
To get by this problem, I have been generating and correlating my desired sequence to a different random variable and then calculating the correlation between my sequence.
Thanks for the anticipated answer.
ps: Generate random standard normal's A, B, C, D so that have a correlation and standard deviation of corr and std.
Thanks again
Risposta accettata
Più risposte (2)
Oleg Komarov
il 6 Dic 2011
Given a correlation matrix C = A*A', then A = P*sqrt(D), where:
[P,D] = eig(C); % spectral decomposition
To get the correlated normal random series Z, use W = (W1, ...,W2)' (the normal random series):
Z = A*W;
Note that if you have 4 variables, then C is 4 by 4, and W should be 4 by nobs.
1 Commento
Natialol
il 6 Dic 2011
Chet Sharma
il 30 Gen 2018
0 voti
I think you should refer Hull's option book. In the 8th edition, chapter 20, page 450, I believe you will find out answer. He describes something called a "Cholesky decomposition" that is needed to generate the "correct" correlation matrix......
1 Commento
Garrison Greenwood
il 24 Feb 2021
Cholesky won't work if the C matrix is positive semi-definite.
Categorie
Scopri di più su Random Number Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!