In the previous blog post, we saw a special example in which we were able to sample random variables from a joint 2D-Gaussian distribution from the marginals and the correlation coefficient.
I listed a simple method, which seemed to work like magic. It had two simple steps:
The question is, why did the method work?
Note that the covariance matrix of random variables with zero mean and unit standard deviation can be written as, \(C(Y) = E(Y Y')\), where \(E()\) denotes the expected value of a random variable. Thus, we can write the expected value of the Y generated by the method as, \[\begin{align*} E(Y Y') & = E\left(LX (LX)'\right)\\ & = L E(XX') L' \\ & = L I L'\\ & = LL' = C.\end{align*}.\] Here we used the fact that the covariance of X is an identity matrix by design.
Note that this method preserves the covariance matrix (and hence the standard deviation of the marginals).
Does it preserve the mean?
Yes. \(E(Y) = E(LX) = L E(X) = 0.\)
Do the marginals have to be normal for this method to work? Would this work for any distribution (with zero mean, and unit standard deviation)?
We will explore this in a subsequent blog.
I listed a simple method, which seemed to work like magic. It had two simple steps:
- Cholesky decomposition of the covariance matrix, C(Y)
- Y = LX, where X are independent random variables
The question is, why did the method work?
Note that the covariance matrix of random variables with zero mean and unit standard deviation can be written as, \(C(Y) = E(Y Y')\), where \(E()\) denotes the expected value of a random variable. Thus, we can write the expected value of the Y generated by the method as, \[\begin{align*} E(Y Y') & = E\left(LX (LX)'\right)\\ & = L E(XX') L' \\ & = L I L'\\ & = LL' = C.\end{align*}.\] Here we used the fact that the covariance of X is an identity matrix by design.
Note that this method preserves the covariance matrix (and hence the standard deviation of the marginals).
Does it preserve the mean?
Yes. \(E(Y) = E(LX) = L E(X) = 0.\)
Do the marginals have to be normal for this method to work? Would this work for any distribution (with zero mean, and unit standard deviation)?
We will explore this in a subsequent blog.
No comments:
Post a Comment