You are on page 1of 9

Discrete, Continuous and Mixed-type random variables

 A random variable X is called a discrete random variable FX (x ) is piece-


wise constant. Thus FX ( x) is flat except at the points of jump discontinuity. If
the sample space S is discrete the random variable X defined on it is always
discrete.
 X is called a continuous random variable if FX ( x) is an absolutely
continuous function of x. Thus FX (x ) is continuous everywhere on � and
FX �
( x) exists everywhere except at finite or countably infinite points .
 X is called a mixed random variable if FX (x ) has jump discontinuity at
countable number of points and it increases continuously at least at one
interval of values of x. For a such type RV X,
FX ( x) = pFX d ( x) + (1 - p) FX c ( x)
where FX d ( x ) is the distribution function of a discrete RV and FX c ( x) is the
distribution function of a continuous RV. Typical plots of FX ( x) for discrete,
continuous and mixed-random variables are shown in Fig below.

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)

Discrete Random Variables and Probability mass functions

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,

 p X ( xi ) �0 "xi �RX and


 � p X ( xi ) = 1
i�R X

 Suppose D �RX . Then


P ({x �D}) = �p
xi �D
X ( xi )

X (s

s1 s2
X ( s2
s3 X ( s3
s4
X ( s4

Figure Discrete Random Variable


(To be animated)

Example

Consider the random variable X with the distribution function

�0 x<0
�1
� 0 �x < 1

FX ( x) = �4
�1 1 �x < 2
�2
�1 x �2

The plot of the FX ( x) is shown in Fig.


FX ( x)
1

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.

Continous Random Variables and Probability Density Functions

For a continuous random variable X , FX ( x) is continuous everywhere. Therefore,

FX ( x) = FX ( x - ) "x ��. This implies that

p X ( x ) = P({ X = x})
= FX ( x) - FX ( x - )
= 0

Therefore, the probability mass function of a continuous RV X is zero for all x. A


continuous random variable cannot be characterized by the probability mass function. A
continuous random variable has a very important chacterisation in terms of a function
called the probability density function.

If FX (x ) is differentiable, the probability density function ( pdf) of X , denoted by


f X ( x ), us defined as

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

P ({x < X �x + Dx}) ; f X ( x) Dx.

Thus the probability of X lying in the some interval ( x, x + Dx] is determined by


f X ( x ). In that sense, f X ( x) represents the concentration of probability just as the density
represents the concentration of mass.

Properties of the Probability Density Function

 f X ( x ) �0.

This follows from the fact that FX ( x) is a non-decreasing function

 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

The pdf of the RV is given by


�0 x<0
f X ( x) = �- ax
�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

where u ( x - xi ) shifted unit-step function given by


1 for x �xi

u ( x - xi ) = �
0 otherwise

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

Probability Density Function of Mixed-type Random Variable

Suppose X is a mixed-type random variable with FX ( x) having jump discontinuity at


X = xi , i = 1, 2,.., n. As already stated, the CDF of a mixed-type random variable X is
given by
FX ( x) = pFD ( x ) + ( 1 - p ) FC ( x )
where FD ( x ) is the conditional distribution function of X given X is discrete and
FC ( x ) is the conditional distribution function given that X is continuous.
The corresponding pdf is given by

f X ( x) = pf D ( x) + (1 - p ) fC ( x)

where
n
f D ( x) = �p X ( xi )d ( x - xi )
i =1

and f C ( x ) is a continuous pdf.

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 .

Clearly the subsets RD and RC partition the set RX . If P ( RD ) = p , then P ( RC ) = 1 - p .

Thus the probability of the event { X �x} can be expressed as

P { X �x} = P ( RD ) P ( { X �x} | RD ) + P ( RC ) P ( { X �x} | RC )


= pFD ( x ) + ( 1 - p ) FC ( x )
\ FX ( x) = pFD ( x ) + ( 1 - p ) FC ( x )
Example Consider the random variable X with the distribution function

0
� x<0

0.1 x=0

FX ( x) = �
0.1 + 0.8 x
� 0 < x <1

1
� x >1
FX ( x )
1

The plot of FX ( x) is shown in Fig.

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

The pdf is given by


f X ( x) = 0.2 f X d ( x) + 0.8 f X c ( x)

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 )

You might also like