showing the transformation converts problem

1 visualización (últimos 30 días)
성호 홍
성호 홍 el 5 de Oct. de 2020
Respondida: Parag el 5 de Mzo. de 2025
from Gaussian vector, (mean (1; 1) , cov ( 2 1 ; 1 1),
take 2 dimenttional smaple vector "randn(2, 1)" and uncorrelated Gaussian S ~ N (0, I)
and I habe to transformation X=UA^1/2S + µ cpnverts the uncorrelated Gaussian vector into the correlated Gaussian vector, where ∑ = UAU^T
please help me to find where to start from, I even dont know where to start

Respuestas (1)

Parag
Parag el 5 de Mzo. de 2025
Hi, as per my understanding you are trying to do a transformation that converts an uncorrelated Gaussian vector SN(0,I) into a correlated Gaussian vector XN(μ,Σ). Let's break this down step by step.
We have a mean vector:
μ=[1 1]
and a covariance matrix:
Σ=[2 1
1 1]
The target is to generate samples from X using the transformation:
X= UA 1/2S
where SN(0,I) , and Σ is decomposed as:
Σ=UAUT
where:
  • U is an orthogonal matrix (eigenvectors of Σ ).
  • A is a diagonal matrix (eigenvalues of Σ).
  • A ½ is the square root of A (element-wise square root of eigenvalues).
To find U and A, compute the eigenvalues and eigenvectors of Σ.
Use randn(2,1) in MATLAB or to generate a standard normal vector SN(0,I).
Compute:
X=UA½S + μ
This converts the uncorrelated vector S into a correlated Gaussian sample.
Here’s a MATLAB implementation:
% Given mean and covariance
mu = [1; 1];
Sigma = [2 1; 1 1];
% Eigen decomposition of Sigma
[U, A] = eig(Sigma);
% Compute A^(1/2)
A_sqrt = sqrt(A);
% Generate an uncorrelated Gaussian vector
S = randn(2,1);
% Apply the transformation
X = U * A_sqrt * S + mu;
% Display the transformed sample
disp('Sample from correlated Gaussian distribution:');
disp(X);

Categorías

Más información sobre Probability Distributions and Hypothesis Tests en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by