0

I have a vector $Y$ of size less than 75. I want to generate vectors $X_1$ and $X_2$, of the same size, satisfying the following constraints.

  • Sample mean and variance of $X_1$ and $X_2$ are equal to specified values.
  • Sample corr($Y, X_1$), corr($Y, X_2$), corr($X_1, X_2$) are equal to specified values.

How can I do this? My question is related to Generate a random variable with a defined correlation to an existing variable(s) but I didn't see anything there that exactly matched my constraints.

eagle34
  • 173
  • 6
  • Can this be done with semidefinite programming? – eagle34 Jan 04 '22 at 04:52
  • Generate independent vectors $\epsilon_1$ and $\epsilon_2$ from an arbitrary distribution. Write$$X_1=\mu_1+\rho_1Y+\sigma_1\epsilon_1\quad X_2=\mu_2+\rho_{21}Y+\rho_{22}X_1+\sigma_2\epsilon_2$$and solve in $(\mu_1,\ldots,\sigma_2)$. – Xi'an Jan 04 '22 at 05:09

1 Answers1

0

If your motivating question is about random variables, then the specifications (means, variances, correlations) should apply to their distributions, and the sampling counterparts of such specifications will vary owing to the vagaries of sampling.

Concerning distributions, then: given marginal distributions for $Y$, $X_{1}$, and $X_{2}$, and specifications for their means and covariance matrix, one can use a copula to produce a joint distribution for $(Y, X_{1}, X_{2})$ that reproduces both the given margins and the specified covariance matrix.

If, for example, the copula is driven by the trivariate Gaussian distribution, typically you will need to adjust its covariance matrix iteratively to achieve the desired covariances. Refer to Nelsen (2006, An Introduction to Copulas) or Possolo (2010, DOI 10.1088/0026-1394/47/3/017).

santeiro
  • 1
  • 1