2

I am trying to work out how to generate numbers from a bivariate distribution (any one but the normal distribution) while still being able to control the correlation between the two variables (let's call them $X$ and $Y$). When generating numbers from a normal distribution it is quite easy, as you just specify the covariance (correlation) in the covariance matrix. I have done this in the normal case and compared the power of three correlation tests for various values of rho, the true correlation.

Now I want to do this for some other bivariate distribution, but I don't know how to do it while still knowing the true correlation. One suggestion I was offered was to generate $Z$ and $e$, and then let $V = b*Z + e$, but I tried calculating the correlation when $Z$ and $e$ were both chi square and uniform, but could not figure anything out.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
hejseb
  • 2,298
  • 1
  • 15
  • 26
  • 1
    This thread might help you: [How to generate correlated random numbers given means, variances, and degree of correlation](http://stats.stackexchange.com/questions/38856/). AFAIK, there's nothing special / required about having a normal error term (eg, see: [Pearsons or Spearmans correlation with non-normal data](http://stats.stackexchange.com/questions/3730/)), but $r$ can't reach 1 or -1 if the marginal distributions differ. – gung - Reinstate Monica Feb 18 '13 at 20:01

0 Answers0