Given two aid random variables X1 U0 1 and X2 U0 1 A new s

Given two aid random variables, X_1 ~ U(0, 1), and X_2 ~ U(0, 1). A new set of random variables are generated from the following mapping: {W_1 =^delta squareroot -2 ln (x_1) cos (2 pi X_2) W_2 =^delta squareroot -2 ln (X_1) sin (2 pi X_2), Find the joint pdf of random variables W_1 and W_2, f_W_1, W_2 (w_1, w_2) = ? Find the marginal pdfs f_w_1 (w_1) = ? and f_w_1(w_2) = ? Prove the new random variables are iid Gaussian distributed N(0, 1) Using MATLAB to verily the above using pdfs, histograms.

Solution

close all; clear all; clc;
N = 10^5; % number of samples
X1 = rand(1,N); % uniformly distributed random X1 variable between 0 and 1
X2 = rand(1,N); % uniformly distributed random X2 variable between 0 and 1
W1 = sqrt(-2.*log(X1)).*cos(2.*pi.*X2); % generated new variable
W2 = sqrt(-2.*log(X1)).*sin(2.*pi.*X2); % genrated new variable
Z = randn(1,N); % normal distributed random variable Z with mean 0 and variance 1

%% plotting of the PDF of W1

[Bin_height_W1, Bin_center_W1] = hist(W1,30);
pdf_W1 = Bin_height_W1./trapz(Bin_center_W1, Bin_height_W1); % generating
% pdf from histogram using trapezoidal integration
plot(Bin_center_W1, pdf_W1, \'-rs\', \'LineWidth\',1, \'MarkerSize\', 4); hold on

%% ploting of PDF of W2

[Bin_height_W2, Bin_center_W2] = hist(W2,30);
pdf_W2 = Bin_height_W2./trapz(Bin_center_W2, Bin_height_W2); % generating
% pdf from histogram using trapezoidal integration
plot(Bin_center_W2, pdf_W2, \'-ko\', \'LineWidth\', 1, \'MarkerSize\', 4);

%% plotting of PDF of plot Z

Bin_height_Z, Bin_center_Z] = hist(Z,30);
pdf_Z = Bin_height_Z./trapz(Bin_center_Z, Bin_height_Z);
plot(Bin_center_Z, pdf_Z, \'-mv\', \'LineWidth\', 1, \'MarkerSize\', 4);
xlabel(\'variables\', \'FontSize\', 15);
ylabel(\'pdf\', \'FontSize\', 15);
legend(\'pdf-W1\',\'pdf-W2\',\'pdf-normal distribution(0,1)\');

 Given two aid random variables, X_1 ~ U(0, 1), and X_2 ~ U(0, 1). A new set of random variables are generated from the following mapping: {W_1 =^delta squarero

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site