Variable transformation for a multivariate normal distribution

In summary: This transformation is possible because the logarithm function is invertible. In summary, you can generate random ##\mathbf \delta## vectors by first generating random x vectors from the desired multivariate normal distribution, and then transforming them using the formula ##\delta_i = e^{x_i}-1##.
  • #1
nilsgeiger
6
0
TL;DR Summary
I want to transform a multivariate normal [##log (\delta_i + 1)##] distribution to a multivariate normal distribution of the ##\delta_i## .
Besides, i'm looking for a way to transform the random vectors with the components ##log (\delta_i + 1)## to vectors with components ##\delta_i ##.
Hello.

I would like to draw (sample) several random vectors x from a n-dimensional multivariate normal distribution.
For this purpose I want to use C++ and the GNU Scientific Library function gsl_ran_multivariate_gaussian .

https://www.gnu.org/software/gsl/manual/html_node/The-Multivariate-Gaussian-Distribution.html


The distribution has the usual density
$$p(x_1,\dots,x_k) dx_1 \dots dx_k = {1 \over \sqrt{(2 \pi)^k |\Sigma|}} \exp \left(-{1 \over 2} (x - \mu)^T \Sigma^{-1} (x - \mu)\right) dx_1 \dots dx_k$$
with $$\mu = 0$$ but with
$$ x = \begin{pmatrix} log (\delta_1 + 1) \\
log (\delta_2+1) \\
log (\delta_3 + 1) \\
log (\delta_4 + 1) \\
... \\
log (\delta_n + 1) \\
\end{pmatrix}$$

As stated the ##log (\delta_i + 1)## follow the multivariate normal distribution.

But I am actually only interested in the ##\delta## -vectors.
$$ \delta = \begin{pmatrix} \delta_1 \\
\delta_1 \\
\delta_2 \\
\delta_3 \\
... \\
\delta_n \\
\end{pmatrix}$$
  1. How do you transform a x - vector to a ##\delta## - vector?
    With help of the covariances? But how exactly?
  2. Alternatively, can you do a change of variables to the multivariate distribution of the ##\delta_i## und draw ##\delta## - vectors directly with the gsl_ran_multivariate_gaussian?
    Could you please tell me the formula to compute the appropriate new covariance matrix?
    Or is this not possible?
    I am aware that the multiariate log-normal distribution exists, but GSL can only sample the multivariate normal.

I'm so sorry, this are probably really stupid questions.
But I'm just a not particularly good bachelor physics student in his fourth semester who also started programming c++ for the very first time.
I'm really overwhelmed and began learning about multivariate statistics for the first time because of this task no more than a week ago.

It would really help me a lot if you could answer and explain my two questions in great detail and for idiots.

For literature references for general variable transformations for multivaraite distributions and multivariate normal distributions I would also be very very thankful.
Especially for multivariate normal distributions of ##(log (x_i+1) )## there must be formulas together with a detailed derivation, right?
Normally distributed logarithms have to occur and ##+1## just ensures that for ##x_i## greater zero the logarithm always remains positive, so they should also be quite common?
 
Physics news on Phys.org
  • #2
From what you've written it sounds like you already know how to randomly generate x vectors from the required multivariate normal distribution. That's the difficult bit done. From there it's easy. Since for ##i=1,2,...,n## we have ##x_i = \log(\delta_i+1)##, you can calculate a simulated ##\mathbf \delta## vector from its corresponding x vector by calculating ##\delta_i = e^{x_i}-1##, where ##\delta_i## and ##x_i## are the ##i##-th components of the ##\mathbf \delta## and x vectors respectively.
 

1. What is a multivariate normal distribution?

A multivariate normal distribution is a probability distribution that describes the behavior of multiple variables that are normally distributed. This means that each individual variable follows a bell-shaped curve and the relationship between the variables is linear.

2. Why is variable transformation necessary for a multivariate normal distribution?

Variable transformation is necessary for a multivariate normal distribution because it allows us to transform the variables into a new set of variables that are uncorrelated and have equal variances. This simplifies the analysis and makes it easier to interpret the data.

3. What are the benefits of variable transformation for a multivariate normal distribution?

Variable transformation has several benefits for a multivariate normal distribution, including making the data easier to interpret and analyze, reducing the impact of outliers, and improving the fit of the data to the normal distribution.

4. How do you perform variable transformation for a multivariate normal distribution?

To perform variable transformation for a multivariate normal distribution, you first need to determine the correlation matrix and the variances of the original variables. Then, you can use mathematical techniques such as the Cholesky decomposition or the Box-Cox transformation to transform the variables into a new set of uncorrelated and equally distributed variables.

5. What are some common techniques for variable transformation in a multivariate normal distribution?

Some common techniques for variable transformation in a multivariate normal distribution include the Cholesky decomposition, the Box-Cox transformation, and the Johnson transformation. Other techniques such as log transformation, square root transformation, and inverse transformation can also be used depending on the data and the desired outcome.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
923
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
12K
Back
Top