showing the transformation converts problem

조회 수: 1 (최근 30일)
성호 홍
성호 홍 2020년 10월 5일
답변: Parag 2025년 3월 5일
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

답변 (1개)

Parag
Parag 2025년 3월 5일
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);

카테고리

Help CenterFile Exchange에서 Probability Distributions and Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by