You are on page 1of 25

EE501 Stochastic Processes

Semester 191
Week-2, Lecture-1

Mohamed Abdul Haleem


Room B14-S-345
Tel: x2572
Email: m.haleem@uoh.edu.sa


A
X ( )
Random Variables x B R

Let (, F, P) be a probability model for an experiment, and X a


function that maps every   , to a unique point x  R, the set
of real numbers. Since the outcome is not certain, so is the value
X ( )  x. Thus if B is some subset of R, we may want to
determine the probability of “A  X 1 ( B)   ”. To determine this
probability, we can look at the set X ( )  B that contains all   
that maps into B under the function X.

2
Random Variables
Obviously, if the set A  X 1 ( B ) also belongs to the associated field F,
then it is an event and the probability of A is well defined; in that
case we can say
Probability of the event "X ( )  B "  P (X 1
(B )).
The notion of random variable (r.v) makes sure that the inverse
mapping always results in an event so that we are able to determine
the probability for any B  R.
Random Variable (r.v.): A finite single valued function X (  ) that
maps the set of all experimental outcomes  into the set of real
numbers R is said to be a r.v., if the set | X ( )  x  is an event( F )
for every x in R.
3
Probability Distribution Function
Denote P | X ( )  x   FX ( x)  0.
The role of the subscript X is only to identify the actual r.v. FX (x)
is said to the Probability Distribution Function (PDF) associated
with the r.v. X.
Distribution Function: Note that a distribution function g(x) is
non-decreasing, right-continuous and satisfies
g (  )  1, g (  )  0,
i.e., if g(x) is a distribution function, then
(i) g (  )  1, g (  )  0,
(ii) if x1  x2 ,then g ( x1 )  g ( x2 ), and

(iii) g ( x )  g ( x ),for all x.
(We need to show that FX (x) satisfies all three properties).
4
Probability Distribution Function
In fact, for any r.v. X,
(i) FX ( )  P | X ( )     P()  1 and
FX ()  P | X ( )     P( )  0.
(ii) If x1  x2 , then the subset (, x1 )  (, x2 ).
Consequently the event  | X ( )  x1     | X ( )  x2  ,
since X ( )  x1 implies X ( )  x2 .
As a result FX (x 1 ) P  X ( )  x 1   P  X ( )  x 2  FX (x 2 ),
implying that the probability distribution function is nonnegative
and monotone non-decreasing.
(iii) Let x  xn  xn 1    x2  x1 , and consider the event
Ak   | x  X ( )  xk .
since  x  X ( )  xk   X ( )  x   X ( )  xk ,
5
Probability Distribution Function (PDF)
using mutually exclusive property of events we get
P( Ak )  P x  X ( )  xk   FX ( xk )  FX ( x ).
But  Ak 1  Ak  Ak 1 , and hence

lim Ak   Ak   and hence lim P ( Ak )  0.
k  k 
k 1
Thus lim P( Ak )  lim FX ( xk )  FX ( x)  0.
k  k 

But lim xk  x  , the right limit of x, and hence


k 
FX ( x  )  FX ( x),
i.e., FX (x) is right-continuous, justifying all properties of a distribution
function.

6
Additional Properties of a PDF
(iv) If FX ( x0 )  0 for some x0 , then FX ( x )  0, x  x0 .
This follows, since FX ( x0 )  P X ( )  x0   0 implies X ( )  x0  is
the null set, and for any x  x0 ,  X ( )  x  will be a subset of the null
set.
(v) P X ( )  x   1  FX ( x).We have  X ( )  x   X ( )  x    ,
and since the two events are mutually exclusive, result follows.

(vi) P x1  X ( )  x2   FX ( x2 )  FX ( x1 ), x2  x1.
The events  X ( )  x1  and {x1  X ( )  x2} are mutually exclusive
and their union represents the event  X ( )  x2 .

7
Additional Properties of a PDF
(vii) P X ( )  x   FX ( x )  FX ( x  ).
Let x1  x   ,   0, and x2  x. From (vi),
lim P x    X ( )  x   FX ( x)  lim FX ( x   ),
 0  0
or
P X ( )  x   FX ( x )  FX ( x  ).
It was shown FX ( x0 ), the limit of FX (x) as x  x0 from the right
always exists and equals FX ( x0 ). However the left limit value FX ( x0 )
need not equal FX ( x0 ). Thus FX (x) need not be continuous from the
left. At a discontinuity point of the distribution, the left and right
limits are different, and
P X ( )  x0   FX ( x0 )  FX ( x0 )  0.
8
Additional Properties of a PDF
Thus the only discontinuities of a distribution function FX (x)
are of the jump type, and occur at points x0 where
P  X ( )  x 0   FX (x 0 )  FX (x 0 )  0 is satisfied.
These points can always be enumerated as a sequence, and moreover
they are at most countable in number.

Example 3.1: X is a r.v. such that X ( )  c,    is the only


Possible outcome. Find FX (x).
Solution: For x  c,  X ( )  x    , so that FX ( x)  0, and
for x  c, X ( )  x  , so that FX ( x)  1. F (x)
X

x 9
c
Additional Properties of a PDF
Example 3.2: Toss a coin.   H ,T . Suppose the r.v. X is such
that X (T )  0, X ( H )  1. H occurs with probability p. Find FX (x).
Solution: For x  0,  X ( )  x    , so that FX ( x)  0.
0  x  1,  X ( )  x    T  , so that FX (x )  P  T   1  p ,
x  1,  X ( )  x    H ,T   , so that FX (x )  1.
FX (x)

1
q  1 p
x
0 1

10
Continuous and Discrete Random Variables
 X is said to be a continuous-type r.v. if its distribution
function FX (x) is continuous. In that case FX ( x  )  FX ( x) for
all x, and we get from P  X ( )  x   FX ( x)  FX ( x  ),
PX  x  0.
If FX (x) is constant except for a finite number of jump
discontinuities (piece-wise constant; step-type), then X is said
to be a discrete-type r.v. If xi is such a discontinuity point, then
from P  X ( )  x i   FX (x i )  FX (x i )  0.
pi  PX  xi   FX ( xi )  FX ( xi ).
FX (x)

P X  0   FX (0)  FX (0 )  q  0  q.
1
q  1 p
x
0 1 11
FX (x)
1
3/ 4
1/ 4
x
1 2

Discrete Random Variables

Example:3.3 A fair coin is tossed twice, and let the r.v. X


represent the number of heads. Find FX (x).
Solution: In this case    HH , HT , TH , TT , and
X ( HH )  2, X ( HT )  1, X (TH )  1, X (TT )  0.
x  0, X ( )  x     FX ( x )  0,
1
0  x  1, X ( )  x    TT   FX ( x )  P  TT   P (T ) P (T )  ,
4
3
1  x  2, X ( )  x    TT , HT ,TH   FX ( x )  P  TT , HT ,TH   ,
4
x  2, X ( )  x     FX ( x )  1.

PX  1  FX (1)  FX (1 )  3 / 4  1 / 4  1 / 2.

12
Probability density function (pdf)
The derivative of the distribution function FX (x) is called the
probability density function f X (x) of the r.v. X. Thus
dFX ( x )
f X ( x)  .
dx
Since dFX ( x ) F ( x  x )  FX ( x )
 lim X  0,
dx x  0 x
from the monotone-nondecreasing nature of FX (x), it follows that
f X ( x)  0 for all x. f X (x) will be a continuous function, if X is a
continuous type r.v. However, if X is a discrete type r.v., then its
p.d.f has the general form f (x )X

f X ( x)   pi ( x  xi ),
pi
i
xi x

13
f X (x )
pi

xi x

Probability density function (pdf)


where xi represent the jump-discontinuity points in FX (x).As
Fig. shows f X (x) represents a collection of positive discrete
masses, and it is known as the probability mass function (p.m.f )
x
in the discrete case. FX ( x)   f x (u )du.


Since FX ()  1,  f x ( x )dx  1, which justifies its name

as the density function. Further, we also get
P x1  X ( )  x2   FX ( x2 )  FX ( x1 )  x
x2
f X ( x )dx.
1
FX (x) f X (x )
1

x1 x2 x x1 x2 x
(a) (b)
Thus the area under f X (x) in the interval ( x1, x2 ) represents the
probability P  x 1  X ( )  x 2 . 14
f X (x)

x

Continuous-type random variables
Often, r.v.s are referred by their specific density functions - both
in the continuous and discrete cases - and in what follows we
shall list a number of them in each category.
1. Gaussian: X is said to be Gaussian r.v., if
1  ( x   ) 2 / 2 2
f X ( x)  e .
2 2

This is a bell shaped curve, symmetric around the parameter


and its distribution function is given by
x 1 x 
 e ( y   ) / 2 2
FX ( x )  dy  G 
2
,

2 2   
x 1  y2 / 2
where G( x)   2
e is often tabulated. Since f X (x)
dy
depends on two parameters  and  2 , the notation X  N (  , 2 )
will be used to represent Gaussian r.v.
15
Continuous-type random variables
f X (x)
2. Uniform: X U (a, b ), a  b , 1
ba
x


1 a b
, a  x  b,
f X ( x)   b  a

 0, otherwise.

3. Exponential: X  ( )
 1 x / 
 e
f X (x)
, x  0,
f X ( x)   

 0, otherwise. x

16
Continuous-type random variables
4. Gamma: X G ( , ) if (  0,   0)
 x 1 x /  f X (x )
 e , x  0,
f X ( x )   ( )  

 0, otherwise.
If   n an integer ( n )  ( n  1)!. x

5. Beta: X  (a,b ) if (a  0, b  0)
 1 f X (x )
 x a 1 (1  x )b1 , 0  x  1,
f X ( x )    ( a , b)

 0, otherwise. x
0 1
where the Beta function  ( a, b) is defined as
1
 ( a , b)  
0
u a 1 (1  u ) b 1 du.

17
Continuous-type random variables
6. Chi-Square:X  2 (n ), if f X (x )

 1
 n/2 x n / 21e  x / 2 , x  0,
f X ( x )   2 ( n / 2) x

 0, otherwise.
7. Rayleigh: X R ( 2 ), if f X (x )



x  x 2 / 2 2
e , x  0,
f X ( x )   2
x

 0, otherwise. Fig. 3.13
8. Nakagami – m distribution:
 2  m m 2 m 1  mx 2 / 
   x e , x0
f X ( x )   ( m )   

 0 otherwise
18
Continuous-type random variables
f X (x )
9. Cauchy: X C ( , ), if
 /
f X ( x)  2 ,    x  .  x
  (x  ) 2

10. Laplace: f X ( x)

1 |x|/ 
f X ( x)  e ,    x  .
2
x

11. Student’s t-distribution with n degrees of freedom


fT ( t )
( n  1) / 2  
 ( n 1) / 2
t 
2
f T (t )  1   ,    t  .
n (n / 2)  n
t
19
Continuous-type random variables

12. Fisher’s F-distribution


{( m  n ) / 2} m m / 2 n n / 2 z m / 2 1
 , z0
f z ( z)   ( m / 2) ( n / 2) ( n  mz ) (mn) / 2


 0 otherwise

20
Discrete-type random variables
1. Bernoulli: X takes the values (0,1), and
P ( X  0)  q, P ( X  1)  p; p  q 1
2. Binomial: X B (n , p ), if
 n  k n k
P( X  k )   k  p q , k  0,1,2,  , n.
 
3. Poisson: X P ( ) , if
 k
P( X  k )  e , k  0,1,2,, .
k!
P( X  k ) P( X  k )
Binomial Poisson
k
12 n
21
Discrete-type random variables
4. Hypergeometric: m  N m 
   
k   n k 
P( X  k )    
N 

, max(0, m  n  N )  k  min( m, n )
 
n 
 

5. Geometric: X g ( p ) if

P( X  k )  pqk , k  0,1,2,, , q  1  p.
6. Negative Binomial: X NB (r , p ), if
 k  1 r k  r
P( X  k )    p q , k  r , r  1, .
 r 1
7. Discrete-Uniform:
1
P( X  k )  , k  1,2,, N .
N 22
Polya’s distribution
We conclude this lecture with a general distribution due to Polya
that includes both binomial and hypergeometric as special cases.
Polya distribution has been used to study the spread of contagious
diseases (epidemic modeling).
Polya’s distribution: A box contains a white balls and b black balls. A ball is
drawn at random, and it is replaced along with c balls of the same color. If X
represents the number of white balls drawn in n such draws, X  0, 1, 2, , n,
find the probability mass function of X.
Solution: Consider the specific sequence of draws where k white balls are first
drawn, followed by n-k black balls. The probability of drawing k successive
white balls is given by
a ac a  2c a  (k  1)c
pW 
a  b a  b  c a  b  2c a  b  (k  1)c 23
Polya’s distribution
Similarly the probability of drawing k white balls followed by n – k black balls is
given by
b bc b  ( n  k  1)c
pk  p w
a  b  kc a  b  ( k  1)c a  b  (n  1)c
k 1 n  k 1
a ic b  jc
 a  b ic  a b  ( j  k )c
.
i 0 j 0
Interestingly, pk above also represents the probability of drawing k white balls
and (n-k) black balls in any other specific order (i.e., the same set of numerator
n
and denominator terms contribute to all other sequences as well. But there are  k 
 
such distinct mutually exclusive sequences and summing over al of them, we
obtain the Polya distribution (probability of getting k withite balls in n draws) to
be
n  n  k 1 n  k 1
b  jc
a ic
P( X  k )   
k 
 
pk   
k 
  i 0
 a  b ic  a b( j  k )c
, k  0,1, 2, , n.
j 0

24
Polya’s distribution
Both binomial distribution as well as the hypergeometric distribution are
special cases of Polya’s distribution.
For example if draws are done with replacement, then c = 0 and Polya’s
distirbution simplifies to the binomial distribution
n
P( X  k )   

p k qn k , k  0,1, 2, ,n
where k
 
a b
p , q  1  p.
ab a b
Similarly if the draws are conducted without replacement, then c = – 1 in
Polya’s distribution and it gives hypergeometric distribution.
n a (a  1)(a  2) ( a  k  1) b(b  1) (b  n  k  1)
P( X  k )   

k
  (a  b)(a  b  1) (a  b  k  1) (a  b  k ) (a  b  n  1)
a  b 
   
n! a !( a  b  k )! b !( a  b  n )!  k   n k 
  
P( X  k )    a b 

k !( n  k )! ( a  k )!( a  b)! (b  n  k )!( a  b  k )!  
 n 
 
25

You might also like