1
$\begingroup$

I am trying to generate random numbers within a range say 57 to 107 which are correlated by a factor of 0.8. The numbers are for illustration simplicity only.

  • 0
    Presumably you want the random numbers to be uniformly distributed between $57$ and $107$? Or (approximately) normally distributed with (say) mean $82$ and standard deviation $5$? Also, correlation is a pairwise property. Do you want the correlation between $X_i$ and $X_j$ to be $0.8$ for _all_ $i\neq j$ or just between $X_i$ and $X_{i+1}$ (and of course between $X_{i-1}$ and $X_i$ also)?2011-11-28
  • 0
    @DilipSarwate : Why would you assume the correlation is supposed to be between $X_i$ and $X_{i+1}$. I'd never have guess that. I took it to mean pairs $(X_i,Y_i)$, in which the correlation between $X_i$ and $Y_i$ is $0.8$.2011-11-28
  • 0
    @MichaelHardy I assumed the OP wanted a sequence of random numbers $X_i$. That he might have meant he wanted _pairs_ of numbers $(X_i,Y_i)$ in which the correlation between $X_i$ and $Y_i$ is $0.8$ never occurred to me. I suppose we will have to wait for him to clarify what he wants.2011-11-28
  • 0
    To Dilip Sarwate's question I will add this: Do you want a random sample from a distribution in which the correlation is $0.8$ (so that if, for example, you take a sample of 50 pairs, the correlation has high probability of being _near_ $0.8$), or do you want to assure that the actual sample correlation will always be exactly $0.8$? (Some years ago I wrote an algorithm for the latter.)2011-11-28
  • 1
    I want the random numbers to be log normally distributed. Basically I am trying to generate random prices correlated to the original price series but without it going too far out of the range I want it to be in.2011-11-28

0 Answers 0