Generating a string of random standard normal variables that are correlated
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (2)
Oleg Komarov
el 6 de Dic. de 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 comentario
Natialol
el 6 de Dic. de 2011
Chet Sharma
el 30 de En. de 2018
0 votos
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 comentario
Garrison Greenwood
el 24 de Feb. de 2021
Cholesky won't work if the C matrix is positive semi-definite.
Categorías
Más información sobre Descriptive Statistics and Insights en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!