For a long time, I thought that a normally distributed vector $x \in \mathbb{R}^n$ was generated in the following way
Sample $x_i$ from a Gaussian distribution, $x_i = \mu + \sigma^2\mathcal{N}(0,1)$, where $\mu \in \mathbb{R}$ and $\mathcal{N}(0,1)$ is a normally distributed value. Then form a vector $x = (x_i)$.
However, I recently discovered that in fact the approach is,
Let $C$ be a covariance matrix. Factorize covariance matrix $C$ using Cholesky decomposition, $C = AA^\top$, where $A$ is lower triangular. Then $x = m + A \mathcal{N}(\mathbf{0}, I)$, where $m \in \mathbb{R}^n$ is the mean vector, $\mathcal{N}(\mathbf{0}, I)$ is a normal vector
Are these approach one and the same? I am guessing not because the first way is assuming a uniform variance.
Which is more correct?
And what is the rationale behind factorizing $C$ using Cholesky decomposition.
In your original approach, if you want $\ \sigma\ $ to be the standard deviation of $\ x_i\ $ you should have $\ x_i=\mu+\sigma\mathcal{N}(0,1)\ $, rather than $\ x_i=\mu+\sigma^2\mathcal{N}(0,1)\ $. If you do that, your original approach is just a special case of the second, in which your generated $\ x_i\ $ will be independent normal variates with mean $\ \mu\ $ and variance $\ \sigma^2\ $—that is, $\ m=(\mu,\mu,\dots,\mu)\ $ and $\ C=\sigma^2I_{n\times n}\ $.
Which approach is "correct" depends entirely on what you want to do. If all you want to do is generate a sequence of independent, normally distributed , random variables, all with mean $\ \mu\ $ and variance $\ \sigma^\ $, then your original approach is perfectly fine, but if you want to generate a random vector which is multivariate normally distributed with mean $\ \big(m_1,m_2,\dots,m_n\big)\ $ and a covariance matrix $\ C\ $ that is not just a multiple of the identity, then your original approach cannot do that, and you'd have to resort to something like the second.
It's not necessary for the $\ A\ $ you use in the second approach to be obtained from the Cholesky decomposition, merely that it satisfy the equation $\ AA^\top=C\ $. However, since the Cholesky decomposition gives you an $\ A\ $ that's lower triangular, it will then require less work to calculate the product $\ A\mathcal{N}(\mathbf{0},I)\ $ than if $\ A\ $ were filled entirely with non-zero entries.