2
$\begingroup$

I would like to generate a joint distribution of random variables $X$ and $Y$ from a multivariate normal distribution with mean zero and symmetric covariance matrix. However, each generated $x_i$ and $y_i$ needs to be constrained by a mean, $z_i$, that was previously generated from a normal distribution with the same variance as $X$ and $Y$. For each sample generated, how do I condition on $z_i$ to sample $x_i$ and $y_i$, while maintaining the desired covariance matrix for the joint distribution of $X$ and $Y$?

Here is an example: Let's say I ultimately want a multivariate normal distribution of $X$ and $Y$ with: $ \mu = \left(\matrix{0 \\ 0}\right)$ and $\Sigma = \left(\matrix{\sigma_{11} & \sigma_{12} \\ \sigma_{21} & \sigma_{22}}\right)$, where $\sigma_{11}=\sigma_{22}$. I have sampled $Z$ from normal distribution: $Z \sim \mathcal{N}(0,\sigma_{11})$. For each $z_i$, I want to sample $x_i$ and $y_i$ such that they have mean $z_i$, but overall will have a covariance matrix $\Sigma$ just described.

I think I can sample each $x_i$ and $y_i$ independently from a normal distribution with mean $z_i$, but I'm not sure what the variance should be. I have found a distribution to sample one value conditional on knowing the other that it covaries with, but I believe that's different from what I'm trying to do here. Thank you in advance for helping me identify the right distribution around each $z_i$!

$\endgroup$

1 Answer 1

2
$\begingroup$

If$$\left(\matrix{X \\ Y}\right)\sim \mathcal N \left(\mu,\Sigma\right)$$then $$X\sim\mathcal N(0,\sigma_{11})$$and$$Y|X\sim\mathcal N(\sigma_{12} X/\sigma_{11},\sigma_{22}-\sigma_{11}^2/\sigma_{11}^2)$$ meaning that $Z$ and $X$ have the same distribution.

$\endgroup$
1
  • $\begingroup$ Thank you for answering my question, however I cannot let X=Z in what I'm trying to do. Is there a way around that? $\endgroup$
    – user876258
    May 25, 2021 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.