homework1.1.9

homework1.1.9 - figure of x2,y2 figure of x3,y3 figure of...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Peng Huang ID:U02078166 Problem 1.9 (c)If we can not get the inverse function of PY(y) but given the aiming PDF is with a Gaussion distribution whose mean is zero and the variance is σ , we can use the Central Limit Theorem that provides us a statement that the sum of IID variables can be the N(0,1) distribution. Thus, we are sure that we can generate such a Gaussion distribution random variables by a uniform random variables. Here, I choose the most straightforward one. Because the Rayleigh random variables are the magnitude vectors of pairs of independent, zero-mean, variance σ random variables. We can therefore use the Rayleih random variable R and a uniform random θ to generate a variable which equals to R*sin θ and satisfies the N(0,1) distribution. I use such an M-file: a=0;b=2*pi; theata=unifrnd(a,b,1,100); R=raylrnd(1,1,100); for i=1:1:100; X(i)=R(i)*sin(theata(i)); end y=0:1:99; pdf1d(X,100) figure(2) stem(y,X), xlabel( 'Sample Numbers' ),ylabel( 'samples' )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
And use the given pdf1d.m, I got the results as following: The results show that the method is work.
Background image of page 2
Peng Huang ID:U02078166 Problem 1.10 (a)1.figure of x1,y1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: figure of x2,y2 figure of x3,y3 figure of x4,y4 2.marginal distributions: I used such an M-file: py=zeros(1,100); py1=zeros(100,1); [p,x,y,P]=pdf2d(x1,y1,100,100); for i=1:1:100 for j=1:1:100 py=py+p(j,:); end py(i)=py(i); end for j=1:1:100; for i=1:1:100; py1=py1+p(:,i); end py1(j)=py1(j); end subplot(211), plot(y,py); subplot(212), plot(y,(py1).'); subplot the resultes are shown as followings: the upper is the figure of X serious and the other is Y serious. px1(x) and py1(y) px2(x) and py2(y) px3(x) and py3(y) px4(x) and py4(y) 3. cov(x1,y1) ans = 0.4309 -0.0003-0.0003 3.2938 cov(x2,y2) ans = 0.0835 -0.0003-0.0003 0.0828 cov(x3,y3) ans = 2.4706 1.4910 1.4910 2.4953 cov(x4,y4) ans = 0.0829 0.0011 (x1,y1)=-0.0002, (x2,y2)=-0.0041, (x3,y3)=0.6005, (x4,y4)=0.0039 (b)Based on the correlation coefficient values, I think the sets of NO.1, NO.2 and NO.4 is uncorrelated. Because the coefficient values are extremely small. Using the pdm2d to do the analysis the joint probability density function of X and Y, I found that the NO1 and NO4 are independent....
View Full Document

Page1 / 8

homework1.1.9 - figure of x2,y2 figure of x3,y3 figure of...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online