How to generate covariance matrix (SIGMA) for mvnrnd function, given the marginal normal probability density functions of two random variables X and Y.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I want to generate random samples of two correlated random variables with normal probability distribution functions (PDFs). I am using "mvnrnd" function for this purpose i.e. mvnrnd(MU,SIGMA,n). I know that MU is the 2x1 matrix of mean values of distribution of X and Y. n is the number of samples required. But I could not find a method to generate the SIGMA matrix. I checked examples of mvnrnd, but they all assume a SIGMA without any explanation. Any help will be much appreciated.
Thanks
0 comentarios
Respuestas (1)
Jeff Miller
el 31 de En. de 2019
Since you have two mu's, sigma will be a 2x2 covariance matrix. Then numbers on the diagonal are the variances of the two RVs. The other two numbers are the product of (the correlation)*(std deviation of RV_1)*(std deviation of RV_2).
HTH,
0 comentarios
Ver también
Categorías
Más información sobre Descriptive Statistics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!