ECE673 - Week3 - Lecture - With Figures
ECE673 - Week3 - Lecture - With Figures
ECE673 – Week 3
One Continuous Random Variable and
Mixed Random Variables
Learning Objectives
– Understanding the PDF and CDF of a continuous random
variable
– Understanding the transformation of a continuous random
variable into another random variable
– Calculating the expected value, variance, other moments
and characteristic function of a continuous random variable
– Understanding the usage of probability inequalities
– Understanding mixed random variables
Slide #HOME
Week 3 – Lessons
Lesson 3.1 Lesson 3.3Cumulative Distribution
Probability Density Functions Lesson 3.2Important PDFs Functions
(PDFs)
Lesson 3.1
Probability Density Functions (PDFs)
• PDF properties
– Property 10.1 – PDF must be nonnegative.
for λ > 0
`
Slide #1.4
End of Lesson
Click here to return to the main menu.
Slide #2.1
Lesson 3.2
Important PDFs
Slide #2.2
Important PDFs
• Uniform
• Gaussian or Normal
(a) , σ2 = 2
(b) , σ2 = 2
End of Lesson
Click here to return to the main menu.
Slide #3.1
Lesson 3.3
The value of the CDF FX(x) at any point x is the integral of the PDF
of the random variable X, up to the point x. It is the probability of X
being less than or equal to x (X x).
Slide #3.2
• Definition
• Integral representation
Slide #3.3
– Also
– Therefore
Slide #3.4
clear all;
x=[0:0.05:5];
lambda=2;
y=1-exp(-lambda*x);
plot(x,y);
xlabel('x');
ylabel('F_X(x)');
axis([-1 5 0 1.3]);
1 1 2(10.18)
x 2
exp( t )dt
2
(10.26)
End of Lesson
Click here to return to the main menu.
Slide #4.1
Lesson 3.4
Transformations
Slide #4.2
Transformations
• General result for the PDF of Y = g(X)
(10.30)
- dg 1
( y ) is actually dxin y domain.
dy dy
Slide #4.3
Transformations
• One-to-one
– Example 10.5: Linear
To determine the PDF of Y = a X + b =g(X)
yb
Solve for x to obtain x g 1 ( y )
a
Using eq. (10.30), PDF of Y can be written as
y b 1 (10.31)
pY ( y ) p X
a a
-- Consider X being standard Gaussian and let Y 2X
Then Y becomes another Gaussian with the parameters σ2 and μ
This result allows to simulate an arbitrary Gaussian variable in MATLAB
y=sqrt(sigma2)*randn+mu
Remember: Linear transformation of Gaussian gives another Gaussian!
Slide #4.4
Transformations
• Not one-to-one
– Example: Quadratic y x2
Obtain multiple solutions by solving for x in y g ( x)
x1 y g11 ( y )
x1 y g 21 ( y )
See Figure 10.23 in the book: Solutions for x in y = g(x) = x2
Now use eq. (10.30) for all the solutions and add them up
1 dg11 ( y ) 1 dg 21 ( y(10.32)
)
pY ( y ) p X ( g ( y ))
1 p X ( g 2 ( y ))
dy dy
See also Example 10.7 for PDF of Y = X 2, when X is a standard Gaussian
random variable.
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #5.1
Lesson 3.5
(10.36)
p X ( x ) pc ( x ) pi ( x xi )
i 1
- To be a valid PDF, it must satisfy
pc ( x )dx pi 1
i 1
- Note that for the delta function we have
p ( x x )dx p
i i i
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #6.1
Lesson 3.6
X FX1 U
where U ~ U (0,1), then X has the following PDF
p X ( x) dFX ( x) / dx
-- The theorem implies that if a random variable X is transformed by
applying the transformation FX(.) to it, where FX(.) is its CDF, then the
resulting random variable FX(X) is uniformly distributed between 0 and
1 ! This interesting property can be used to simulate random variables
from a uniform random number generator.
Slide #6.3
The theorem says that – ln(1 – U), the inverse function of the above
CDF applied to U, which is uniformly distributed between 0 and 1, has
in fact the same distribution as X !
This can be used to simulate exponential variable from a uniform
variable. Here is a Matlab code to generate 300 samples of the above
exponential distribution -log(1-rand(1,300))
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #7.1
Lesson 3.7
(11.3)
Slide #7.3
- See Figure 3.F in Slide #7.5: Example of nonuniform PDF and its mean.
According to the graph of the PDF, x / 2 for 0 < x < 2, E[X] can be
calculated using the following integral
2 1 4
E[ X ] x x dx
0
2 3
Slide #7.4
u=rand(40,1);
x=sqrt(4*u); %Obtained using Theorem 10.9.1
of the textbook, p.325
stem(x); xlabel('sample number');
ylabel('result');
Slide #7.5
Determining Expected Values
(11.7)
Slide #7.7
(11.9)
(11.10)
where pc(x) is the continuous part of the PDF. For E[X] we have
(11.11)
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #8.1
Lesson 3.8
(11.12)
– Using we obtain
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #9.1
Lesson 3.9
Characteristic Functions
Slide #9.2
Characteristic Functions
• Definition
(11.16)
or
(11.17)
Slide #9.3
Characteristic Functions
• Example 11.7: Moments of the exponential PDF
- Characteristic function of an exponential random variable is given by:
(11.19)
n n!
E[ X ] n
Slide #9.4
Characteristic Functions
(11.20)
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Slide #10.1
Lesson 3.10
(11.21)
End of Lesson
Click here to return to the main menu.
Slide #11.1
Lesson 3.11
– Mean estimate:
(11.22)
– Variance estimate:
(11.23)
Slide #End of Lesson
End of Lesson
Click here to return to the main menu.
Reference