Discrete, Continuous and Mixed-Type Random Variables
Discrete, Continuous and Mixed-Type Random Variables
Discrete, Continuous and Mixed-Type Random Variables
FX ( x)
x�
Plot FX ( x) vs. x for a discrete random variable ( to be animated)
FX ( x)
1
x�
FX ( x)
1
x�
Plot FX ( x ) vs. x for a continuous random variable ( to be animated)
FX ( x)
x�
Plot FX ( x ) vs. x for a mixed-type random variable ( to be animated)
A random variable is said to be discrete if the number of elements in the range of RX is finite or
countably infinite. Examples 1 and 2 are discrete random variables.
Assume RX to be countably finite. Let x1 , x2 , x3 ..., xN be the elements in RX . Here the mapping
X ( s ) partitions S into N subsets { s | X ( s) = xi } , i = 1, 2,...., N .
The discrete random variable in this case is completely specified by the probability mass
function (pmf) p X ( xi ) = P ( s | X ( s) = xi ), i = 1, 2,...., N .
Clearly,
X (s
s1 s2
X ( s2
s3 X ( s3
s4
X ( s4
Example
�0 x<0
�1
� 0 �x < 1
�
FX ( x) = �4
�1 1 �x < 2
�2
�1 x �2
�
1
2
1
4
0 1 2 x
The probability mass function of the random variable is given by
Value of the p X ( x)
random
Variable X = x
0 1
4
1 1
4
2 1
2
We shall describe about some useful discrete probability mass functions in a later class.
p X ( x ) = P({ X = x})
= FX ( x) - FX ( x - )
= 0
d
f X ( x) = FX ( x )
dx
Interpretation of f X ( x )
d
f X ( x) = FX ( x)
dx
F ( x + Dx) - FX ( x)
= lim X
Dx �0 Dx
P ({x < X �x + Dx})
= lim
Dx �0 Dx
so that
f X ( x ) �0.
FX ( x) = �f (u )du
-�
X
f X ( x ) dx = 1
-
x2
P( x1 < X x 2 ) = f
- x1
X ( x)dx
f X ( x)
x0 x0 + Dx0 x
Fig. P ({x0 < X �x0 + Dx0 }) ; f X ( x0 ) Dx0
Example Consider the random variable X with the distribution function
0
� x<0
FX ( x) = � - ax
1 - e , a > 0 x �0
�
Remark: Using the Dirac delta function we can define the density function for a discrete
random variables.
Consider the random variable X defined by the probability mass function (pmf)
p X ( xi ) = P ( s | X ( s ) = xi ), i = 1, 2,...., N .
The distribution function FX ( x) can be written as
N
FX ( x) = �p X ( xi )u ( x - xi )
i =1
Then the density function f X ( x ) can be written in terms of the Dirac delta function as
n
f X ( x) = �p X ( xi )d ( x - xi )
i =1
Example
Consider the random variable defined in Example 1 and Example 3. The distribution
function FX ( x) can be written as
1 1 1
FX ( x) = u ( x) + u ( x - 1) + u( x - 2)
4 4 2
and
1 1 1
f X ( x ) = d ( x ) + d ( x - 1) + d ( x - 2)
4 4 2
f X ( x) = pf D ( x) + (1 - p ) fC ( x)
where
n
f D ( x) = �p X ( xi )d ( x - xi )
i =1
Suppose RD = {x1 , x2 ,..., xn } denotes the countable subset of points on RX such that the
RV X is characterized by the probability mass function p X ( x ) , x �S D . Similarly let
RC = RX \ RD be a continuous subset of points on RX such that RV is characterized by the
probability density function fC ( x ) , x �RC .
0
� x<0
�
0.1 x=0
�
FX ( x) = �
0.1 + 0.8 x
� 0 < x <1
�
1
� x >1
FX ( x )
1
FX ( x) can be expressed as
FX ( x) = 0.2 FX d ( x) + 0.8FX c ( x) x�
0 1
where
0
� x<0
�
FX d ( x ) = �
0.5 0 �x �1
�
1 x >1
�
and
�0 x<0
�
FX c ( x) = �x 0 �x �1
�1 x >1
�
where
f X d ( x) = 0.5d ( x) + 0.5d ( x - 1)
and
1
� 0 �x �1
f X c ( x) = �
0
� elsewhere
f X ( x)
1 0 1 x
Example
X is the RV representing the life time of a device with the PDF f X ( x ) for x>0. Define
the following random variable
y=X if X �a
=a if X > a
RD = {a}
RC = ( 0, a )
p = P { y �D}
= P { X > a}
= 1 - FX ( a )
\ FX ( x ) = pFD ( x ) + ( 1 - p ) FC ( x )