Generating correlated QUASI random numbers
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random variables (NumberOfSteps X NumberOfSimulations) I need, using a cholesky decomposition:
L = chol(CorrelationMatrix,"lower");
for i=1:NumberOfSimulations
Z = L*randn(4,NumberOfSteps);
for t=2:NumberOfSteps
.....Z1(i,t);
.....Z2(i,t);
Since i only want to generate the sequence once (very time consuming) the only way i found to generate two correlated r.v. is the following:
Ps = sobolset(NumberOfSteps);
Ps = scramble(Ps,'MatousekAffineOwen');
U = net(Ps,NumberOfSimulations);
Z1 = norminv(U);
Z2 = Rho.*Z1 + sqrt(1-Rho^2).*randn(NumberOfSimulations,NumberOfSteps);
Unfortunately I have No idea how I can extend this to 6 correlated random varibles. Can anyone help me?
Best regards,
Alex
matlab simulation
add a comment |Â
up vote
0
down vote
favorite
Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random variables (NumberOfSteps X NumberOfSimulations) I need, using a cholesky decomposition:
L = chol(CorrelationMatrix,"lower");
for i=1:NumberOfSimulations
Z = L*randn(4,NumberOfSteps);
for t=2:NumberOfSteps
.....Z1(i,t);
.....Z2(i,t);
Since i only want to generate the sequence once (very time consuming) the only way i found to generate two correlated r.v. is the following:
Ps = sobolset(NumberOfSteps);
Ps = scramble(Ps,'MatousekAffineOwen');
U = net(Ps,NumberOfSimulations);
Z1 = norminv(U);
Z2 = Rho.*Z1 + sqrt(1-Rho^2).*randn(NumberOfSimulations,NumberOfSteps);
Unfortunately I have No idea how I can extend this to 6 correlated random varibles. Can anyone help me?
Best regards,
Alex
matlab simulation
1
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random variables (NumberOfSteps X NumberOfSimulations) I need, using a cholesky decomposition:
L = chol(CorrelationMatrix,"lower");
for i=1:NumberOfSimulations
Z = L*randn(4,NumberOfSteps);
for t=2:NumberOfSteps
.....Z1(i,t);
.....Z2(i,t);
Since i only want to generate the sequence once (very time consuming) the only way i found to generate two correlated r.v. is the following:
Ps = sobolset(NumberOfSteps);
Ps = scramble(Ps,'MatousekAffineOwen');
U = net(Ps,NumberOfSimulations);
Z1 = norminv(U);
Z2 = Rho.*Z1 + sqrt(1-Rho^2).*randn(NumberOfSimulations,NumberOfSteps);
Unfortunately I have No idea how I can extend this to 6 correlated random varibles. Can anyone help me?
Best regards,
Alex
matlab simulation
Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random variables (NumberOfSteps X NumberOfSimulations) I need, using a cholesky decomposition:
L = chol(CorrelationMatrix,"lower");
for i=1:NumberOfSimulations
Z = L*randn(4,NumberOfSteps);
for t=2:NumberOfSteps
.....Z1(i,t);
.....Z2(i,t);
Since i only want to generate the sequence once (very time consuming) the only way i found to generate two correlated r.v. is the following:
Ps = sobolset(NumberOfSteps);
Ps = scramble(Ps,'MatousekAffineOwen');
U = net(Ps,NumberOfSimulations);
Z1 = norminv(U);
Z2 = Rho.*Z1 + sqrt(1-Rho^2).*randn(NumberOfSimulations,NumberOfSteps);
Unfortunately I have No idea how I can extend this to 6 correlated random varibles. Can anyone help me?
Best regards,
Alex
matlab simulation
asked Aug 1 at 10:34
Vanity
12
12
1
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37
add a comment |Â
1
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37
1
1
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2868932%2fgenerating-correlated-quasi-random-numbers%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to.
– José Carlos Santos
Aug 1 at 10:37