Re: how to create dataset with given correlation coefficient




Start with X and Z iid N(0,1).

If W = aX + bZ, then cov(W,X) = a var(X).

E(W) = aE(X)+bE(Z) = 0
var(W) = a^2 + b^2.
cov(W,X) = cov(aX+bZ,X) = a var(X)+0 = a

If |a|<1 and you choose b to make W have variance 1, then
corr(W,X) = a

You can then choose Y to be a linear function of W to achieve the
desired population std dev. and mean.

Glen

.



Relevant Pages

  • Re: how to create dataset with given correlation coefficient
    ... > Start with X and Z iid N. ... > If |a|<1 and you choose b to make W have variance 1, ... but also the marginal distributions that are ... > desired population std dev. ...
    (sci.stat.math)
  • Re: Hetroskedacity problem
    ... weights can be identified either by structural changes in the variance ... of thje errors or via a garch estimator .. ... Prev by Date: ...
    (sci.stat.math)
  • Which type of variance?
    ... Is there a simple explanation for knowing which type of variance (equal ... versus unequal) to use when doing a t-test? ... John Hart ... Prev by Date: ...
    (sci.stat.consult)
  • Re: 12-bd OKB MiniTour Stats
    ... > I'd be curious about ACBL's stats on BBO. ... > more variance. ... Prev by Date: ...
    (rec.games.bridge)
  • Re: 12-bd OKB MiniTour Stats
    ... > I'd be curious about ACBL's stats on BBO. ... > more variance. ... Prev by Date: ...
    (rec.games.bridge)