Hi guys, I have two randomly generated variables and want to generate the third which is correlated with one of them and uncorrelated with the other. How can I generate such random variable?
Show older comments
To be specific I have these series
e~N(0,1)and x~N(0,v), where v is variance of x
and I want to generate another variable say Y that satisfy the following conditions
E(y,e) equal to zero E(Y,x) not equal to zero
Please help me out with this.
3 Comments
Does your notation "E(a,b)" basically mean the correlation/covariance between a and b? (It doesn't matter which).
When you say "E(y,e) equal to zero", do you mean "E(Y,e) equal to zero"?
Do we assume that e and x are uncorrelated? This would make things easier in my opinion.
Solomon Gofere
on 2 Nov 2014
Harry
on 2 Nov 2014
That's good - the answer I wrote should work for you. Please accept it if you are happy with it.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!