How to find the correlation between two random numbers
이전 댓글 표시
Hi,
I want to give a specific correlation between two random numbers. I am using them to find the inverse lognormal distribution, so they have to remain between 0 and 1. How can I do this?
script:
N = 10;
ro = 0.75; %correlation between random numbers
f = rand(N,2);
mu7 = 0.84208;
su7 = 0.3852;
my7 = 0.688;
sy7 = 0.09975;
j = f(:,1);
g = f(:,2);
epy = logninv(j,my7,sy7);
epu_y = logninv(g,mu7,su7);
epu = epu_y + epy;
Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Multivariate Distributions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!